<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Openstack on Chris J Arges</title><link>https://chrisarges.net/tags/openstack/</link><description>Recent content in Openstack on Chris J Arges</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 16 Jun 2014 10:16:00 -0700</lastBuildDate><atom:link href="https://chrisarges.net/tags/openstack/index.xml" rel="self" type="application/rss+xml"/><item><title>manually deploying openstack with a virtual maas on ubuntu trusty (part 2)</title><link>https://chrisarges.net/posts/2014-06-16-manually-deploying-openstack-with_16/</link><pubDate>Mon, 16 Jun 2014 10:16:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-06-16-manually-deploying-openstack-with_16/</guid><description>In the previous post, I went over how to setup a virtual MAAS environment using KVM [&lt;a href="http://dinosaursareforever.blogspot.com/2014/06/manually-deploying-openstack-with.html"&gt;1&lt;/a&gt;]. Here I will explain how to setup Juju for use with this environment.&#10;&#10;&lt;br /&gt;&lt;br /&gt;For this setup, we’ll use the maas-server as the juju client to interact with the cluster.&lt;br /&gt;&lt;br /&gt;This guide was very useful:&lt;br /&gt;&lt;a href="https://maas.ubuntu.com/docs/juju-quick-start.html"&gt;https://maas.ubuntu.com/docs/juju-quick-start.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Update to the latest stable tools:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-add-repository ppa:juju/stable&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;/pre&gt;Next we want to setup juju on the host machine.&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install juju-core&lt;/pre&gt;Create juju environment file.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju init&lt;/pre&gt;Generate a specific MAAS API key by using the following link:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/account/prefs/"&gt;http://192.168.100.10/MAAS/account/prefs/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;write the following to ~/.juju/environments.yaml replacing ‘maas api key’ with what was generated above:&lt;br /&gt;&lt;pre class="prettyprint"&gt;default: vmaas&lt;br /&gt;environments:&lt;br /&gt;&amp;nbsp; vmaas:&lt;br /&gt;&amp;nbsp; &amp;nbsp; type: maas&lt;br /&gt;&amp;nbsp; &amp;nbsp; maas-server: 'http://192.168.100.10/MAAS'&lt;br /&gt;&amp;nbsp; &amp;nbsp; maas-oauth: '&amp;lt;maas api key&amp;gt;'&lt;br /&gt;&amp;nbsp; &amp;nbsp; admin-secret: ubuntu # or something generated with uuid&lt;br /&gt;&amp;nbsp; &amp;nbsp; default-series: trusty&lt;br /&gt;&lt;/pre&gt;Now let’s sync tools and bootstrap a node. Note, if you have multiple juju environments then you may need to specify ‘-e vmaas’ if it isn’t your default environment.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju sync-tools&lt;br /&gt;juju bootstrap # add --show-log --debug &amp;nbsp;for more output&lt;br /&gt;&lt;/pre&gt;See if it works by using the following command:&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju status&lt;/pre&gt;You should see something similar to the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;~$ juju status&lt;br /&gt;environment: vmaas&lt;br /&gt;machines:&lt;br /&gt;&amp;nbsp; "0":&lt;br /&gt;&amp;nbsp; &amp;nbsp; agent-state: down&lt;br /&gt;&amp;nbsp; &amp;nbsp; agent-state-info: (started)&lt;br /&gt;&amp;nbsp; &amp;nbsp; agent-version: 1.18.4&lt;br /&gt;&amp;nbsp; &amp;nbsp; dns-name: maas-node-0.maas&lt;br /&gt;&amp;nbsp; &amp;nbsp; instance-id: /MAAS/api/1.0/nodes/node-e41b0c34-e1cb-11e3-98c6-5254001aae69/&lt;br /&gt;&amp;nbsp; &amp;nbsp; series: trusty&lt;br /&gt;services: {}&lt;br /&gt;&lt;/pre&gt;Now we can do a test deployment with the juju-gui to our bootstrap node.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju deploy juju-gui&lt;/pre&gt;While it is deploying you can type the following to get a log.&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju debug-log&lt;/pre&gt;I wanted to be able to access the juju-gui from an ‘external’ address, so I edited /etc/networking/interfaces on that machine to have a static address:&lt;br /&gt;&lt;pre class="prettyprint"&gt;juju ssh 0&lt;/pre&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/networking/interfaces&lt;br /&gt;&lt;/pre&gt;Add the following to the file:&lt;br /&gt;&lt;pre class="prettyprint"&gt;auto eth0&lt;br /&gt;iface eth0 inet static&lt;br /&gt;&amp;nbsp; address 192.168.100.11&lt;br /&gt;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&lt;/pre&gt;Bring that interface up.&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo ifup eth0&lt;/pre&gt;The password can be found here on the host machine:&lt;br /&gt;&lt;pre class="prettyprint"&gt;grep pass .juju/environments/vmaas.jenv&lt;/pre&gt;If you used the above configurations it should be ‘ubuntu’.&lt;br /&gt;&lt;br /&gt;Log into the service so you can monitor the status graphically during the deployment.&lt;br /&gt;&lt;br /&gt;If you get errors saying that servers couldn’t be reached you may have DNS configuration or proxy issues. You’ll have to first resolve these before using Juju. I’ve had is intermittent network issues in my lab. In order to workaround those physical issues you may have to retry the bootstrap, or increase the timeout values in ~/.juju/environments.yaml to use the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;nbsp; bootstrap-retry-delay: 5&lt;br /&gt;&amp;nbsp; bootstrap-timeout: 1200&lt;br /&gt;&lt;/pre&gt;Now you’re cooking with juju.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://dinosaursareforever.blogspot.com/2014/06/manually-deploying-openstack-with.html"&gt;http://dinosaursareforever.blogspot.com/2014/06/manually-deploying-openstack-with.html&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>manually deploying openstack with a virtual maas on ubuntu trusty (part 1)</title><link>https://chrisarges.net/posts/2014-06-13-manually-deploying-openstack-with/</link><pubDate>Fri, 13 Jun 2014 15:05:00 -0700</pubDate><guid>https://chrisarges.net/posts/2014-06-13-manually-deploying-openstack-with/</guid><description>The goal of this new few series of posts is to be able to setup virtual machines to simulate a real-world openstack deployment using maas and juju. This goes through setting up a maas-server in a VM as well as setting up maas-nodes in VMs and getting them enlisted/commissioned into the maas-server. Next juju is configured to use the maas cluster. Finally, openstack is deployed using juju.&#10;&#10;&lt;br /&gt;&lt;div&gt;&lt;h2&gt;Overview&lt;/h2&gt;&lt;div&gt;&lt;h3&gt;Requirements&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;Ideally, a large server with 16 cores, 32G memory, 500G disk. Obviously you can tweak this setup to work with less; but be prepared to lock up lesser machines. In addition your host machine needs to be able to support nested virtualization.&lt;br /&gt;&lt;h3&gt;&lt;span style="font-family: inherit;"&gt;Topology&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;Here is the basics of what will be setup for our virtual maas cluster. Each red box is a virtual machine with two interfaces. The eth0 interface in the VM connects to the NATed maas-internet network, while the VM’s eth1 interface connects to the isolated maas-management network. The number of maas-nodes should match what is required for the deployment; however it is simple enough to enlist more nodes later. I choose to use a public/private network in order to be more flexible later in how openstack networking is set up.&lt;br /&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://4.bp.blogspot.com/-AYzkHv8R9o8/U58a3XQcwsI/AAAAAAAAElk/ce9RZTfDSnE/s1600/Manually+Deploying+Openstack+on+A+Virtual+MaaS+with+Ubuntu+Trusty.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://4.bp.blogspot.com/-AYzkHv8R9o8/U58a3XQcwsI/AAAAAAAAElk/ce9RZTfDSnE/s1600/Manually+Deploying+Openstack+on+A+Virtual+MaaS+with+Ubuntu+Trusty.png" height="299" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2&gt;Setup Host Machine&lt;/h2&gt;&lt;h3&gt;Install Requirements&lt;/h3&gt;&lt;div&gt;First install all required programs on the host machine.&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install libvirt-bin qemu-kvm cpu-checker virtinst uvtool&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next, check if kvm is working correctly.&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;kvm-ok&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure nested KVM is enabled. (replace intel with amd if necessary)&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;cat /sys/module/kvm_intel/parameters/nested&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This should output Y, if it doesn’t do the following:&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;sudo modprobe -r kvm_intel&lt;br /&gt;sudo modprobe kvm_intel nested=1&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure $USER is added to libvirtd group.&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;groups | grep libvirtd&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ensure host machine has SSH keys generated and setup. (Be careful, don’t overwrite your existing keys)&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;[ -d ~/.ssh ] || ssh-keygen -t rsa&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h3&gt;Virtual Network Setup&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;This step can be done via virt-manager, but also done via command line using virsh.&lt;/div&gt;&lt;div&gt;Setup a virtual network which uses NAT to communicate with the host machine with the following parameters:&lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;Network Name: maas_internet&lt;br /&gt;Network: 192.168.100.0/24&lt;br /&gt;Do _not_ Enable DHCP.&lt;br /&gt;Forwarding to physical network; Any physical device; NAT&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;And setup an isolated virtual network the following parameters: &lt;/div&gt;&lt;div&gt;&lt;pre class="prettyprint"&gt;Network Name: maas_management&lt;br /&gt;Network: 10.10.10.0/24&lt;br /&gt;Do _not_ Enable DHCP.&lt;br /&gt;Isolated network;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;Install the MAAS Server&lt;/h2&gt;&lt;h3&gt;Download and Start the Install&lt;/h3&gt;Ensure you have virt-manager connected to the hypervisor.&lt;br /&gt;While there are many ways we can create virtual machines, I chose the tool uvtool because it works well in Trusty and quickly creates VM based on the Ubuntu cloud image.&lt;br /&gt;&lt;br /&gt;Sync the latest cloud trusty cloud image:&lt;br /&gt;&lt;pre class="prettyprint"&gt;uvt-simplestreams-libvirt sync release=trusty arch=amd64&lt;/pre&gt;&lt;br /&gt;Create a maas-server VM:&lt;br /&gt;&lt;pre class="prettyprint"&gt;uvt-kvm create maas-server release=trusty arch=amd64 --disk 20 --memory 2048 --password ubuntu&lt;/pre&gt;&lt;br /&gt;After it boots, shut it down and &amp;nbsp;edit the VM’s machine configuration.&lt;br /&gt;Make the two network interfaces connect to maas_internet and maas_management respectively.&lt;br /&gt;&lt;br /&gt;Now edit /etc/network/interfaces to have the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;auto eth0&lt;br /&gt;iface eth0 inet static&lt;br /&gt;&amp;nbsp; address 192.168.100.10&lt;br /&gt;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&amp;nbsp; gateway 192.168.100.1&lt;br /&gt;&amp;nbsp; dns-nameservers 10.10.10.10 192.168.100.1&lt;br /&gt;&lt;br /&gt;auto eth1&lt;br /&gt;iface eth1 inet static&lt;br /&gt;&amp;nbsp; address 10.10.10.10&lt;br /&gt;&amp;nbsp; netmask 255.255.255.0&lt;br /&gt;&amp;nbsp; dns-nameservers 10.10.10.10 192.168.100.1&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;And follow the instructions here:&lt;br /&gt;&lt;a href="http://maas.ubuntu.com/docs/install.html#pkg-install"&gt;http://maas.ubuntu.com/docs/install.html#pkg-install&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Which is essentially:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install maas maas-dhcp maas-dns&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h3&gt;MAAS Server Post Install Tasks&lt;/h3&gt;&lt;a href="http://maas.ubuntu.com/docs/install.html#post-install"&gt;http://maas.ubuntu.com/docs/install.html#post-install&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First let’s check if the webpage is working correctly. Depending on your installation, you may need to proxy into a remote host hypervisor before accessing the webpage. If you’re working locally you should be able to access this address directly (as the libvirt maas_internet network is already connected to your local machine).&lt;br /&gt;&lt;br /&gt;If you need to access it indirectly (and 192.168.100.0 is a non-conflicting subnet):&lt;br /&gt;&lt;pre class="prettyprint"&gt;sshuttle -D -r &amp;lt;hypervisor IP&amp;gt; 192.168.100.0/24&lt;/pre&gt;&lt;br /&gt;Access the following:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS"&gt;http://192.168.100.10/MAAS&lt;/a&gt;&lt;br /&gt;It should remind you that post installation tasks need to be completed.&lt;br /&gt;&lt;br /&gt;Let’s create the admin user from the hypervisor machine:&lt;br /&gt;ssh ubuntu@192.168.100.10&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo maas-region-admin createadmin --username=root --email="user@host.com" --password=ubuntu&lt;/pre&gt;&lt;br /&gt;If you want to limit the types of boot images that can be created you need to edit&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/maas/bootresources.yaml&lt;/pre&gt;&lt;br /&gt;Import boot images, using the new root user you created to log in:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/clusters/"&gt;http://192.168.100.10/MAAS/clusters/&lt;/a&gt;&lt;br /&gt;Now click 'import boot images' and be patient as it will take some time before these images are imported.&lt;br /&gt;&lt;br /&gt;Add a key for the host machine here:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/account/prefs/sshkey/add/"&gt;http://192.168.100.10/MAAS/account/prefs/sshkey/add/&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Configure the MAAS Cluster&lt;/h3&gt;Follow instructions here to setup cluster:&lt;br /&gt;&lt;a href="http://maas.ubuntu.com/docs/cluster-configuration.html"&gt;http://maas.ubuntu.com/docs/cluster-configuration.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/clusters/"&gt;http://192.168.100.10/MAAS/clusters/&lt;/a&gt;&lt;br /&gt;Click on ‘Cluster master’&lt;br /&gt;Click on edit interface eth1.&lt;br /&gt;&lt;pre class="prettyprint"&gt;Interface: eth1&lt;br /&gt;Management: DHCP and DNS&lt;br /&gt;IP: 10.10.10.10&lt;br /&gt;Subnet mask: 255.255.255.0&lt;br /&gt;Broadcast IP: 10.10.10.255&lt;br /&gt;Router IP: 10.10.10.10&lt;br /&gt;IP Range Low: 10.10.10.100&lt;br /&gt;IP Range High: 10.10.10.200&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Click Save Interface&lt;br /&gt;Ensure Nodes Auto-Enlist&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create a MAAS key and use that to log in:&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/account/prefs/"&gt;http://192.168.100.10/MAAS/account/prefs/&lt;/a&gt;&lt;br /&gt;Click on ‘+ Generate MAAS key’ and copy that down.&lt;br /&gt;&lt;br /&gt;Log into the maas-server, and then log into maas using the MAAS key:&lt;br /&gt;maas login maas-server http://192.168.100.10/MAAS&lt;br /&gt;&lt;br /&gt;Now set all nodes to auto accept:&lt;br /&gt;&lt;pre class="prettyprint"&gt;maas maas-server nodes accept-all&lt;/pre&gt;&lt;br /&gt;Setup keys on the maas-server so it can access the virtual machine host&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo mkdir -p ~maas&lt;br /&gt;sudo chown maas:maas ~maas&lt;br /&gt;sudo -u maas ssh-keygen&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the pubkey in ~maas/.ssh/id_rsa.pub to the virsh servers authorized_keys and to the maas SSH keys (&lt;a href="http://192.168.100.10/MAAS/account/prefs/sshkey/add/"&gt;http://192.168.100.10/MAAS/account/prefs/sshkey/add/&lt;/a&gt;)&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo cat /home/maas/.ssh/id_rsa.pub&lt;/pre&gt;&lt;br /&gt;Now install virsh to test a connection and allow the maas-server to control maas-nodes.&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo apt-get install libvirt-bin&lt;/pre&gt;&lt;br /&gt;Test the connection to the hypervisor (replace ubuntu with hypervisor host user)&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo -u maas virsh -c qemu+ssh://ubuntu@192.168.100.1/system list --all&lt;/pre&gt;&lt;h3&gt;Confirm Maas-Server Networking&lt;/h3&gt;Ensure we can reach important address via maas-server:&lt;br /&gt;&lt;pre class="prettyprint"&gt;host streams.canonical.com&lt;br /&gt;host store.juju.ubuntu.com&lt;br /&gt;host archive.ubuntu.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And that we can download charms if needed:&lt;br /&gt;&lt;pre class="prettyprint"&gt;wget https://store.juju.ubuntu.com/charm-info&lt;/pre&gt;&lt;h3&gt;Setup Traffic Forwarding&lt;/h3&gt;Setup maas-server to forward traffic from eth1 to eth0:&lt;br /&gt;&lt;br /&gt;You can type the following out manually or add it as an upstart script to ensure forwarding is setup properly each time add this file to &lt;b&gt;/etc/init/ovs-routing.conf &lt;/b&gt;(thanks to Juan Negron):&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;description "Setup NAT rules for ovs bridge"&lt;br /&gt;&lt;br /&gt;start on runlevel [2345]&lt;br /&gt;&lt;br /&gt;env EXTIF="eth0"&lt;br /&gt;env BRIDGE="eth1"&lt;br /&gt;&lt;br /&gt;task&lt;br /&gt;&lt;br /&gt;script&lt;br /&gt; echo "Configuring modules"&lt;br /&gt; modprobe ip_tables || :&lt;br /&gt; modprobe nf_conntrack || :&lt;br /&gt; modprobe nf_conntrack_ftp || :&lt;br /&gt; modprobe nf_conntrack_irc || :&lt;br /&gt; modprobe iptable_nat || :&lt;br /&gt; modprobe nf_nat_ftp || :&lt;br /&gt;&lt;br /&gt; echo "Configuring forwarding and dynaddr"&lt;br /&gt; echo "1" &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt; echo "1" &amp;gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;&lt;br /&gt; echo "Configuring iptables rules"&lt;br /&gt; iptables-restore &amp;lt;&amp;lt;-EOM&lt;br /&gt;*nat&lt;br /&gt;-A POSTROUTING -o ${EXTIF} -j MASQUERADE&lt;br /&gt;COMMIT&lt;br /&gt;*filter&lt;br /&gt;:INPUT ACCEPT [0:0]&lt;br /&gt;:FORWARD ACCEPT [0:0]&lt;br /&gt;:OUTPUT ACCEPT [0:0]&lt;br /&gt;-A FORWARD -i ${BRIDGE} -o ${EXTIF} -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;-A FORWARD -i ${EXTIF} -o ${BRIDGE} -j ACCEPT&lt;br /&gt;-A FORWARD -j LOG&lt;br /&gt;COMMIT&lt;br /&gt;EOM&lt;br /&gt;&lt;br /&gt;end script&lt;br /&gt;&lt;/pre&gt;Then start the service:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo service ovs-routing start&lt;/pre&gt;&lt;h3&gt;Setup Squid Proxy&lt;/h3&gt;Ensure squid proxy can access cloud images:&lt;br /&gt;&lt;pre class="prettyprint"&gt;echo "cloud-images.ubuntu.com" | sudo tee /etc/squid-deb-proxy/mirror-dstdomain.acl.d/98-cloud-images&lt;/pre&gt;&lt;pre class="prettyprint"&gt;sudo service squid-deb-proxy restart&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;Install MAAS Nodes&lt;/h2&gt;Now we can virt-install each maas-node on the hypervisor such that it automatically pxe boots and auto-enlists into MAAS. You can adjust the script below to create as many nodes as required. I’ve also simplified things by creating everything with dual nics and ample memory and hard drive space, but of course you could use custom machines per service. Compute-nodes need more compute power, ceph nodes will need more storage, and quantum-gateway will need dual nics. In addition you could specify raw disks instead of qcow2, or use storage pools; but in this case I wanted something simple that didn’t automatically use all the space it needed.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;for i in {0..19}; do&lt;br /&gt; virt-install \&lt;br /&gt; --name=maas-node-${i} \&lt;br /&gt; --connect=qemu:///system --ram=4096 --vcpus=1 --hvm --virt-type=kvm \&lt;br /&gt; --pxe --boot network,hd \&lt;br /&gt; --os-variant=ubuntutrusty --graphics vnc --noautoconsole --os-type=linux --accelerate \&lt;br /&gt;--disk=/var/lib/libvirt/images/maas-node-${i}.qcow2,bus=virtio,format=qcow2,cache=none,sparse=true,size=32 \&lt;br /&gt; --network=network=maas_internet,model=virtio \&lt;br /&gt; --network=network=maas_management,model=virtio &lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now each node needs to be manually enlisted with the proper power configuration.&lt;br /&gt;&lt;a href="http://maas.ubuntu.com/docs/nodes.html#virtual-machine-nodes"&gt;http://maas.ubuntu.com/docs/nodes.html#virtual-machine-nodes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;Host Name: maas-node-${i}.vmaas&lt;br /&gt;Power Type: virsh&lt;br /&gt;Power Address: qemu+ssh://ubuntu@192.168.100.1/system&lt;br /&gt;Power ID: maas-node-${i}&lt;br /&gt;&lt;/pre&gt;Here we need to match the machines to the mac address and update the power requirements. &amp;nbsp;You can get the mac addresses of each node by using the following on the hypervisor:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;virsh dumpxml maas-node-${i} | grep "mac addr"&lt;/pre&gt;&lt;br /&gt;Here is a script that helps automate some of this process, it can be run from the maas-server (replace USER ubuntu with the appropriate value) this matches mac address from virsh to the ones in maas and then sets up the power accordingly:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;import sys, os, libvirt&lt;br /&gt;from xml.dom.minidom import parseString&lt;br /&gt;os.environ['DJANGO_SETTINGS_MODULE'] = 'maas.settings'&lt;br /&gt;sys.path.append("/usr/share/maas")&lt;br /&gt;from maasserver.models import Node, Tag&lt;br /&gt;&lt;br /&gt;hhost = 'qemu+ssh://ubuntu@192.168.100.1/system'&lt;br /&gt;&lt;br /&gt;conn = libvirt.open(hhost)&lt;br /&gt;nodes_dict = {}&lt;br /&gt;domains = conn.listDefinedDomains()&lt;br /&gt;for node_name in domains:&lt;br /&gt; node = conn.lookupByName(node_name)&lt;br /&gt; node_xml = parseString(node.XMLDesc(0))&lt;br /&gt; node_mac1 = node_xml.getElementsByTagName('interface')[0].getElementsByTagName('mac')[0].getAttribute('address')&lt;br /&gt; nodes_dict[node_mac1] = node_name&lt;br /&gt;&lt;br /&gt;maas_nodes = Node.objects.all()&lt;br /&gt;for node in maas_nodes:&lt;br /&gt; try:&lt;br /&gt; system_id = node.system_id&lt;br /&gt; mac = node.get_primary_mac()&lt;br /&gt; node_name = nodes_dict[str(mac)]&lt;br /&gt; node.hostname = node_name&lt;br /&gt; node.power_type = 'virsh'&lt;br /&gt; node.power_parameters = { 'power_address':hhost, 'power_id':node_name }&lt;br /&gt; node.save()&lt;br /&gt; except: pass&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note you will need python-libvirt and run the above command with something like the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo -u maas ./setup-nodes.py&lt;/pre&gt;&lt;h3&gt;Setup Fastpath and Commission Nodes&lt;/h3&gt;You most likely want to use fast-path installer on nodes to speed up installation times. Set all nodes to use fastpath installer using another bulk action on the nodes.&lt;br /&gt;&lt;br /&gt;After you have all this done, click bulk action commission.&lt;br /&gt;You should see all your machines starting up if you set things up properly, give this some time. You should have all the nodes in the 'Ready' state in maas now!&lt;br /&gt;&lt;a href="http://192.168.100.10/MAAS/nodes/"&gt;http://192.168.100.10/MAAS/nodes/&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Confirm DNS setup&lt;/h3&gt;One point of trouble can be ensuring DNS is setup correctly. We can test this by starting a maas node and inside of that trying the following:&lt;br /&gt;&lt;pre class="prettyprint"&gt;dig streams.canonical.com&lt;br /&gt;dig store.juju.ubuntu.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If we can’t hit those, we’ll need to ensure the maas server is setup correctly.&lt;br /&gt;Go to: &lt;a href="http://192.168.100.10/MAAS/settings/"&gt;http://192.168.100.10/MAAS/settings/&lt;/a&gt;&lt;br /&gt;Enter the host machines upstream DNS if necessary here, it should setup the bind configuration file and restart that service. After this re-test.&lt;br /&gt;&lt;br /&gt;In addition I had to disable dnssec-validation for bind. Edit the following file:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo vim /etc/bind/named.conf.options&lt;/pre&gt;&lt;br /&gt;And change the following value:&lt;br /&gt;&lt;pre class="prettyprint"&gt;dnssec-validation no;&lt;/pre&gt;&lt;br /&gt;And restart the service:&lt;br /&gt;&lt;pre class="prettyprint"&gt;sudo service bind9 restart&lt;/pre&gt;&lt;br /&gt;Now you have a working virtual maas setup using the latest Ubuntu LTS!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://3.bp.blogspot.com/-nAwPK-nWeaA/U58a_Kf7v4I/AAAAAAAAEls/8JACkxWF4xU/s1600/Screenshot+from+2014-06-10+13:57:30.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://3.bp.blogspot.com/-nAwPK-nWeaA/U58a_Kf7v4I/AAAAAAAAEls/8JACkxWF4xU/s1600/Screenshot+from+2014-06-10+13:57:30.png" height="544" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description></item></channel></rss>