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
=== modified file 'usr/bin/orange-box-add-virtual-nodes'
--- usr/bin/orange-box-add-virtual-nodes 2014-10-01 22:34:08 +0000
+++ usr/bin/orange-box-add-virtual-nodes 2014-10-25 01:45:44 +0000
@@ -40,12 +40,22 @@
40maas admin tags new name=bootstrap || true40maas admin tags new name=bootstrap || true
41maas admin tags new name=neutron || true41maas admin tags new name=neutron || true
4242
43# Mark all nodes to be fast path installed
44# Support MAAS 1.5, and 1.6
45maas_ver=$(dpkg -l maas | tail -n1 | awk '{print $3}')
46if dpkg --compare-versions $maas_ver lt 1.6; then
47 maas admin tags new name='use-fastpath-installer' comment='fp' "definition=true()" || true
48else
49 maas admin tags new name='use-fastpath-installer' comment='fp' || true
50fi
51
52
43for i in $(seq 0 2 | sort -r); do53for i in $(seq 0 2 | sort -r); do
44 hostname="node0vm${i}.maas"54 hostname="node0vm${i}.maas"
45 virsh destroy $hostname || true55 virsh destroy $hostname || true
46 virsh undefine $hostname || true56 virsh undefine $hostname || true
47 echo "INFO: Installing virtual machine"57 echo "INFO: Installing virtual machine"
48 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 || true58 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
49 virsh console $hostname || true59 virsh console $hostname || true
50 virsh autostart $hostname60 virsh autostart $hostname
51 mac=$(virsh dumpxml $hostname | python -c 'import sys, lxml.etree; print list(lxml.etree.parse(sys.stdin).iter("mac"))[0].get("address")')61 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