Cloudstack user group meeting in osaka2. 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で検索してください。
8. Loosely tied management tools
enStatus, Scalr, Opscode chef, Sensu,
Storage AWS
Object
CloudStack IDCF
KDDI
Storage
NTT
Nifty
File Software- etc..
systems Hypervisor
Defined Network
Public
Physical Hardware cloud service
13. “Chef is like a little system
admin robot... you tell it
how you want your system
configured and it will do all
the dirty work.”
- Early Chef Adopter
16. ? Ruby Internal DSL
? 便利なknife command
? Apache License 2.0 OSS
? Communityの活力
17. 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/
24. # 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の中で設定する。
28. コミュニティーレシピーのリポジトリー
Repository Description Maintainer
https://github.com/opscode-cookbooks Cookbooks created by Opscode Opscode
https://github.com/37signals/37s_cook 37 Signals Repository 37 Signals
books
https://github.com/engineyard/ey- EY Cloud Recipes Engine Yard
cloud-recipes
https://github.com/cookbooks Community Curated Cookbooks “Cookbooks” Organization
31. Subcommands built into Knife:
? Bootstrap
? Client
? Cloud Plugins
? Configure
? Cookbook
? Cookbook Site
? Data Bag
? Environment
? Exec
? Node
? Recipe
? Role
? Search
? SSH
? Status
? Tag
35. knife.rb file:
knife[:cloudstack_url] = "http://yourcloudstackserver.com:8080/client/api
knife[:cloudstack_api_key] = "Your CloudStack API Key"
knife[:cloudstack_secret_key] = "Your CloudStack Secret Key"
36. ** CS COMMANDS **
knife cs hosts
knife 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)
38. "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" }
]
}