Skip to content

Instantly share code, notes, and snippets.

@whylom
Created April 23, 2012 18:01
Show Gist options
  • Save whylom/2472727 to your computer and use it in GitHub Desktop.
Save whylom/2472727 to your computer and use it in GitHub Desktop.
How to install Graphite on Vagrant with Chef

Here are some quick notes on installing Graphite on a Vagrant virtual machine using Chef recipes from GitHub. This more or less assumes you know what you're doing with Vagrant and Chef.

Notes

  • I used the "lucid32" Ubuntu base box you see in most Vagrant examples (http://files.vagrantup.com/lucid32.box)
  • Where possible, I used the cookbooks from Opscode. I was forced to use alternatives for Python (did not work for me) and for Graphite (no Opscode cookbook as of now).
  • The Graphite recipe depends on the Python, Apache2, and runit recipes.
  • I'm running the apt recipe first to update the Ubuntu package manager. The out-of-date manager that ships with the lucid32 box errored out for me when running the Python recipe.

Cookbooks Used

Vagrant::Config.run do |config|
config.vm.box = 'lucid32'
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = 'cookbooks'
chef.add_recipe 'apt'
chef.add_recipe 'graphite'
end
end
@mattnworb
Copy link

Thanks for this, whylom.

Protip to any Chef newbiews who stumble upon this in the future and have trouble setting up the chef-graphite cookbook: if you clone https://github.com/heavywater/chef-graphite into a cookbooks directory, make sure the directory is named cookbooks/graphite and not cookbooks/chef-graphite or else you will get errors that the recipe "graphite" could not be found.

@whylom
Copy link
Author

whylom commented Jul 3, 2012

Thanks for adding that, mattnworb! That problem bit me many times when I was first using Chef with a variety of cookbooks named "chef-[whatever]".

@kadishmal
Copy link

Now graphite cookbook also depends on memcached cookbook. Please add it to your description.

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