Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build a chef-solo Development Environment with ...

Tyler Bird
August 28, 2012

Build a chef-solo Development Environment with Vagrant

After going through this you should be familiar with how to use Vagrant to help develop chef-solo recipes.

Tyler Bird

August 28, 2012
Tweet

More Decks by Tyler Bird

Other Decks in Programming

Transcript

  1. Vagrant $ vagrant box add lucid32 http://.vagrantup.com/lucid32.box $ vagrant init

    lucid32 $ vagrant up $ vagrant ssh Friday, November 2, 12
  2. Vagrant How do we setup chef? We’re going to use

    the Vagrantfile. And what Vagrant calls Provisioners. Friday, November 2, 12
  3. Vagrantfile Set the config.vm.forward_port for external access. Specified a box

    name that matches the file container. Enabled the chef provisioner. Friday, November 2, 12
  4. Shared Folders The /vagrant location is the default shared folder.

    We can use this to setup our dev environment. So how do we setup a chef environment? Friday, November 2, 12
  5. Chef Example Changed to chef.path Changed to chef.add_recipe(“main”) Setup the

    default cookbook files and folder structure. Friday, November 2, 12
  6. The Vagrant Way No git is running. Add a package

    to main, run vagrant provision. Git is added: wash, rinse, repeat. Friday, November 2, 12
  7. My Way Pros: Manage JSON in node.json file. Cons: You

    lose the vagrant provision command. Friday, November 2, 12
  8. Where to go from here? Getting under version control. Automating

    deployment. Multiple ENV Vagrant. Friday, November 2, 12