summaryrefslogtreecommitdiff
path: root/bin/lut.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/lut.sh')
-rwxr-xr-xbin/lut.sh43
1 files changed, 33 insertions, 10 deletions
diff --git a/bin/lut.sh b/bin/lut.sh
index add6c20..ff6f09a 100755
--- a/bin/lut.sh
+++ b/bin/lut.sh
@@ -20,6 +20,7 @@ killed () {
leap vm stop upgrade
echo "VMs stopped, but not removed. Will still incur charges, please remove them if you are not using them anymore."
+ cleanup 3
}
trap "{ killed ; }" TERM INT ABRT QUIT
@@ -69,20 +70,24 @@ switch () {
}
cleanup () {
-# leap vm stop upgrade
- #rm -rf $workdir
+ # leap vm rm upgrade
+ rm -rf $workdir
exit $1
}
start_nodes () {
echo "Starting all the VMs, you should go do something else now, this will take a while..."
# monarch: monitor, tor hidden service, webapp
+ leap vm add monarch
# dogface: couchdb/soledad
+ leap vm add dogface
# hairstreak: mx
+ leap vm add hairstreak
# checkerspot: openvn, need a gateway address to do openvpn, disabled
# spicebush: static node, with hidden service
+ leap vm add spicebush
# cloak: tor exit
- leap vm start upgrade
+ leap vm add cloak
}
case "$1" in
@@ -102,16 +107,34 @@ else
get_cli $cli_git master
get_cli $cli_git develop
cd $provider_dir
- ln -s platform_$from_version $platform_link
+ switch $to_version
start_nodes
- $cli_from/bin/leap node init upgrade
- echo "Nodes initialized with old platform"
- $cli_from/bin/leap -v2 deploy upgrade
- echo "Nodes deployed with old version of platform"
+ # because 0.8 doesn't have the right support, we need
+ # to use the new version to do the node init
+ # switch $from_version
+ # $cli_from/bin/leap -v2 node init upgrade
+ $cli_to/bin/leap -v2 node init upgrade
+ if [ $? -ne 0 ]; then
+ cleanup 1
+ else
+ echo "Nodes initialized with old platform"
+ fi
+ # temporary
+ switch $from_version
+ $cli_from/bin/leap -v2 --yes deploy upgrade
+ if [ $? -ne 0 ]; then
+ cleanup 1
+ else
+ echo "Nodes deployed with old version of platform"
+ fi
$cli_from/bin/leap test
switch $to_version
- $cli_to/bin/leap -v2 deploy upgrade
- echo "Nodes deployed with new version of platform"
+ $cli_to/bin/leap -v2 --yes deploy upgrade
+ if [ $? -ne 0 ]; then
+ cleanup 1
+ else
+ echo "Nodes deployed with new version of platform"
+ fi
$cli_to/bin/leap test
cleanup 0