Copyright @ Lenovo US

    After setting up the MAAS server and its subnet, bringing up a target node is simple.

    All nodes must be on the same 192.168.8.0/24 subnet, and they must support PXE boot.

    PXE boot

    The MAAS machine functions as both the DHCP server and the TFTP server, both are required to facilitate PXE booting. First, we creat a blank VM. The important things are:

    1. Under System → Mother board → Boot order, check the Network. However, it is not necessary to move the Network boot above Hard Disk. When there is no OS deployed yet on the hard disk, boot process will fall through to PXE anyway. Once an OS has been installed, the machine will boot normally from HD.

      If you put PXE as the first order, this target will not boot into HD image at all.

    2. Set Network → Adapter 1 → Internal Network, named intnet. This corresponds to the MAAS managed subnet of 192.168.8.0/24.

    After this, start the target VM and it should PXE boot and will shut itself down at the end of the boot.

    MAAS machine life cycle

    MAAS target goes through a life cycel as shown below:

    MAAS target node life cycle

    New

    Once PXE booted, the MAAS server will automatically enlist this machine with a New status. This indicates that machine has been discovered by MAAS. The given node name is completly arbitrary, and it has nothing to do with VM's name.

    If there are multiple targets, the only way to match MAAS node name with a VM is through assigned IP addresses.

    Commission

    This is the phase in which MAAS server tries to determine the CPU, memory, and disk information of the target. Two important configurations to notice:

    1. Power type: for our virtual lab, select Manual. Otherwise, the admin GUI will block you from commissioning completly.
    2. Retain: do NOT check such checkboxes. The word retain means to keep what you have. Therefore, it will skip registering the target's disk information. This is super confusing because commission output details will show clearly the disk info. So the commission scripts run just fine and pulled everything correctly. It's the MAAS logic to ignore these returned values if user has checked retain.

    READY

    If commissioning went through, MAAS server will now has all the information needed to deploy something to this target. Think of machines in this state as a pool from which deployment can pick.

    Deploy

    By far, target machine has nothing on it — it has a blank disk. First thing first, we need to put an OS on it, and that's deploy is about.

    1. Take action → Deploy, and reboot target which should come up in PXE again.
    2. MAAS admin will automatically change node's status to Deploying.
    3. OS will be written to disk.

    Once state switched to Deployed, verify by:

    1. Goto Subnet menu on MAAS web admin UI, look up the target's assigned IP address.
    2. Boot up target machine ← it will now load from HD instead of PXE!

      ```shell
      ssh ubuntu@192.168.8.xxx
      ```
      

      Since deployed image has copied the SSH public key that we have created in steps of creating the MAAS server itself and have copied to the MAAS admin UI, you can now SSH to any deployed target without having a password.

    Release

    Releasing a deployed target gives an option to erase disk. Again, taget has to be PXE-booted in order to be managed by the MAAS server.

    MAAS sever can not manage a deployed target unless it PXE boots.

    If released and disk erased, the node becomes READY, again.

    — by Feng Xia

    Related:

      2017-10-22
    Juju GUI nginx proxy

    In LXD on localhost we introduced using LXD container to bootstrap a Juju controller. But how to access the Juju GUI? Launching it is easy enough with $ juju gui from juju host; ...

      2017-09-06
    Juju local LXD

    Using Juju's LXD provider is the least-hassle way to start an experience of Juju and its charms. However, if you have done charm development for a while, you know making a one line of code ...

      2017-07-06
    Charm Ansible integration

    Let's face it. Ansible has the mouth (and market) share these days. For our modeling purpose, we are to utilize its procedural strength to carry out actions, which provides an abstraction instead of coding in charm's Python files.

    Design ...