Skip to content

Instantly share code, notes, and snippets.

@jonathanccalixto
Last active August 29, 2015 14:10
Show Gist options
  • Save jonathanccalixto/cccbdae171ee17700ae9 to your computer and use it in GitHub Desktop.
Save jonathanccalixto/cccbdae171ee17700ae9 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -x
provision_command="wget -O- https://gist.github.com/sobrinho/4774041 | sh"
ssh root@server1 "$provision_command"
ssh root@server2 "$provision_command"
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
set -e
set -x
wget -q -O - http://apt.hellobits.com/hellobits.key | apt-key add -
echo "deb http://apt.hellobits.com/ precise main" > /etc/apt/sources.list.d/hellobits.list
apt-get update
apt-get install -y build-essential \
libxml2-dev \
libxslt1-dev \
fontconfig \
git \
memcached \
postgresql \
libpq-dev \
redis-server \
nodejs \
ruby-ni
if [ ! -f /usr/local/bin/phantomjs ]; then
wget -q -O - http://phantomjs.googlecode.com/files/phantomjs-1.8.1-linux-x86_64.tar.bz2 | tar xfj - -C /usr/local
ln -s /usr/local/phantomjs-*/bin/phantomjs /usr/local/bin/phantomjs
fi
gem update --system
gem install bundler \
foreman \
heroku
sudo -u postgres psql postgres <<SQL
DO \$\$
BEGIN
PERFORM usename FROM pg_user WHERE usename = 'vagrant';
IF NOT FOUND THEN
CREATE USER vagrant WITH CREATEDB;
END IF;
END\$\$
SQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment