Using MaaS and Juju to deploy Openstack on Ubuntu is pretty easy to do, however often requires a large number of machine sitting around in order to host everything. Fortunately it is possible to run your Juju controller alongside your MaaS machine using virsh. For the purpose of this guide we will be using MaaS 2.0 and Juju 2.0.

First you will need to install MaaS and get it working. In my case I have 2 interfaces, my private interface which is managed by MaaS and my public interface which is managed by my router. My initial config looked as follows:

# The loopback network interface

auto lo

iface lo inet loopback

# MaaS network interface

auto eth0

iface eth0 inet static



# The primary network interface

auto eth1

iface eth1 inet dhcp

This config worked fine for commissioning machines inside MaaS, however it failed when I went to create a virtual machine on my MaaS node to run Juju. In order to get virtual machines working I had to do the following:

Install virsh and other required packages:

sudo apt-get -y install libvirt-bin linux-image-extra-virtual kvm virt-manager

Add the MaaS user to the libvirtd group:

sudo usermod -G libvirtd -a maas

Update my networking config to look as follows:

# The loopback network interface
auto lo
iface lo inet loopback
iface enp9s0f0 inet manual

# The primary network interface
auto enp9s0f1
iface enp9s0f1 inet dhcp
auto br0
iface br0 inet static
    bridge_ports enp9s0f0

After updating your config, reboot the MaaS machine! This step is very important as networking will not work until this step is completed.

Finally, I was then able to spin up a virtual machine using the following command:

virt-install \
–name Juju-Controller-Node \
–ram 8192 \
–disk path=/var/kvm/images/Juju-Controller-Node.img,size=150 \
–network=bridge:br0 \
–vcpus 4 \
–os-type linux \
–os-variant ubuntu16.04 \
–graphics none \
–pxe \
–accelerate \
–boot network

Success! The node then showed up in MaaS. I then configured the power settings on the newly added machine to look as follows:

Screen Shot 2016-08-18 at 12.15.06 PM
I was then able to commission and deploy the node successfully.