Skip to content

Instantly share code, notes, and snippets.

@nateware
Last active July 14, 2017 02:44
Show Gist options
  • Save nateware/6442383 to your computer and use it in GitHub Desktop.
Save nateware/6442383 to your computer and use it in GitHub Desktop.
Getting started with Vagrant and VirtualBox to test Chef with AWS OpsWorks
# Create vagrant image
vagrant init ubuntu12_64 http://files.vagrantup.com/precise64.box
vagrant up
vagrant ssh
# Fork aws/opsworks-cookbooks on github
# https://github.com/aws/opsworks-cookbooks
# Clone locally
git clone [email protected]:yourusername/opsworks-cookbooks.git
cd opsworks-cookbooks
git checkout master-chef-11.4
# Install chef
curl -L https://www.opscode.com/chef/install.sh | sudo bash
# Workaround for ruby 2.0.0 rubygems issue
alias chef-solo='unset GEM_HOME GEM_PATH && \chef-solo'
alias knife='unset GEM_HOME GEM_PATH && \knife'
# Create a new chef 11 cookbook
knife cookbook create my_new_service -o .
@HelloGrayson
Copy link

This allows you to write chef-solo style cookbooks that are compatible with OpsWorks?

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