-
Notifications
You must be signed in to change notification settings - Fork 4
/
makeitso.sh
executable file
·49 lines (38 loc) · 1.04 KB
/
makeitso.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -ex
function print() {
echo [33m"$@"[0m
}
function build-with-retry() {
print "=== Building $@ ==="
n=0
until [ $n -ge 3 ]
do
bin/atlantis-aquarium build $@ && return
n=$[$n+1]
print "=== Build $@ failed, will retry in 10 second ==="
sleep 10
done
print "=== BUILD $@ FAILED !!! ==="
return -1
}
print "==== git clone atlantis components ===="
bin/gather-files
print "==== Bringing vagrant up ===="
vagrant up $aquarium
vagrant ssh $aquarium -c 'bin/ruby-upgrade.sh'
print "==== Provisioning ===="
bin/atlantis-aquarium provision
print "==== Building and starting services ===="
for component in base-aquarium-image zookeeper registry builder manager router supervisor
do
build-with-retry $component
done
print "==== Building base layers ===="
bin/atlantis-aquarium build-layers --base
sleep 5
bin/atlantis-aquarium build-layers --builder
print "==== Registering components ===="
bin/atlantis-aquarium register-components
print "==== Spinning up sample apps ===="
bin/atlantis-aquarium base-cluster