#!/bin/bash
# Usage . makeWorker.sh name
# Misnamed -- it assumes you've already done
# az vm create -n [name] -g cc --image Debian --size Standard_...
# Source this to get the worker name set to its IP address
name=$1
ip=$(az vm list-ip-addresses -g cc -n $name|egrep -o '"ipAddress": ".*"' | cut -f 2 -d ' ' | tr -d \")
export $name=$ip
echo $name=$ip
setupTemplate.sh $ip
