Cloudstack user group meeting in osaka

1,168 views

Published on

Published in: Technology, Self Improvement
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,168
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
31
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Cloudstack user group meeting in osaka

  1. 1. OPSCODE CHEF基本編Japan Chef User GroupNaotaka Jay HottaCloudStack Users Osaka 2012
  2. 2. Japan Chef User Group (JCUG)設立総会: 2012年8月1日本日の担当者: Naotaka Jay Hotta (@jhotta)目 的: Opscode Chefの利用を通して1) ITインフラの高度な管理とシステムの運用の実現を目指す。2) CI, CD 等に実現のためのディプロイメントツールとして高度な知識の知識が、 一般化するための土壌作りを手伝う。方 法:1) ML: chef-ja google groupで検索してください。2) HP: Japan chef user Group facebookで検索してください。
  3. 3. 本日の時間配分15分Chefの基本(対象者:Chef未経験者)1分 質疑応答 http://www.flickr.com/photos/32299138@N08/5795005774/
  4. 4. Infrastructure as a Code
  5. 5. 世界中のコンピュートインスタンスの 0.1%を使ったHPCで 10時間で計算する
  6. 6. Business のAgilityを上げる
  7. 7. Loosely tied management tools enStatus, Scalr, Opscode chef, Sensu,Storage AWSObject CloudStack IDCF KDDIStorage NTT Nifty File Software- etc.. systems Hypervisor Defined Network Public Physical Hardware cloud service
  8. 8. 自動化を含めた、LibやAPPs等のパーツの、細かい要件(version)の定義で再現性の実現
  9. 9. Chef の基本
  10. 10. 公式リリース:Jan 15th, 2009
  11. 11. “Chef is like a little systemadmin robot... you tell ithow you want your systemconfigured and it will do allthe dirty work.”- Early Chef Adopter
  12. 12. DevOps業界では、必需品の第3世代Sever Configuration …
  13. 13. Puppet, cfengineとの違い? Those Who are not Using!
  14. 14. • Ruby Internal DSL• 便利なknife command• Apache License 2.0 OSS• Communityの活力
  15. 15. Opscode Chef community• 380+Cookbooks• Plug-Ins 多数• Source Code Documentation• FAQ• Training 16,000 Active Users• 600+ Individual and 120+ Corporate Contributors• Global Partner Network http://community.opscode.com/
  16. 16. 初期の頃から、recipeを公開していた
  17. 17. http://dtosolutions.com/
  18. 18. http://dtosolutions.com/
  19. 19. Chef-SoloOSS Chef-serverPrivate Chef-serverHosted Chef-server
  20. 20. # chef-solo -c ~/solo.rb -j ~/node.json -r http://www.example.com/chef-solo.tar.gz -c, --config CONFIG -j, --json-attributes JSON_ATTRIBS -r, --recipe-url RECIPE_URL *run_listは、json-attributesの中で設定する。
  21. 21. それぞれのNODEのRoleに合わせた、 設定内容のリストが呼び出される。name "webserver"description "The base role for systems that serve HTTP traffic"run_list "recipe[apache2]", "recipe[apache2::mod_ssl]", "role[monitor]”default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }override_attributes "apache2" => { "max_children" => "50" }
  22. 22. コミュニティーレシピーのリポジトリーRepository Description Maintainerhttps://github.com/opscode-cookbooks Cookbooks created by Opscode Opscodehttps://github.com/37signals/37s_cook 37 Signals Repository 37 Signalsbookshttps://github.com/engineyard/ey- EY Cloud Recipes Engine Yardcloud-recipeshttps://github.com/cookbooks Community Curated Cookbooks “Cookbooks” Organization
  23. 23. knife cloudstack
  24. 24. Knife:強力なCLI(コマンドラインインターフェース)
  25. 25. Subcommands built into Knife:• Bootstrap• Client• Cloud Plugins• Configure• Cookbook• Cookbook Site• Data Bag• Environment• Exec• Node• Recipe• Role• Search• SSH• Status• Tag
  26. 26. Knife Plugins
  27. 27. 設置は簡単、ディレクトリの自由度が高い• ~/.chef/plugins/knife/• Cookbookの.chef/plugins/knife/• Ruby Gem があるchef/knife
  28. 28. 有益なCommunity Plugins http://wiki.opscode.com/display/chef/Community+Plugins
  29. 29. knife.rb file:knife[:cloudstack_url] = "http://yourcloudstackserver.com:8080/client/apiknife[:cloudstack_api_key] = "Your CloudStack API Key"knife[:cloudstack_secret_key] = "Your CloudStack Secret Key"
  30. 30. ** CS COMMANDS **knife cs hostsknife cs network list (options)knife cs server create [SERVER_NAME] (options)knife cs server delete SERVER_NAME [SERVER_NAME ...] (options)knife cs server list (options)knife cs server reboot SERVER_NAME [SERVER_NAME ...] (options)knife cs server start SERVER_NAME [SERVER_NAME ...] (options)knife cs server stop SERVER_NAME [SERVER_NAME ...] (options)knife cs service list (options)knife cs stack create JSON_FILE (options)knife cs stack delete JSON_FILE (options)knife cs template list (options)knife cs zone list (options)
  31. 31. knife.rbで、Hadoop cluster 構成を指定すると!
  32. 32. "name": "hadoop_cluster_a","description": "A small hadoop cluster with hbase","version": "1.0","environment": "production","servers": [ { "name": "zookeeper-a, zookeeper-b, zookeeper-c", "description": "Zookeeper nodes", "template": "rhel-5.6-base", "service": "small", "port_rules": "2181", "run_list": "role[cluster_a], role[zookeeper_server]", "actions": [ { "knife_ssh": ["role:zookeeper_server", "sudo chef-client"] } ] }, { "name": "hadoop-master", "description": "Hadoop master node", "template": "rhel-5.6-base", "service": "large", "networks": "app-net, storage-net", "port_rules": "50070, 50030, 60010", "run_list": "role[cluster_a], role[hadoop_master], role[hbase_master]" }, { "name": "hadoop-worker-a hadoop-worker-b hadoop-worker-c", "description": "Hadoop worker nodes", "template": "rhel-5.6-base", "service": "medium", "port_rules": "50075, 50060, 60030", "run_list": "role[cluster_a], role[hadoop_worker], role[hbase_regionserver]", "actions": [ { "knife_ssh": ["role:hadoop_master", "sudo chef-client"] }, { "http_request": "http://${hadoop-master}:50070/index.jsp" } ] }
  33. 33. Opscodeと旧cloud.comより、CloudStack 3.0に対応していると、ニュースリリ-スされていますが、CloudStack User会の事務局長A氏の個人検証環境の強制占拠によって未だ検証できず!

×