Created
May 1, 2012 03:37
-
-
Save mewdriller/2564740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#^syntax detection | |
site 'http://community.opscode.com/api/v1' | |
cookbook 'apt' | |
cookbook 'git', | |
git: 'https://github.com/fnichol/chef-git.git' | |
cookbook 'build-essential' | |
cookbook 'rvm', | |
git: 'git://github.com/fnichol/chef-rvm.git', ref: 'v0.8.6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone <your_git_repository_url> | |
$ cd <repository_name> | |
$ librarian-chef install | |
$ vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gem install librarian | |
$ echo cookbooks >> .gitignore | |
$ echo tmp >> .gitignore | |
$ librarian-chef init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box | |
$ vagrant init lucid32 | |
$ vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid64" | |
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | |
config.vm.network :hostonly, "33.33.33.10" | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = ["cookbooks"] | |
chef.add_recipe "apt" | |
chef.add_recipe "build-essential" | |
chef.add_recipe "rvm::vagrant" | |
chef.add_recipe "rvm::system" | |
chef.add_recipe "git" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant::Config.run do |config| | |
config.vm.box = "lucid32" | |
# Enable and configure the chef solo provisioner | |
config.vm.provision :chef_solo do |chef| | |
# We're going to download our cookbooks from the web | |
chef.recipe_url = "http://files.vagrantup.com/getting_started/cookbooks.tar.gz" | |
# Tell chef what recipe to run. In this case, the `vagrant_main` recipe | |
# does all the magic. | |
chef.add_recipe("vagrant_main") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks to me like the syntax on Cheffiles changed since you first wrote this. I updated the Cheffile in my gist here: https://gist.github.com/3055132
I also moved the git pointers to what seem to be the current canonical homes for each of those packages, except for rvm which seems to still be externally managed. I also added a Cheffile.lock entry to gitignore.
Thanks much for the blog post! Was a huge help with getting this setup for me, and wanted to make sure the lessons I learned got reflected in the code.