Add support for Azure instances in testnet creation (#3905)

* Add support for Azure instances in testnet creation

* Fixup

* Fix shellcheck errors

* More shellcheck and cleanup node creation and deletion

* More shellcheck and cleanup node creation and deletion

* Fixup instance wait API

* Fix revieew comments and add GPU installation extension
This commit is contained in:
Dan Albert
2019-04-23 16:41:45 -06:00
committed by GitHub
parent ab11327e34
commit 4e7e5ace9d
7 changed files with 354 additions and 6 deletions

13
net/scripts/ec2-provider.sh Normal file → Executable file
View File

@ -340,6 +340,19 @@ cloud_DeleteInstances() {
done
}
#
# cloud_WaitForInstanceReady [instanceName] [instanceIp] [instanceZone] [timeout]
#
# Return once the newly created VM instance is responding. This function is cloud-provider specific.
#
cloud_WaitForInstanceReady() {
declare instanceName="$1"
declare instanceIp="$2"
# declare instanceZone="$3" # unused
declare timeout="$4"
timeout "${timeout}"s bash -c "set -o pipefail; until ping -c 3 $instanceIp | tr - _; do echo .; done"
}
#
# cloud_FetchFile [instanceName] [publicIp] [remoteFile] [localFile]