OpenStack Ubuntu 14 Installation

MAAS install network and etherwake

In this video we talk about the network setup for MAAS and how etherwake plays a role in our setup. Youtube link:

Check the status of your network interfaces:

$ ifconfig -a

Edit your interfaces file to config these interfaces as static eth0 is out internet facing nic and eth1 is our private network nic.

Command to edit network config:

$ sudo nano /etc/network/interfaces

This is what the file should look like when you are done:

# This file describes the network 
# interfaces available on your system 
# and how to activate them. 
# For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static

After the changes its just easier to reboot the machine to pick them up.

$ sudo reboot now

Again we are following this openstack guide:

In the gui, setup your cluster network interfaces just like we did in the interfaces config file.

Setup an SSH key for MAAS to login to the node machines with.

On command line generate the ssh key:

$ ssh-keygen -t rsa

Just press Enter through the prompts.

Copy the key to the GUI, display the key with the cat command:

$ cat ~/.ssh/

Copy and paste this key into the GUI under Root > Preferences

Good info on etherwake is here:

Install etherwake

$ sudo apt install etherwake

You need to edit the etherwake template to remove wakeonlan and add sudo access and use the eth1 interface.

Edit etherwake template:

$ sudo nano /etc/maas/templates/power/ether_wake.template

Your template file should look like this:

# -*- mode: shell-script -*-
# Control node power through WOL, 
# via `wakeonlan` or `etherwake`.


if [ "${power_change}" != 'on' ]
    echo "There is no way to power down a node through etherwake." >&2
    exit 1
#elif [ -x /usr/bin/wakeonlan ]
#    /usr/bin/wakeonlan $mac_address
elif [ -x /usr/sbin/etherwake ]
    sudo /usr/sbin/etherwake -i eth1 $mac_address
    echo "No wakeonlan or etherwake program found." >&2

exit 0

You also need to add etherwake to our sudoers list so the system can run it as sudo.

Edit the file with this command:

$ sudo nano /etc/sudoers.d/99-maas-sudoers

And add this to the bottom of the text:

$ maas ALL= NOPASSWD: /usr/sbin/etherwake

Now is a good time to reboot your MAAS server so all these changes take affect.

$ sudo reboot now