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

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

6
Vagrantfile vendored
View File

@@ -2,9 +2,13 @@ Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64" config.vm.box = "ubuntu/trusty64"
config.vm.network "public_network" config.vm.network "public_network"
config.vm.network "private_network", ip: "192.168.254.2" 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| config.vm.provider "virtualbox" do |v|
v.memory = 2048 v.memory = 2048
v.cpus = 2 v.cpus = 2
v.name = "railsdev" v.name = "railsdev"
end end
end end

View File

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

View File

@@ -1,13 +1,11 @@
#!/usr/bin/env bash
sudo apt-get update apt-get update
sudo apt-get install nodejs -y apt-get install nodejs nodejs-legacy npm curl git -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
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh 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 #Docker install
sudo dpkg -i elasticsearch-0.90.10.deb curl -sSL https://get.docker.com/ | sh
rm elasticsearch-0.90.10.deb 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