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.
See also: for how a
luna node show/luna node changerequest travels through the daemon (routes → base → DB, hooks plugins, and HA/journal replication), see the worked examples in luna2 daemon architecture.
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
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
Nodes inherit their configuration from the group they belong to. Anything set on the node itself overrides the group value, which makes it possible to quickly test a change or run a single node with, for example, a different disk layout — without affecting the rest of the group.
Listing and inspecting nodes
# luna node list
# luna node show node001
list gives the overview of all nodes; show prints the full, resolved configuration of one node, including the values it inherited from its group.
Adding a node
A node must belong to a group, so add requires -g. The osimage and most other settings are taken from that group unless you override them:
# luna node add -g compute node001
Cloning, renaming and removing
Cloning an existing node is the quickest way to add another node that is almost identical — it copies the source node's settings to the new name:
# luna node clone node001 node002
# luna node rename node002 gpu001
# luna node remove gpu001
Overriding a group setting on one node
Any group-level setting can be overridden per node with luna node change. For example, to point one node at a different osimage or give one interface a fixed address:
# luna node change -o compute-debug node001
# luna node change node001 -if ib0 -I 10.148.1.1
To drop the override and fall back to the group value again, set the field back to empty.
The commands above show the common operations; the full set of flags for each (provisioning method, BMC, scripts, interfaces, TPM, and more) is listed in the Luna 2.1 CLI reference. For per-node network interfaces, bonding and VLANs see Luna bonding and vlans.