2014年12月20日土曜日

Chefのインストール

Chef(http://www.getchef.com/)はApache Licenseのインフラストラクチャ構成自動化OSSである。
2013/2にVersion 11、2014/9にVersion 12がリリースされた。

<Version 12のポイント>
・従来のWeb-UIは廃止になり、アドオンパッケージのインストールになる。
・高可用性についてDRBD⇒物理、仮想、クラウドベースのブロックデバイスをサポート。
・複数リージョンにまたがったChefサーバーの単一ビューを得られ、データセンターや
 クラウドにあるChefサーバー間のポリシーを非同期に複製。
・Amazon Web Services(AWS)をサポート。
・「Chef Analytics Platform」をマージし、コンテナリソースの管理が可能。
・Windows PowerShell DSCとの統合により、クロスプラットフォームのIT自動化を実装。
・OSS版(「Chef Essentials」)と商用版(「Chef Enterprise」)を単一のコードベースに統一。
 新たに導入された無料の「Chef Essentials」プランでは、25ノードまでの設定管理が可能。

以下に、CentOS 6.5にChef Server/Client 12を構築する。
 ※CentOS 日本語化は以下を参照。
  http://kwski.net/linux/208/

●Chef-Server
https://downloads.chef.io/chef-server/redhat/#/より姓・名・メールアドレスを登録してダウンロード。ファイルサイズは443 MBとでかい。
# rpm -ivh chef-server-core-12.0.1-1.x86_64.rpm
 ※Thank you for installing Chef Server!となっていることを確認する。

・Chef Manage
# chef-server-ctl install opscode-manage
# opscode-manage-ctl reconfigure

・Chef Push Jobs
# chef-server-ctl install opscode-push-jobs-server
# opscode-push-jobs-server-ctl reconfigure

・Chef Replication
# chef-server-ctl install chef-sync
# chef-sync-ctl reconfigure

・Reporting
# chef-server-ctl install opscode-reporting
# opscode-reporting-ctl reconfigure

・再構成
# chef-server-ctl reconfigure
..
opscode Reconfigured!
 ※「opscode Reconfigured!」となっていることを確認する。

・テスト
# chef-server-ctl test
..
Finished in 34.82 seconds
130 examples, 0 failures, 2 pending
 ※「0 failures」となっていることを確認する。
 ※名前解決できないと、nginxの起動に失敗する。

# cd /etc/chef-server

# chef-server-ctl user-create goodjob Good Job goodjob@openam.net goodjob --filename goodjob.pem
the ffi-yajl and yajl-ruby gems have incompatible C libyajl libs and should not be loaded in the same Ruby VM
falling back to ffi which might work (or might not, no promises)
ffi-yajl/json_gem is deprecated, these monkeypatches will be dropped shortly

# chef-server-ctl org-create kk-openam "Learning Chef" --association goodjob --filename kk-openam-validator.pem
the ffi-yajl and yajl-ruby gems have incompatible C libyajl libs and should not be loaded in the same Ruby VM
falling back to ffi which might work (or might not, no promises)
ffi-yajl/json_gem is deprecated, these monkeypatches will be dropped shortly

https://chef-server.openam.net/loginにアクセスし、goodjob/goodjobでログイン。

ログインを確認する。



[Administration] - [kk-openam] よりGenerate Knife Configを選択し、knife.rbをダウンロードする。



●Chef-Client
# curl -L https://www.opscode.com/chef/install.sh | bash
..
Thank you for installing Chef!
 ※「Thank you for installing Chef!」となっていることを確認する。

# chef-client -v
Chef: 12.0.3


0 件のコメント:

コメントを投稿