-
Notifications
You must be signed in to change notification settings - Fork 4
chef soloを試してみる
mechamogera edited this page Sep 10, 2012
·
15 revisions
- awsのec2でchef soloを試してみる
- インスタンス作成時にUser Dataに以下を指定
#!/bin/bash
yum update -y
yum install -y git gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
curl -L https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm install 1.9.3
rvm use 1.9.3
gem install chef --no-rdoc --no-ri
cp /usr/share/zoneinfo/Japan /etc/localtime
git clone https://github.com/mechamogera/MyTips.git /tmp/MyTips
chef-solo -c /tmp/MyTips/chef-test/chef-repo/.chef/solo.rb -j /tmp/MyTips/chef-test/chef-repo/.chef/chef.json
- cloud-configでやろうと思っていたが''を付ける付けないがよくわからなかったのでやめた
- microインスタンスだとsshログインできるようになった時点ではまだ処理は完了しておらず処理完了を待つ必要がある
git clone git://github.com/opscode/chef-repo.git
cd chef-repo
knife cookbook create hoge -o cookbooks
- こんな感じでレシピ作った