Skip to content

Instantly share code, notes, and snippets.

@sunaoka
Created January 7, 2014 06:20
Show Gist options
  • Select an option

  • Save sunaoka/8295361 to your computer and use it in GitHub Desktop.

Select an option

Save sunaoka/8295361 to your computer and use it in GitHub Desktop.

EC2 上で OptWorks 用のカスタムレシピを作成する

# cd /opt/aws/opsworks/current
# bundle exec knife cookbook create xxx -o /tmp/cookbook -c conf/solo.rb

EC2 上で OptWorks 用のカスタムレシピ実行

# bundle exec chef-solo -c conf/solo.rb -o xxx

EC2 上で OptWorks 用のカスタムレシピを更新して、レシピ実行

$ sudo bash -c 'cd /opt/aws/opsworks/current/site-cookbooks; git pull origin master; bundle exec chef-solo -c ../conf/solo.rb -o xxx'

ライフサイクルイベントを手動で実行

$ opsworks-agent-cli run_command configure

参考: http://qiita.com/sawanoboly/items/147f550878477ff7723e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment