Skip to content

Commit c9ef9e9

Browse files
Fix up rvm install, make gauntlt install first
1 parent f3a00cf commit c9ef9e9

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Vagrant.configure("2") do |config|
22
config.vm.box = "bento/centos-7.5"
33
config.vm.synced_folder ".", "/app"
44
config.vm.provision "shell", inline: "/app/bin/install-ansible.sh", upload_path: "/home/vagrant/install-ansible.sh"
5-
config.vm.provision "shell", inline: "cd /app/ansible && ansible-playbook -l localhost bakery.yml app-AfterInstall.yml app-StartServer.yml", upload_path: "/home/vagrant/apl.sh"
65
config.vm.provision "shell", inline: "/app/bin/install-gauntlt.sh", upload_path: "/home/vagrant/install-gauntlt.sh"
6+
config.vm.provision "shell", inline: "cd /app/ansible && ansible-playbook -l localhost bakery.yml app-AfterInstall.yml app-StartServer.yml", upload_path: "/home/vagrant/apl.sh"
77
config.vm.network "forwarded_port", guest: 80, host: 6080, auto_correct: true
88
end

bin/install-gauntlt.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
2-
# Install rvm
2+
# Install gauntlt using rvm
3+
34
# Set bash unofficial strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/
45
set -euo pipefail
56
IFS=$'\n\t'
@@ -10,6 +11,11 @@ ${DEBUG:-false} && set -vx
1011
# and http://wiki.bash-hackers.org/scripting/debuggingtips
1112
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
1213

14+
# Credit to http://stackoverflow.com/a/246128/424301
15+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
16+
#shellcheck disable=SC1090
17+
. "$DIR/common.sh"
18+
1319
function quick_yum_install() {
1420
declare package
1521
package=${1?"You must specify a package to install"}
@@ -25,15 +31,30 @@ if [[ ! -f /etc/profile.d/rvm.sh ]]; then
2531
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
2632
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
2733
curl -L get.rvm.io | bash -s stable
34+
# rvm hates the bash options -eu
35+
set +eu
2836
#shellcheck disable=SC1091
2937
source /etc/profile.d/rvm.sh
3038
rvm reload
3139
rvm requirements run
32-
rvm install 2.6.0
40+
else
41+
echo "rvm already installed"
3342
fi
43+
# rvm hates the bash options -eu
44+
set +eu
45+
#shellcheck disable=SC1091
46+
source /etc/profile.d/rvm.sh
47+
rvm reload
48+
rvm install 2.6.0
3449
rvm alias create default ruby-2.6.0
3550
rvm list
3651
rvm use 2.6 --default
52+
set -eu
53+
if is_ec2; then
54+
usermod -a -G rvm centos
55+
else
56+
usermod -a -G rvm vagrant
57+
fi
3758
ruby --version
3859

39-
gem list gauntlt || gem install gauntlt
60+
gem list gauntlt || gem install gauntlt --no-ri --no-rdoc

0 commit comments

Comments
 (0)