Skip to content

Instantly share code, notes, and snippets.

@veryhappythings
Created November 15, 2010 15:00
Show Gist options
  • Save veryhappythings/700440 to your computer and use it in GitHub Desktop.
Save veryhappythings/700440 to your computer and use it in GitHub Desktop.
A chef recipe for installing mongoDB from apt-get on ubuntu.
execute 'apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10' do
user 'root'
end
ubuntu_version = node[:platform_version]
ubuntu_version.gsub! '.0', '.'
execute "echo 'deb http://downloads.mongodb.org/distros/ubuntu #{ubuntu_version} 10gen' >> /etc/apt/sources.list" do
user 'root'
not_if 'grep mongodb /etc/apt/sources.list'
end
execute 'apt-get update' do
user 'root'
end
package 'mongodb-stable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment