Skip to content

Instantly share code, notes, and snippets.

@drewww
Forked from mewdriller/Cheffile
Created July 5, 2012 17:44
Show Gist options
  • Save drewww/3055132 to your computer and use it in GitHub Desktop.
Save drewww/3055132 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#^syntax detection
site 'http://community.opscode.com/api/v1'
cookbook 'apt',
:git=>'https://github.com/opscode-cookbooks/apt'
cookbook 'git',
:git=>'https://github.com/opscode-cookbooks/git'
cookbook 'build-essential',
:git=>'https://github.com/opscode-cookbooks/build-essential'
cookbook 'rvm',
:git=>'https://github.com/fnichol/chef-rvm',
:ref=>'v0.8.6'
$ git clone <your_git_repository_url>
$ cd <repository_name>
$ librarian-chef install
$ vagrant up
$ gem install librarian
$ echo cookbooks >> .gitignore
$ echo tmp >> .gitignore
$ echo Cheffile.log >> .gitignore
$ librarian-chef init
$ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
$ vagrant init lucid32
$ vagrant up
# -*- 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
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