Skip to content

Instantly share code, notes, and snippets.

@zdk
Last active October 9, 2015 19:10
Show Gist options
  • Select an option

  • Save zdk/8791b7739243af31f27e to your computer and use it in GitHub Desktop.

Select an option

Save zdk/8791b7739243af31f27e to your computer and use it in GitHub Desktop.
OpsWork Tips
  • Run specific coookbook in running instance.
sudo -i
cd /opt/aws/opsworks/current/
opsworks-agent-cli get_json > attributes.json
bin/chef-solo -c conf/solo.rb -j attributes.json -o recipe[whatever],recipe[whatever_else::specific_recipe]
  • Test Opswork built-in cookbook on Vagrant
# Berkfile
cookbook "deploy", path: 'opsworks/cookbooks/deploy'
cookbook "opsworks_commons", path: 'opsworks/cookbooks/opsworks_commons'
cookbook "scm_helper", path: 'opsworks/cookbooks/scm_helper'
cookbook "mod_php5_apache2", path: 'opsworks/cookbooks/mod_php5_apache2'
cookbook "ssh_users", path: 'opsworks/cookbooks/ssh_users'
cookbook "opsworks_agent_monit", path: 'opsworks/cookbooks/opsworks_agent_monit'
cookbook "opsworks_java", path: 'opsworks/cookbooks/opsworks_java'
cookbook "opsworks_aws_flow_ruby", path: 'opsworks/cookbooks/opsworks_aws_flow_ruby'
cookbook "gem_support", path: 'opsworks/cookbooks/gem_support'
cookbook "opsworks_nodejs", path: 'opsworks/cookbooks/opsworks_nodejs'
cookbook "opsworks_initial_setup", path: 'opsworks/cookbooks/opsworks_initial_setup'
cookbook "mysql", path: 'opsworks/cookbooks/mysql'
cookbook "dependencies", path: 'opsworks/cookbooks/dependencies'
cookbook "opsworks_ganglia", path: 'opsworks/cookbooks/opsworks_ganglia'
#.gitsubmodules
[submodule "opsworks/cookbooks"]
	path = opsworks/cookbooks
	url = https://github.com/aws/opsworks-cookbooks.git
	branch = release-chef-11.10
#.kitchen.yml
    run_list:
      - recipe[opsworks_agent_monit::default]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment