Created
October 23, 2012 14:45
-
-
Save cihad/3939187 to your computer and use it in GitHub Desktop.
Mongodb Install Capistrano Recipe
This file contains hidden or 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
# reference: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/ | |
namespace :mongodb do | |
desc "Install the latest stable release of Mongodb." | |
task :install, roles: :db, only: { primary: true } do | |
run "#{sudo} apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10" | |
run "#{sudo} touch /etc/apt/sources.list.d/10gen.list" | |
run "#{sudo} echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' >> /etc/apt/sources.list.d/10gen.list" | |
run "#{sudo} apt-get -y update" | |
run "#{sudo} apt-get -y install mongodb-10gen" | |
end | |
after "deploy:install", "mongodb:install" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment