Node and group management

The nodes can be configured individually, but it is easier to use a group which will configure all the nodes which are member of this group.

Group management

Adding a group

A group can be added by cloning an existing group (recommended) or adding an empty group. The latter will be filled with defaults.

Interface management

Adding an interface is done by changing the group configuration. The network must exist (luna network).

# luna group list
+------------------------------------------------------------------------+
|                               << Group >>                              |
+---+---------+--------------+---------+-------+-------------------------+
| # | name    | bmcsetupname | osimage | roles | interfaces              |
+---+---------+--------------+---------+-------+-------------------------+
| 1 | compute | compute      | compute | None  | interface = BOOTIF      |
|   |         |              |         |       | network = cluster       |
|   |         |              |         |       | options =               |
|   |         |              |         |       | interface = BMC         |
|   |         |              |         |       | network = ipmi          |
|   |         |              |         |       | options =               |
+---+---------+--------------+---------+-------+-------------------------+
# luna group changeinterface -N ib compute ib0
Group compute Interface ib0 is updated.
# luna group list
+------------------------------------------------------------------------+
|                               << Group >>                              |
+---+---------+--------------+---------+-------+-------------------------+
| # | name    | bmcsetupname | osimage | roles | interfaces              |
+---+---------+--------------+---------+-------+-------------------------+
| 1 | compute | compute      | compute | None  | interface = BOOTIF      |
|   |         |              |         |       | network = cluster       |
|   |         |              |         |       | options =               |
|   |         |              |         |       | interface = BMC         |
|   |         |              |         |       | network = ipmi          |
|   |         |              |         |       | options =               |
+---+---------+--------------+---------+-------+-------------------------+

All nodes which are currently a member of the group will have the interface added immediately. The IP addresses are numbered automatically, to change it on a per-node basis:

# luna node change gpu001 -if ib0 -I 10.148.1.1
Node gpu001 is updated.

Tailoring scripts

Note the postscripts are valid for both Luna v1 and v2. Post-installation scripts are used to tailor the image to the node itself. This can be some hostname which may be needed to change in some external software.

Example postscript

Note the reference to /sysroot (as it is still mounted in the Luna installer). Any file in the node need to prepended with /sysroot during the Luna installer phase. Do not reference any files outside of /sysroot since those are in the tmpfs Luna installer which are lost when the node pivots to it's image.

One can use any command, provided this is available during the Luna installer phase.

# Change HOSTNAME into node hostname in file
sed -i "s/HOSTNAME/`hostname -s`/g" /sysroot/etc/myapp.yml
# Add myhostname to postfix
echo "myhostname = `hostname -f`" >> /sysroot/etc/postfix/main.cf

Node management (override)

Nodes can be configured on an individual base, this will override what is configured in the group. This makes it possible to quickly test something or have a node with a different disklayout for example.