Domesticating MAAS, Juju and Openstack on VMWare Fusion 5
September 30, 2013 1 Comment
Introduciton
Are you wrestling with getting MAAS or Metal-as-a-Service up and running with Juju and Openstack in a private cloud environment? It’s much easier than you think. VMWare Fusion provides an excellent host layer for functional testing. There are many advantages including cost, flexibility in deployment models, and ease of use to name a few. The goal of this guide is to provide a means to create a simple virtualized Openstack environment running on a single physical host such as a Mac Pro. The deployment is relatively simple with no High Availability. Simulated High Availability on VMWare Fusion or Workstation will be a future topic. Make note this set up is purely for a functional model and has never been tested for performance. For more comprehensive reading on Openstack architecture and layout, I recommend Piotr Siwczak’s discussion on Openstack deployment Topologies.
First, I’ll outline a few assumptions based on my test set up. I’ll cover network aspects, then the hardware assumptions, then software requirements for the host system’s set up. Then it’s time to roll our collective sleeves up and jump in.
Network Assumptions
The network model chosen for this lab deployment included three networks from the MAAS perspective. Additional virtual networks necessary for Openstack are discussed later.
- There are no firewalls between the internet and the MAAS nodes. You may have one, especially in your production network. Configure appropriately.
- IP forwarding is used to route packets between the virtual machines and the LAN on the MAAS controller node.
- Two separate networks are available. Those networks are physically connected and available to the host via separate wired interfaces. They shall be known as eth0 and eth1.
- The MAAS root node has internet access available and is attached to both your LAN on eth0 (with internet access available) and your virtual network on eth1. All MAAS nodes will use access the internet via the MAAS Regional Controller node using IP forwarding.
- MAAS controls DHCP and DNS on its own network on eth1 on the MAAS Regional Controller node and distributes IP addresses on eth0 on the MAAS nodes.
- The LAN segment for the MAAS Regional Controller has its own DHCP/DNS.
- Only the MAAS Regional Controller has static IP addressing. It is only necessary to statically set the eth1 (MAAS network).
- The Quantum Gateway node’s eth1 interface faces a separate network segment independent of the LAN (which is usually internet facing, but is not a requirement). It does not get statically configured with an IP address. Quantum handles the configuration.
The first table below shows how the network is constructed on the MAAS virtual nodes. Since MAAS controls DHCP there is no guarantee of sequential or permanent IP addressing.
MAAS Layer
MAAS can be configured to handle DHCP and DNS. Alternatively, it can be configured to do one or the other or neither. The table below shows which networks interfaces are attached and the server types.
Assigned Hostname |
Interface |
IP Address LAN |
Interface |
IP Address VMNET3 | |
maas-ctrl |
eth1 |
192.168.1.100 |
eth0 |
172.16.118.1 |
MAAS Regional Controller. |
maas-node0 |
eth0 |
172.16.118.x |
N/A |
N/A |
Mysql, Keystone, Rabbitmq-server, Juju-gui |
maas-node1 |
eth0 |
172.16.118.x |
N/A |
N/A |
Nova Cloud-controller node (Nova api) |
maas-node2 |
eth0 |
172.16.118.x |
N/A |
N/A |
Glance (image management) |
maas-node3 |
eth0 |
172.16.118.x |
N/A |
N/A |
Cinder Node (storage) |
maas-node4 |
eth0 |
172.16.118.x |
N/A |
N/A |
Nova-compute / Dashboard node |
maas-node5 |
eth0 |
172.16.118.x |
eth1 |
10.1.10.x |
Quantum gateway. Connection to ext_net. |
The next diagram describes the MAAS layer layout along with the structure of the virtual machines with respect to the networks.
Juju Layer
Juju doesn’t have it’s own layer per-se. However, the nodes do receive IP addresses and names via MAAS controlled DHCP/DNS.
Compare the Juju layout diagram above to the juju-gui below to understand the logical layout and host process distribution.
Openstack Layer
Quantum / Neutron networking configuration is discussed later. It’s mentioned only for completing the topic of network layers. For a more complete discussion of network over with GRE tunneling with a slightly different approach in deployment see the reference link at the end of the guide: Per-tenant Routers with Private Networks. After configuring Quantum networking, this is the network from the Openstack perspective.
Hardware Assumptions
The server used for this set up was a Mac Pro Mid 2010 with 2 x 2.4 Quad-Core Intel Xeon processors and 64 GB of RAM. Two gigabit network interfaces come standard with the Mac Pro.
Software Assumptions
The tested set up includes the following software components.
Mac OSX LION | 10.8.5 |
VMWare Fusion | 5.03 |
Ubuntu Precise MAAS Regional Controller |
12.0.4.2 (3.8.0-29-generic) |
Ubuntu Precise Cloud VMs |
12.0.4.3 |
Juju | 1.14.1-0ubuntu1~ubuntu12.04.1~juju1 |
Juju-gui | 1.14.1-0ubuntu1~ubuntu12.04.1~juju1 |
MAAS | 1.2+bzr1373+dfsg-0ubuntu1~12.04.2 |
mysql | cs:precise/mysql-27 |
keystone | cs:precise/keystone-18 |
rabbitmq-server | cs:precise/rabbitmq-server-14 |
nova-compute | cs:precise/nova-compute-13 |
glance | cs:precise/glance-19 |
cinder | cs:precise/cinder-9 |
nova-cloud-controller | cs:precise/nova-cloud-controller-14 |
quantum-gateway | cs:precise/quantum-gateway-4 |
openstack-dashboard | cs:precise/openstack-dashboard-9 |
Configuring VMWare Fusion
Configuring Fusion for the task of hosting the lab couldn’t be easier.
The first step is to create a custom network (otherwise known as a host-only network) and connect the host to the network. Strictly speaking, connecting the host mac to the networking isn’t necessary but it does save some time in configuration. In the example below, I created vmnet3 to be the MAAS network. All MAAS nodes will use this network for PXE boot and inter-host communication.
Under VMWare Fusion Preferences, choose Network. Add a Custom interface selecting Connect the host Mac to this network as shown.
It’s worth noting that since we configured Fusion to Connect the host Mac to this network, no additional routing set up is necessary for the host. However, other hosts require per host (alternatively the LAN router could be configured similarly) routing as shown.
sudo route add -net 172.16.118.0 netmask 255.255.255.0 gw 192.168.1.50 dev eth0
Setting Up MAAS
Time to start creating the virtual machines. For simplicity’s sake, VMs were created with similar specifications. After setting up the first host, you can clone the first VM for subsequent VMs tweaking individual VM resource requirements after the cloning process. MAAS’s tagging feature in combination with Juju’s constraints parameter were used to control the process layout.
A total of seven (7) virtual machines are required for this set up. Although further consolidation of processes reducing the number of nodes (VMs) is definitely possible, this was the chosen set up for this guide. Additionally, based on individual needs, including performance and quantity and size of Openstack nodes, the resources of the VM nodes could be increased or reduced in size. The resource table is presented, then a short discussion on the reasoning follows on a per-node basis.
Virtual Machine |
Interfaces |
RAM |
Primary Drive Size |
Secondary Drive Size |
maas-ctrl |
eth0, eth1 |
2G |
20Gb |
N/A |
maas-node0 |
eth0 |
2G |
20Gb |
N/A |
maas-node1 |
eth0 |
2G |
20Gb |
N/A |
maas-node2 |
eth0 |
2G |
20Gb |
N/A |
maas-node3 |
eth0 |
2G |
20Gb |
60Gb |
maas-node4 |
eth0 |
32G |
20Gb |
N/A |
maas-node5 |
eth0, eth1 |
2G |
20Gb |
N/A |
- maas-ctrl – 20Gb and 2G ram proved sufficient for all of my testing. This node requires two (2) network interfaces.
- mass-node0 – 20Gb and 2G ram proved sufficient for all of my testing. This node hosts the mysql, keystone and rabbitmq-server. It may benefit from a performance standpoint from an increased ram allocation. This was not tested.
- mass-node1 – 20Gb and 2G ram proved sufficient for all of my testing. This is the nova-cloud controller.
- mass-node2 – 20Gb and 2G ram proved sufficient for the Glance node.
Setting Up JuJu
Setting Up Openstack
Extra Credit: Setting up VNC
Extra Credit: Libvirt on Mac OSX (virsh)
References
Excellent sources of information. The guide borrows heavily from these sources. They were the basis for this article. I tried to credit as many people as I reached out to. Feel free to call me on blatant plagiarism or stealing of diagrams.
Ubuntu MAAS documentation
MAAS Install Guide (Security Team)
Juju Documentation
Juju Openstack HA Deployment Guide
Openstack Documentation
Per-tenant Routers with Private Networks
Openstack HA Deployment Strategies
Credits
Thank you for the above and beyond the call of duty help from the good people at Ubuntu.
marcoceppi
jamespage
kentb
jcastro
smoser
roaksoax
Recent Comments