comparison master/bin/internal/vmss_setup.sh @ 7:a7637c994964

cull_network.py, parse_load_balance.py, vmss_setup.sh x 2, vmss_create.sh: From kenneth, slight mods in some cases share.sh: Distribute files to workers wrun.sh, invoke.sh: From last year, slight mods
author Henry S. Thompson <ht@markup.co.uk>
date Sun, 30 Sep 2018 20:53:43 +0000
parents
children 68cca895e872
comparison
equal deleted inserted replaced
6:a3b30e707e83 7:a7637c994964
1 #!/bin/bash
2 set -e
3 #Arguments are instance port host --resource-group $resource --name $name
4 instance=$1
5 port=$2
6 host=$3
7 shift 3
8 #Accept host keys :-(
9 if ! ssh-keyscan -p $port $host >>~/.ssh/known_hosts 2>/dev/null; then
10 echo $host:$port does not seem to be up, might be overprovisioned 1>&2
11 exit 1
12 fi
13 #Copy azure credentials over and make delete/deallocate commands
14 (echo $@ --instance-ids $instance; cd ~; tar c .azure) |ssh -o ConnectTimeout=5 -p $port $host 'read a; echo -e '\''#!/bin/bash\n'\''az vmss deallocate $a >deallocate && echo -e '\''#!/bin/bash\n'\''az vmss delete-instances $a >delete && chmod +x deallocate delete && tar x && sudo mv deallocate delete /bin'
15 echo ssh -p $port $host " #id $instance"