Created
July 11, 2012 21:04
-
-
Save ligfx/3093508 to your computer and use it in GitHub Desktop.
This file contains 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
set -e | |
export PATH="$PWD/lib:$PATH" | |
vagrant up | |
echo "[Deploy] Running setup.." | |
deploy_roles "common" "ruby1.9" "postgres" |
This file contains 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
sudo apt-get install -y build-essential make |
This file contains 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
sudo apt-get install -y postgresql-9.1 libpq-dev | |
sudo -u postgres psql postgres -c "ALTER ROLE postgres WITH PASSWORD 'postgres'" |
This file contains 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
sudo apt-get install -y ruby1.9.3 | |
sudo gem install bundler |
This file contains 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
#!/bin/bash | |
# deploy_roles ROLES... | |
ROLES=$@ | |
vagrant ssh -c " | |
set -e | |
$( | |
for role in $ROLES; do | |
echo [Deploy] Adding role $role >&2 | |
cat $(dirname $0)/deploy_role_$role | |
echo | |
done | |
) | |
" |
This file contains 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
Vagrant::Config.run do |config| | |
config.vm.box = "precise64" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment