No-bullshit-guide on installing local cloud infrastructure using Ubuntu 14.04 LTS MAAS, from a mere metal computer.
- 1 Access point / router with 4 ethernet ports, connected to an ADSL modem on 172.17.172.17
- 1 Windows 7 workstation on 172.17.172.100
- 1 target machine for MAAS Controller Server, will be set to 172.17.172.1
- 1 target machine for Server, will be set to 172.17.172.2
- 1 target machine for Ubuntu Desktop, will be set to DHCP
The Ubuntu MAAS configuration suppose to have separate physical MAAS Regional Controller Server and MAAS Cluster Controller Server. However in a small local cloud implementation we could install both server in a single physical MAAS Controller Server. The MAAS Controller Server could control several networks using each network adapter, so the local cloud network can be extended.
The bold underline text are variable that you can change according to your preferences.
Lets get it done:
- The Ubuntu Server Vanilla Installation
Download the Ubuntu 14.04 LTS Server 64 bit .iso file, write it to a disk. Just in case you read this at later date, the Ubuntu might already release other version so the link above wont be LTS. You’ll be able to find the 14.04 LTS version in releases.ubuntu.comI use ImgBurn to burn it on Windows 7.
- Check BIOS of the target machine (MAAS Server), disable all feature that you don’t need. You don’t need MAAS server to sing a song, disable audio, etc.
- Install DVD Ubuntu 14.04 Server 64 bit – Multiple server install with MAAS. Simply follow the user friendly Ubuntu installation wizard.
If you only have 1 network interface on the MAAS server:
Dont use DHCP, use static local IP: 172.17.172.1 / 255.255.255.0
Kill DHCP on the sub-net, use all static IP, so that the MAAS DHCP could control the network.
The best configuration is that you have 2 network interface on the MAAS server:
Use DHCP for the first network interface that is connected to your router/modem. That is for internet access and you wont disturb your existing subnet configuration. After the installation you can set static IP on the second network interface for the local cloud infrastructure sub-net.
- Update system
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade
- Install OpenSSH
I always use OpenSSH because we lack of monitor for each computer, so we need to remove the monitor once an installation complete, and rely on remote SSH from the main workstation (well actually its a Windows7 gaming platform). I use Bitvise SSH Client (Tunnelier) for its friendly user interface.
sudo apt-get install openssh
- Restart the computer:
sudo init 6
Troubleshooting: cannot boot from HDD due to UEFI or something else
sudo apt-get install grub sudo update-grub sudo init 6
- Confirm that MAAS already installed
dpkg --get-selections | grep maas ps -ef | grep maas
Should show you multiple MAAS process
Troubleshooting 1: update missing package
sudo apt-get update --fix-missing
Troubleshooting 2: reinstall MAAS
sudo apt-get purge maas maas-dhcp maas-dns sudo apt-get clean sudo apt-get update sudo apt-get upgrade sudo apt-get install maas maas-dhcp maas-dns
- The MAAS Region Controller: Create Region Controller Admin
sudo maas-region-admin createadmin –username=root –email@example.com
- Activate apikey for shell command access
Generate apikey for the maas-region-admin user:
sudo maas-region-admin apikey --username=root>maasapikey
Check that there is a new file maasapikey with some text inside:
Login to maas session:
sudo maas login my-maas-session http://172.17.172.1/MAAS/api/1.0 -|cat ~/maasapikey
Check that the session is logged-in properly
sudo maas my-maas-session node-groups list
If you want to see the different, try change the session my-maas-session with other session name, the result will be different.
- Download boot image for the first time
I use the command line for this because the MAAS Web UI don’t provide any feedback on the import process. You might wait for hours only to find from the process list (top / ps -ef) that the import was halted. The command line instruction will provide adequate information regarding the import progress.
Watch the download, it will take sometime. That is hours with poor mismanaged country ADSL connection. Retry if the import failed.
- Use browser to check the MAAS Web User Interface: http://172.17.172.1/MAAS (!!its all caps!!)[imagine an image here]
- The MAAS Cluster Controller: Setup managed interface
There are 3 possible configuration, depends on whether the MAAS control the DHCP and the DNS server:
1. MAAS interface control DHCP and DNS
This is the best configuration, where MAAS Server control all infrastructure in local network.
2. MAAS interface control DHCP only
Probably you want to try this configuration because you want to implement the cloud in the internet where you alread have a running DNS servers.
3. MAAS interface depend on external DHCP that is configured manually
This is so not recomended.
- Adding Nodes to the local clouds
- Setting SSH key pair for remote access and later for Juju
- Creating local Ubuntu repository for the local cloud infrastructure
- FAI to install multiple Ubuntu desktop
- From local cloud to private cloud
- Lets do some Juju….
- Juju with AWS
- Juju with Microsoft Azure
- Juju with Openstack
to be continued