Skip to content

Instantly share code, notes, and snippets.

@z3cka
Forked from crifkin/gist:5986419
Last active December 19, 2015 16:59
Show Gist options
  • Save z3cka/5988292 to your computer and use it in GitHub Desktop.
Save z3cka/5988292 to your computer and use it in GitHub Desktop.
NOTE: version numbers are at the time of this writing
1. Download and install Virtualbox (4.2.16)
2. Download and install Vagrant (1.2.3)
3. Check ruby and rubygems versions
4. Install berkshelf gem
gem install berkshelf --version '>= 1.4.0' --no-ri --no-rdoc
5. Install berkshelf vagrant plugin
vagrant plugin install vagrant-berkshelf --plugin-version '1.2.0'
6. Add vagrant basebox provided in Crifkin Training package (precise64_chef11.box)
vagrant box add precise64_chef11 /PATH/TO/precise64_chef11.box
Sidebar: We can discuss the steps that went into bootstrap this precise box to make it chef 11.04 (galden imageing)
1. Dowload base box (http://www.vagrantbox.es) -- DO NOT DO THIS IN THE TRAINING PLEASE
2. Add the box to vagrant
vagrant box add precise64 /PATH/TO/precise64.box
3. Make a vagrant directory to provision the VM. This will produce a default Vagrantfile
mkdir FOO && cd FOO && vagrant init
4. Edit the vagrant file to use the box you just added. Edit other config as needed.
config.vm.box = "precise64"
5. Run vagrant up to provision
vagrant up
6. SSH into the new VM
vagrant ssh
7. Run the Opscode omnibus installer (sudo su if you prefer)
curl -L https://www.opscode.com/chef/install.sh | sudo bash
8. Exit the VM
exit
9. Package the VM as a golden image
vagrant package precise64 (this will produce precise64.box again so use the --output flag)
10. Add new box to vagrant and use in future Vagrantfile(s)
vagrant box add SHINY_NEW_BOX /PATH/TO/GOLDEN_IMAGE.box
7. Copy latest Berkshelf and Vagrant file provided by Crifkin to ./crifkin/
8. Open the files and review. Make edits as needed (box name and/or IP)
9. Finally run vagrant up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment