Creating a login node or bastion host

Simple cluster setups utilize the headnode or controller for user logins. In many cases though it's preferable to have this role separated from the headnode. The below recipe shows the steps on how to create such a configuration.

Prerequisites

The the login node has a physical connection to the cluster external network, also referred to as public network. We have a node that will serve as the login node. In this scenarios we add a node to serve this purpose, however existing nodes can serve this role as well.

Step 1: create an external network

example external network:

  • IP subnet: 172.16.111.0/24
  • Gateway/next hop: 172.16.111.254
  • the network (domain) name: public.campus.lan

Creating the network in luna:

luna network add -N 172.16.111.0/24 -g 172.16.111.254 -gm 0 -z external public.campus.lan

Step 2: create a group for login nodes

We reuse the default compute group for convenience. Eth2 in this case is the login node's external interface.

luna group clone -if eth2 -N public.campus.lan compute login

Step 3: adding a node

luna node clone -g login node001 login01

Step 4: optionally configuring the IP address

Luna automatically assigns an IP address in the configured network space. This can be overridden. Say we need to set login01 to use 172.16.111.101:

luna node change -if eth2 -I 172.16.111.101 login01

The login node can be rebooted and verified. It would have a connection in the cluster network and a connection in the external network with its next hop set to the lowest metric.

The above steps are not bound to a specific image.