-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5ff027c
Showing
6 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vagrant |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Agilion Development Environment (alpha) | ||
|
||
Super simple bash based Vagrant provisioning for Rails development environments. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | ||
VAGRANTFILE_API_VERSION = '2' | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
config.vm.box = 'hashicorp/precise64' | ||
|
||
config.vm.network 'forwarded_port', guest: 3000, host: 3050 | ||
|
||
config.vm.synced_folder '.', '/vagrant', type: 'rsync', | ||
rsync__exclude: '.git/' | ||
|
||
config.vm.provider 'virtualbox' do |vb| | ||
vb.customize ['modifyvm', :id, '--memory', '512'] | ||
end | ||
|
||
config.vm.provision 'shell', path: 'base.sh' | ||
config.vm.provision 'shell', path: 'ruby-2.1.sh', privileged: false, keep_color: true | ||
config.vm.provision 'shell', path: 'postgresql.sh' | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apt-get update -y | ||
|
||
# Common Packages | ||
# memcached and redis will be running on their standard ports. | ||
apt-get install -y curl redis-server memcached libcurl3 libcurl3-gnutls libcurl4-openssl-dev |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Install postgres | ||
apt-get install -y postgresql libpq-dev postgresql-contrib | ||
|
||
# Create DB | ||
if [ ! -d '/usr/local/pgsql/data' ]; then | ||
mkdir -p /usr/local/pgsql/data | ||
chown postgres:postgres /usr/local/pgsql/data | ||
su - postgres -l -c '/usr/lib/postgresql/9.1/bin/initdb -D /usr/local/pgsql/data' | ||
|
||
# Setup hstor | ||
su - postgres -l -c 'psql -d template1 -c "create extension hstore;"' | ||
fi | ||
|
||
# Create vagrant user | ||
su - postgres -l -c 'createuser vagrant -s' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Installs RVM & Ruby 2.1 on 12.04 LTS Ubuntu | ||
# add to Vagrantfile: | ||
# config.vm.provision 'shell', path: 'ruby-2.1.sh', privileged: false, keep_color: true | ||
|
||
if [[ -s "/home/vagrant/.rvm/scripts/rvm" ]] ; then | ||
echo 'RVM installed, skipping RVM install' | ||
else | ||
curl -sSL https://get.rvm.io | bash -s stable | ||
fi | ||
|
||
source '/home/vagrant/.rvm/scripts/rvm' | ||
|
||
if rvm list strings | grep -lq ruby-2.1.0 ; then | ||
echo 'Ruby 2.1.0 installed. Skipping installed.' | ||
else | ||
rvm autolibs packages | ||
rvm requirements | ||
rvm mount https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-2.1.0.tar.bz2 | ||
rvm use 2.1.0 --default | ||
fi | ||
|
||
echo 'Setting Ruby 2.1 as default' |