I just finished setting up a maas+juju cluster and while I'm waiting for some hardware, I did it all on a single machine inside KVM machines. It is a little involved and I'm probably going to write a blog at some point, but I'll try and get the gist of it here
The main thing to realise is MAAS "needs" 2 interfaces in order to
- connect to the internet
- manage the cluster of machines it connects to by self managing various services, the most important being DHCP+tftp for pxe boot
In the end, because I was having issues trying to bootstrap a juju controller inside a KVM machine with 2 nics, I ended up switching to a single interface for everything MAAS.
I just had to make sure I met the requirement of providing a network interface that:
- Had access to the internet
- Did not have any external DHCP (pretty sure this isn't a hard requirement, but it made things far easier)
To do that I created a KVM machine (but there's no reason you couldn't just use the host for this) to act as a gateway/router forwarding between 2 networks
- My external internet-facing, dhcp-enabled subnet
- A completely bare and unmanaged subnet (that MAAS now manages)
A great couple of resources for this are
Once this is setup, you can create a KVM with a single NIC bridged to the NIC connected to the unmanaged subnet and install MAAS on it.
Then connect all the machines you want MAAS to manage to the same unmanaged subnet and everything works perfectly.
Bonus, you be able to setup the gateway box as a firewall to your MAAS cluster.
I tried to cut back on many of the actually details, otherwise this would be an absolutely massive post. So feel free to ask clarifying questions if I left out too much detail.