1
0
mirror of https://github.com/jcwimer/railsVagrant synced 2026-03-24 18:44:42 +00:00

Moved rvm setup to provisioning

This commit is contained in:
2016-08-09 16:28:28 -04:00
parent 599e761099
commit 52aedbca57
8 changed files with 37 additions and 19 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
work/*
.vagrant/

View File

@@ -4,5 +4,3 @@ Ubuntu 14.04 vagrant template for rails development.
To use, do the following:
* Run <tt>vagrant up</tt>
* Run <tt>vagrant ssh</tt>
* Cd to <tt>/vagrant/setup</tt>
* Run <tt>./build.sh</tt>

4
Vagrantfile vendored
View File

@@ -2,6 +2,10 @@ Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "public_network"
config.vm.network "private_network", ip: "192.168.254.2"
config.vm.provision :shell, path: "setup/build.sh"
config.vm.provision :shell, path: "setup/rvm-install.sh", args: "stable", privileged: false
config.vm.provision :shell, path: "setup/ruby-install.sh", args: "2.3.0 rails", privileged: false
config.vm.provision :shell, path: "setup/other-user-setup.sh", privileged: false
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2

View File

@@ -6,5 +6,3 @@ For Windows:
5. Open CMD and navigate to railsVagrant folder
6. From CMD run vagrant up
7. Run vagrant ssh
8. Run build.sh inside vagrant

View File

@@ -1,13 +1,11 @@
sudo apt-get update
sudo apt-get install nodejs -y
sudo apt-get install curl -y
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --rails
echo "source $HOME/.rvm/scripts/rvm" >> /home/vagrant/.bashrc
sudo apt-get install git-core -y
#!/usr/bin/env bash
apt-get update
apt-get install nodejs nodejs-legacy npm curl git -y
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
cd /vagrant/setup
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.10.deb
sudo dpkg -i elasticsearch-0.90.10.deb
rm elasticsearch-0.90.10.deb
#Docker install
curl -sSL https://get.docker.com/ | sh
usermod -aG docker vagrant
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > docker-compose
mv docker-compose /usr/local/bin/
chmod +x /usr/local/bin/docker-compose

View File

@@ -0,0 +1,2 @@
git config --global user.name "Jacob Cody Wimer"
git config --global user.email "jacob.wimer@gmail.com"

13
setup/ruby-install.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
source $HOME/.rvm/scripts/rvm
rvm use --default --install $1
shift
if (( $# ))
then gem install $@
fi
rvm cleanup all

3
setup/rvm-install.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s $1