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 address 192.168.1.150 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1 auto eth1 iface eth1 inet static address 10.1.1.100 netmask 255.255.255.0
After the changes its just easier to reboot the machine to pick them up.
$ sudo reboot now
Again we are following this openstack guide:
http://www.ubuntu.com/download/cloud/install-ubuntu-openstack
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/id_rsa.pub
Copy and paste this key into the GUI under Root > Preferences
Good info on etherwake is here:
http://askubuntu.com/questions/504452/node-in-maas-not-waking-up-on-lan
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`. # mac_address={{mac_address}} power_change={{power_change}} if [ "${power_change}" != 'on' ] then echo "There is no way to power down a node through etherwake." >&2 exit 1 #elif [ -x /usr/bin/wakeonlan ] #then # /usr/bin/wakeonlan $mac_address elif [ -x /usr/sbin/etherwake ] then sudo /usr/sbin/etherwake -i eth1 $mac_address else echo "No wakeonlan or etherwake program found." >&2 fi 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