SlideShare une entreprise Scribd logo
1  sur  39
OPSCODE CHEF
基本編
Japan Chef User Group
Naotaka Jay Hotta
CloudStack Users Osaka 2012
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で検索してください。
本日の時間配分
15分Chefの基本
(対象者:Chef未経験者)

1分    質疑応答




                 http://www.flickr.com/photos/32299138@N08/5795005774/
Infrastructure
     as
   a Code
世界中のコンピュートインスタンスの
    0.1%を使ったHPCで
     10時間で計算する
Business の
Agilityを上げる
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
自動化を含めた、
LibやAPPs等のパーツの、
細かい要件(version)の定義で
再現性の実現
Chef の基本
公式リリース:


Jan 15th, 2009
“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
DevOps業界では、必需品の第3世代
Sever Configuration …
Puppet, cfengineとの違い?


  Those Who are
    not Using!
•   Ruby Internal DSL

•   便利なknife command

•   Apache License 2.0 OSS

•   Communityの活力
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/
初期の頃から、recipeを公開していた
http://dtosolutions.com/
http://dtosolutions.com/
Chef-Solo

OSS Chef-server

Private Chef-server

Hosted Chef-server
# 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の中で設定する。
それぞれの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" }
コミュニティーレシピーのリポジトリー
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
knife cloudstack
Knife:
強力なCLI
(コマンドラインインターフェース)
Subcommands built into Knife:
• Bootstrap
• Client
• Cloud Plugins
• Configure
• Cookbook
• Cookbook Site
• Data Bag
• Environment
• Exec
• Node
• Recipe
• Role
• Search
• SSH
• Status
• Tag
Knife Plugins
設置は簡単、
ディレクトリの自由度が高い
• ~/.chef/plugins/knife/

• Cookbookの.chef/plugins/knife/

• Ruby Gem があるchef/knife
有益なCommunity Plugins




  http://wiki.opscode.com/display/chef/Community+Plugins
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"
** 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)
knife.rbで、
Hadoop cluster 構成を指定すると!
"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" }
   ]
 }
Opscodeと旧cloud.comより、
CloudStack 3.0に対応していると、
ニュースリリ-スされていますが、
CloudStack User会の事務局長A氏の個
人検証環境の強制占拠によって
未だ検証できず!

Contenu connexe

Tendances

ChefとPuppetの比較
ChefとPuppetの比較ChefとPuppetの比較
ChefとPuppetの比較
Sugawara Genki
 
各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-
各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-
各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-
Yoshinori Nakanishi
 
Control distribution of virtual machines
Control distribution of virtual machinesControl distribution of virtual machines
Control distribution of virtual machines
irix_jp
 

Tendances (20)

Rubyで楽々サーバー管理 - 岡山Ruby会議01 -
Rubyで楽々サーバー管理 - 岡山Ruby会議01 -Rubyで楽々サーバー管理 - 岡山Ruby会議01 -
Rubyで楽々サーバー管理 - 岡山Ruby会議01 -
 
第20回CloudStackユーザ会_ApacheCloudStack4.4新機能紹介
第20回CloudStackユーザ会_ApacheCloudStack4.4新機能紹介第20回CloudStackユーザ会_ApacheCloudStack4.4新機能紹介
第20回CloudStackユーザ会_ApacheCloudStack4.4新機能紹介
 
OpenStack & Ansible で実現する自動化
OpenStack & Ansible で実現する自動化OpenStack & Ansible で実現する自動化
OpenStack & Ansible で実現する自動化
 
ChefとPuppetの比較
ChefとPuppetの比較ChefとPuppetの比較
ChefとPuppetの比較
 
Serverspecを自分好みにアレンジ スクリーンショットで証跡保存を撲滅-
Serverspecを自分好みにアレンジ スクリーンショットで証跡保存を撲滅- Serverspecを自分好みにアレンジ スクリーンショットで証跡保存を撲滅-
Serverspecを自分好みにアレンジ スクリーンショットで証跡保存を撲滅-
 
各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-
各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-
各スペシャリストがお届け!データベース最新情報セミナー -PostgreSQL10-
 
Itamae-Serverspec入門
Itamae-Serverspec入門Itamae-Serverspec入門
Itamae-Serverspec入門
 
Control distribution of virtual machines
Control distribution of virtual machinesControl distribution of virtual machines
Control distribution of virtual machines
 
Serverspecの活用tips紹介
Serverspecの活用tips紹介Serverspecの活用tips紹介
Serverspecの活用tips紹介
 
STNSサーバーを書いてみた
STNSサーバーを書いてみたSTNSサーバーを書いてみた
STNSサーバーを書いてみた
 
nginx入門
nginx入門nginx入門
nginx入門
 
Chef Howto with Vagrant + Berkshelf
Chef Howto with Vagrant + BerkshelfChef Howto with Vagrant + Berkshelf
Chef Howto with Vagrant + Berkshelf
 
Open Stack Day - Ansibleによる環境構築の自動化
Open Stack Day - Ansibleによる環境構築の自動化Open Stack Day - Ansibleによる環境構築の自動化
Open Stack Day - Ansibleによる環境構築の自動化
 
TripleOの光と闇
TripleOの光と闇TripleOの光と闇
TripleOの光と闇
 
OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作
 
Webサーバのチューニング
WebサーバのチューニングWebサーバのチューニング
Webサーバのチューニング
 
Ansible入門
Ansible入門Ansible入門
Ansible入門
 
Alfrescoクラスタリング入門
Alfrescoクラスタリング入門Alfrescoクラスタリング入門
Alfrescoクラスタリング入門
 
HDPをWindowsで動かしてみた
HDPをWindowsで動かしてみたHDPをWindowsで動かしてみた
HDPをWindowsで動かしてみた
 
Serverspecを使ってサーバ5000台のBaculaクライアントをテスト
Serverspecを使ってサーバ5000台のBaculaクライアントをテストServerspecを使ってサーバ5000台のBaculaクライアントをテスト
Serverspecを使ってサーバ5000台のBaculaクライアントをテスト
 

En vedette

Internship Hepatitis C
Internship Hepatitis CInternship Hepatitis C
Internship Hepatitis C
Twelch1
 
Orc For Market Making
Orc  For Market MakingOrc  For Market Making
Orc For Market Making
LMessi10
 
Ppt Slideshare Sharks
Ppt Slideshare SharksPpt Slideshare Sharks
Ppt Slideshare Sharks
DrTwik
 
Scoring Using The Media Rubric
Scoring Using The Media RubricScoring Using The Media Rubric
Scoring Using The Media Rubric
guest45d3ba3
 
FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...
FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...
FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...
Richard Lin
 
Panel book april - 2013 - web - cintpanelbook
Panel book   april - 2013 - web - cintpanelbookPanel book   april - 2013 - web - cintpanelbook
Panel book april - 2013 - web - cintpanelbook
Arjen van Duijvenbode
 

En vedette (20)

Internship Hepatitis C
Internship Hepatitis CInternship Hepatitis C
Internship Hepatitis C
 
Orc For Market Making
Orc  For Market MakingOrc  For Market Making
Orc For Market Making
 
Ppt Slideshare Sharks
Ppt Slideshare SharksPpt Slideshare Sharks
Ppt Slideshare Sharks
 
Scoring Using The Media Rubric
Scoring Using The Media RubricScoring Using The Media Rubric
Scoring Using The Media Rubric
 
FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...
FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...
FOSS on Government Policy, Industry Adoption, Campus Promotion and Community ...
 
Magnitude 7.3 Earthquake Strikes Near Fukushima, Japan 26 October 2013
Magnitude 7.3 Earthquake Strikes Near Fukushima, Japan 26 October 2013Magnitude 7.3 Earthquake Strikes Near Fukushima, Japan 26 October 2013
Magnitude 7.3 Earthquake Strikes Near Fukushima, Japan 26 October 2013
 
2013 Pacific Hurricane Season: Manuel, Barbara and Ingrid
2013 Pacific Hurricane Season: Manuel, Barbara and Ingrid2013 Pacific Hurricane Season: Manuel, Barbara and Ingrid
2013 Pacific Hurricane Season: Manuel, Barbara and Ingrid
 
Financial Aid Seminar Updated
Financial Aid Seminar UpdatedFinancial Aid Seminar Updated
Financial Aid Seminar Updated
 
Tornado outbreak in midwestern states of USA 17 November, 2013
Tornado outbreak in midwestern states of USA  17 November, 2013Tornado outbreak in midwestern states of USA  17 November, 2013
Tornado outbreak in midwestern states of USA 17 November, 2013
 
Holidays And Festivals In Finland
Holidays And Festivals In FinlandHolidays And Festivals In Finland
Holidays And Festivals In Finland
 
2009roundup
2009roundup2009roundup
2009roundup
 
Standing Out in a Crowded Marketplace - Lakelands Real Estate Association - 2015
Standing Out in a Crowded Marketplace - Lakelands Real Estate Association - 2015Standing Out in a Crowded Marketplace - Lakelands Real Estate Association - 2015
Standing Out in a Crowded Marketplace - Lakelands Real Estate Association - 2015
 
Novetats Infantil Tardor 2010
Novetats Infantil Tardor 2010Novetats Infantil Tardor 2010
Novetats Infantil Tardor 2010
 
Economic risks of avian flu
Economic risks of avian fluEconomic risks of avian flu
Economic risks of avian flu
 
Integrating Technology Into Eval
Integrating Technology Into EvalIntegrating Technology Into Eval
Integrating Technology Into Eval
 
The 25th Anniversary Of The Great Armenian Earthquake December 1988
The 25th Anniversary Of The Great Armenian Earthquake December 1988The 25th Anniversary Of The Great Armenian Earthquake December 1988
The 25th Anniversary Of The Great Armenian Earthquake December 1988
 
Practicum computergrafix
Practicum computergrafixPracticum computergrafix
Practicum computergrafix
 
40 54 Pages Sy X
40 54 Pages Sy X40 54 Pages Sy X
40 54 Pages Sy X
 
Top 5 issues niagara niagara business club - 2015
Top 5 issues niagara   niagara business club - 2015Top 5 issues niagara   niagara business club - 2015
Top 5 issues niagara niagara business club - 2015
 
Panel book april - 2013 - web - cintpanelbook
Panel book   april - 2013 - web - cintpanelbookPanel book   april - 2013 - web - cintpanelbook
Panel book april - 2013 - web - cintpanelbook
 

Similaire à Cloudstack user group meeting in osaka

Open stack reference architecture v1 2
Open stack reference architecture v1 2Open stack reference architecture v1 2
Open stack reference architecture v1 2
Dell TechCenter Japan
 
Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14
Masahiro Nagano
 
Apache cloudstack4.0インストール
Apache cloudstack4.0インストールApache cloudstack4.0インストール
Apache cloudstack4.0インストール
Yasuhiro Arai
 
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
Daisuke Ikeda
 

Similaire à Cloudstack user group meeting in osaka (20)

成長を加速する minne の技術基盤戦略
成長を加速する minne の技術基盤戦略成長を加速する minne の技術基盤戦略
成長を加速する minne の技術基盤戦略
 
ゲームのインフラをAwsで実戦tips全て見せます
ゲームのインフラをAwsで実戦tips全て見せますゲームのインフラをAwsで実戦tips全て見せます
ゲームのインフラをAwsで実戦tips全て見せます
 
PHP on Cloud
PHP on CloudPHP on Cloud
PHP on Cloud
 
OpenShift v3 Technical Overview
OpenShift v3 Technical OverviewOpenShift v3 Technical Overview
OpenShift v3 Technical Overview
 
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
Apache Bigtop3.2 (仮)(Open Source Conference 2022 Online/Hiroshima 発表資料)
 
Open stack reference architecture v1 2
Open stack reference architecture v1 2Open stack reference architecture v1 2
Open stack reference architecture v1 2
 
Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14
 
メッセージングプラットフォーム Zimbra の紹介とその活用術 - JJUG ナイトセミナー2013/3
メッセージングプラットフォーム Zimbra の紹介とその活用術 - JJUG ナイトセミナー2013/3メッセージングプラットフォーム Zimbra の紹介とその活用術 - JJUG ナイトセミナー2013/3
メッセージングプラットフォーム Zimbra の紹介とその活用術 - JJUG ナイトセミナー2013/3
 
Apache cloudstack4.0インストール
Apache cloudstack4.0インストールApache cloudstack4.0インストール
Apache cloudstack4.0インストール
 
[Japan Tech summit 2017] DEP 005
[Japan Tech summit 2017] DEP 005[Japan Tech summit 2017] DEP 005
[Japan Tech summit 2017] DEP 005
 
ASP.NET Core WebAPIでODataを使おう
ASP.NET Core WebAPIでODataを使おうASP.NET Core WebAPIでODataを使おう
ASP.NET Core WebAPIでODataを使おう
 
Jenkins study jenkins build-cicdi
Jenkins study jenkins build-cicdiJenkins study jenkins build-cicdi
Jenkins study jenkins build-cicdi
 
BioDevOpsによる再現性のあるバイオインフォマティクス環境の構築
BioDevOpsによる再現性のあるバイオインフォマティクス環境の構築BioDevOpsによる再現性のあるバイオインフォマティクス環境の構築
BioDevOpsによる再現性のあるバイオインフォマティクス環境の構築
 
ネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chef
 
Dockerを使ったローカルでの開発から本番環境へのデプロイまで
Dockerを使ったローカルでの開発から本番環境へのデプロイまでDockerを使ったローカルでの開発から本番環境へのデプロイまで
Dockerを使ったローカルでの開発から本番環境へのデプロイまで
 
Openstack SPICE console (icehouse) verification
Openstack SPICE console (icehouse) verificationOpenstack SPICE console (icehouse) verification
Openstack SPICE console (icehouse) verification
 
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
Windows Server 2016 で作るシンプルなハイパーコンバージドインフラ (Microsoft TechSummit 2016)
 
Inside mobage platform
Inside mobage platformInside mobage platform
Inside mobage platform
 
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
クラウド環境向けZabbixカスタマイズ紹介(第5回Zabbix勉強会)
 
Apache CloudStack 4.0 インストール(ver0.5)
Apache CloudStack 4.0 インストール(ver0.5)Apache CloudStack 4.0 インストール(ver0.5)
Apache CloudStack 4.0 インストール(ver0.5)
 

Plus de Naotaka Jay HOTTA (8)

[Jaws tokyo] last minutes update- datadog
[Jaws tokyo] last minutes update- datadog[Jaws tokyo] last minutes update- datadog
[Jaws tokyo] last minutes update- datadog
 
Datadog meetup (dd_sushi #2) Outlier & anomaly detection tips
 Datadog meetup (dd_sushi #2) Outlier &  anomaly detection tips Datadog meetup (dd_sushi #2) Outlier &  anomaly detection tips
Datadog meetup (dd_sushi #2) Outlier & anomaly detection tips
 
コンテナー型仮想環境の情報交換会
コンテナー型仮想環境の情報交換会コンテナー型仮想環境の情報交換会
コンテナー型仮想環境の情報交換会
 
Alexa Skills Kit programing for dummies
Alexa Skills Kit programing for dummiesAlexa Skills Kit programing for dummies
Alexa Skills Kit programing for dummies
 
Pythonと DataDogを 使って簡単な システムモニターリング (Pycon apac 2013)
Pythonと DataDogを 使って簡単な システムモニターリング (Pycon apac 2013)Pythonと DataDogを 使って簡単な システムモニターリング (Pycon apac 2013)
Pythonと DataDogを 使って簡単な システムモニターリング (Pycon apac 2013)
 
Chef 11概要-osct
Chef 11概要-osctChef 11概要-osct
Chef 11概要-osct
 
Citrix eco new
Citrix eco newCitrix eco new
Citrix eco new
 
PyCon mini JP LT "take me to a conference"
PyCon mini JP LT "take me to a conference"PyCon mini JP LT "take me to a conference"
PyCon mini JP LT "take me to a conference"
 

Cloudstack user group meeting in osaka