@@ -7,30 +7,33 @@ logline() {
7
7
}
8
8
9
9
_setup () {
10
- export name=$( basename ${0% .bash} )
11
- export footlooseconfig=footloose-$name .yaml
10
+ export name=$( basename ${0% .bash} )
11
+ export footlooseconfig=footloose-$name .yaml
12
12
13
13
echo " ==> SETUP"
14
14
logline " creating footloose config ..."
15
- CLUSTER_NAME=$name \
16
- LINUX_IMAGE=quay.io/footloose/ubuntu18.04 \
17
- MKE_BINARY=${MKE_BINARY:- $(readlink -f ../ mke)} \
18
- envsubst < ${footlooseconfig} .tpl > $footlooseconfig
15
+ CLUSTER_NAME=$name \
16
+ LINUX_IMAGE=quay.io/footloose/ubuntu18.04 \
17
+ MKE_BINARY=${MKE_BINARY:- $(readlink -f ../ mke)} \
18
+ envsubst < ${footlooseconfig} .tpl > $footlooseconfig
19
+
20
+ logline " starting to create footloose nodes ..."
21
+ > /dev/null 2>&1 ./bin/footloose create --config $footlooseconfig
19
22
20
- logline " starting to create footloose nodes ..."
21
- > /dev/null 2>&1 ./bin/footloose create --config $footlooseconfig
22
23
logline " create mke groups on nodes ..."
23
- > /dev/null 2>&1 ./bin/footloose ssh --config $footlooseconfig root@node0 " addgroup --system mke"
24
+ > /dev/null 2>&1 ./bin/footloose ssh --config $footlooseconfig root@node0 " addgroup --system mke"
24
25
> /dev/null 2>&1 ./bin/footloose ssh --config $footlooseconfig root@node1 " addgroup --system mke"
25
26
}
26
27
27
28
_cleanup () {
28
29
echo " "
29
30
echo " ==> CLEANUP"
30
31
set +e
32
+
31
33
logline " cleaning up footloose cluster"
32
- > /dev/null 2>&1 ./bin/footloose delete --config $footlooseconfig
33
- > /dev/null 2>&1 rm -f $footlooseconfig
34
+ > /dev/null 2>&1 ./bin/footloose delete --config $footlooseconfig
35
+ > /dev/null 2>&1 rm -f $footlooseconfig
36
+
34
37
logline " pruning docker volumes"
35
- > /dev/null 2>&1 docker volume prune -f
38
+ > /dev/null 2>&1 docker volume prune -f
36
39
}
0 commit comments