Merge lp:~dweaver/orange-box/orange-box-orange-box-add-virtual-nodes-fix-for-maas1.7 into lp:orange-box

Proposed by Darryl Weaver
Status: Merged
Merged at revision: 511
Proposed branch: lp:~dweaver/orange-box/orange-box-orange-box-add-virtual-nodes-fix-for-maas1.7
Merge into: lp:orange-box
Diff against target: 27 lines (+11/-1)
1 file modified
usr/bin/orange-box-add-virtual-nodes (+11/-1)
To merge this branch: bzr merge lp:~dweaver/orange-box/orange-box-orange-box-add-virtual-nodes-fix-for-maas1.7
Reviewer Review Type Date Requested Status
Dustin Kirkland  Pending
Review via email: mp+239628@code.launchpad.net

Description of the change

Fix for orange-box-add-virtual-nodes for MAAS 1.7 environments to add fast-path-installer tag explicitly.

To post a comment you must log in.
511. By Darryl Weaver

Adding vnc graphics support for created virtual machines in orange-box-add-virtual-nodes

Revision history for this message
Darryl Weaver (dweaver) wrote :

Also added vnc graphics for created virtual machines.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'usr/bin/orange-box-add-virtual-nodes'
2--- usr/bin/orange-box-add-virtual-nodes 2014-10-01 22:34:08 +0000
3+++ usr/bin/orange-box-add-virtual-nodes 2014-10-25 01:45:44 +0000
4@@ -40,12 +40,22 @@
5 maas admin tags new name=bootstrap || true
6 maas admin tags new name=neutron || true
7
8+# Mark all nodes to be fast path installed
9+# Support MAAS 1.5, and 1.6
10+maas_ver=$(dpkg -l maas | tail -n1 | awk '{print $3}')
11+if dpkg --compare-versions $maas_ver lt 1.6; then
12+ maas admin tags new name='use-fastpath-installer' comment='fp' "definition=true()" || true
13+else
14+ maas admin tags new name='use-fastpath-installer' comment='fp' || true
15+fi
16+
17+
18 for i in $(seq 0 2 | sort -r); do
19 hostname="node0vm${i}.maas"
20 virsh destroy $hostname || true
21 virsh undefine $hostname || true
22 echo "INFO: Installing virtual machine"
23- virt-install --debug --name $hostname --ram 4096 --disk=path=/var/lib/orange-box/${hostname}-1.img,size=20 --disk=path=/var/lib/orange-box/${hostname}-2.img,size=2 --vcpus=2 --os-type=linux --pxe --network=bridge=br0 --network=bridge=br0 --boot network || true
24+ virt-install --debug --name $hostname --ram 4096 --disk=path=/var/lib/orange-box/${hostname}-1.img,size=20 --disk=path=/var/lib/orange-box/${hostname}-2.img,size=2 --vcpus=2 --os-type=linux --pxe --network=bridge=br0 --network=bridge=br0 --boot network --video=cirrus --graphics vnc|| true
25 virsh console $hostname || true
26 virsh autostart $hostname
27 mac=$(virsh dumpxml $hostname | python -c 'import sys, lxml.etree; print list(lxml.etree.parse(sys.stdin).iter("mac"))[0].get("address")')

Subscribers

People subscribed via source and target branches