Skip to content

Commit 4abfaf6

Browse files
committed
docs for cloud-init gateway
1 parent 64cedcc commit 4abfaf6

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Before starting ensure that:
3737
- Created instances have access to internet (note proxies can be setup through the appliance if necessary).
3838
- Created instances have accurate/synchronised time (for VM instances this is usually provided by the hypervisor; if not or for bare metal instances it may be necessary to configure a time service via the appliance).
3939
- Three security groups are present: ``default`` allowing intra-cluster communication, ``SSH`` allowing external access via SSH and ``HTTPS`` allowing access for Open OnDemand.
40+
- All instances will get a default route (needed for `k3s`). Normally the gateway
41+
is defined on the relevant subnet.
4042

4143
### Setup deploy host
4244

docs/production.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,35 @@ and referenced from the `site` and `production` environments, e.g.:
122122
- If floating IPs are required for login nodes, modify the OpenTofu configurations
123123
appropriately.
124124

125+
- The main [README.md](../README.md) notes that all nodes require a default
126+
route. This is to [allow k3s](https://docs.k3s.io/installation/airgap#default-network-route)
127+
to detect the node's primary IP. Normally nodes get a default route from the
128+
gateway defined on the subnet, but if networking must differ between hosts this
129+
can be problematic. For example if the cluster has two networks with only
130+
some nodes dual-homed, a gateway cannot be set on both subnets as this would
131+
create routing problems for the dual-homed nodes. In this case set
132+
`gateway_nmcli_connection = "dummy0"` in the OpenTofu compute group definition(s)
133+
to create a dummy route using cloud-init as per the linked k3s docs, e.g.:
134+
135+
```terraform
136+
# environments/$ENV/tofu/main.tf:
137+
...
138+
compute = {
139+
general = {
140+
flavor = "general.v1.small"
141+
nodes = [
142+
"general-0",
143+
"general-1",
144+
]
145+
gateway_nmcli_connection = "dummy0"
146+
}
147+
...
148+
```
149+
150+
Note that the `gateway_nmcli_connection` and `gateway_ip` options can also be
151+
used to set a real default route in cases where the gateway cannot be defined
152+
on the subnet for some reason.
153+
125154
- Consider whether mapping of baremetal nodes to ironic nodes is required. See
126155
[PR 485](https://github.com/stackhpc/ansible-slurm-appliance/pull/485).
127156

0 commit comments

Comments
 (0)