7
ob_number=`hostname | cut -c 10- -`
9
maas admin tags new name=gateway || true
10
maas admin tags new name=controller || true
11
maas admin tags new name=compute || true
14
mac=$(arp -n | fgrep ${ob_number}.$i | awk '{print $3}')
15
system_id=$(maas admin nodes list mac_address=$mac | grep system_id | cut -d'"' -f4)
16
maas admin tag update-nodes "compute" add=$system_id || true
17
if [ $i -eq 12 ]; then
18
maas admin tag update-nodes "controller" add=$system_id || true
22
vmmac=$(virsh dumpxml node00vm1ob${ob_number}.maas | python -c 'import sys, lxml.etree; print list(lxml.etree.parse(sys.stdin).iter("mac"))[0].get("address")')
23
vmsystem_id=$(maas admin nodes list mac_address=$vmmac | grep system_id | cut -d'"' -f4)
24
maas admin tag update-nodes "gateway" add=$vmsystem_id || true
26
juju set-constraints tags=
27
time juju-deployer -d -c bundle.yaml
29
echo "Deployment finished"