adds Vagrant using a simple bash provisioner

This commit is contained in:
Ben Mabey 2012-01-17 14:33:09 -07:00
parent e48e3d4be4
commit d19f862fa4
3 changed files with 25 additions and 0 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ bundled_gems/
vendor/
examples/db/*.db
examples/config/database.yml
.vagrant

5
Vagrantfile vendored Normal file
View File

@ -0,0 +1,5 @@
Vagrant::Config.run do |config|
config.vm.box = "ubuntu-1104-server-amd64"
config.vm.box_url = "http://dl.dropbox.com/u/7490647/talifun-ubuntu-11.04-server-amd64.box"
config.vm.provision :shell, :path => "setup_env.sh"
end

19
setup_env.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
set -x
set -e
# add the 10gen repo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install --yes couchdb mysql-server mongodb-10gen curl
# setup rvm
if [ ! -d "$HOME/.rvm"]
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
rvm install ruby-1.8.7-p248
fi