diff --git a/.gitignore b/.gitignore index 5d0dbeb..4159be7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ bundled_gems/ vendor/ examples/db/*.db examples/config/database.yml +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..db14930 --- /dev/null +++ b/Vagrantfile @@ -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 diff --git a/setup_env.sh b/setup_env.sh new file mode 100644 index 0000000..a05dc96 --- /dev/null +++ b/setup_env.sh @@ -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