Skip to content

Commit f9fc905

Browse files
committed
Merge branch 'main' into feature/k3s-monitoring
2 parents 31c2b5b + 3219034 commit f9fc905

File tree

11 files changed

+51
-7
lines changed

11 files changed

+51
-7
lines changed

ansible/roles/compute_init/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ it also requires an image build with the role name added to the
7272
| filesystems.yml | block_devices | None required - role deprecated | n/a |
7373
| filesystems.yml | nfs | All client functionality | No |
7474
| filesystems.yml | manila | All functionality | No [5] |
75-
| filesystems.yml | lustre | None at present | Yes |
75+
| filesystems.yml | lustre | All functionality | Yes |
7676
| extras.yml | basic_users | All functionality [6] | No |
7777
| extras.yml | eessi | All functionality [7] | No |
7878
| extras.yml | cuda | None required - use image build | Yes [8] |

ansible/roles/compute_init/files/compute-init.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
enable_tuned: "{{ os_metadata.meta.tuned | default(false) | bool }}"
1616
enable_nfs: "{{ os_metadata.meta.nfs | default(false) | bool }}"
1717
enable_manila: "{{ os_metadata.meta.manila | default(false) | bool }}"
18+
enable_lustre: "{{ os_metadata.meta.lustre | default(false) | bool }}"
1819
enable_basic_users: "{{ os_metadata.meta.basic_users | default(false) | bool }}"
1920
enable_eessi: "{{ os_metadata.meta.eessi | default(false) | bool }}"
2021
enable_chrony: "{{ os_metadata.meta.chrony | default(false) | bool }}"
@@ -247,6 +248,12 @@
247248
- enable_manila
248249
- os_manila_mount_shares | length > 0
249250

251+
- name: Configure lustre
252+
ansible.builtin.include_role:
253+
name: lustre
254+
tasks_from: configure.yml
255+
when: enable_lustre
256+
250257
- name: Basic users
251258
block:
252259
- name: Create groups

ansible/roles/compute_init/tasks/install.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
dest: tasks/nfs-clients.yml
4646
- src: ../../mrlesmithjr.chrony
4747
dest: roles/
48+
- src: ../../lustre
49+
dest: roles/
4850

4951
- name: Add filter_plugins to ansible.cfg
5052
lineinfile:

ansible/roles/sshd/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Configure sshd.
55
## Role variables
66

77
- `sshd_password_authentication`: Optional bool. Whether to enable password login. Default `false`.
8+
- `sshd_disable_forwarding`: Optional bool. Whether to disable all forwarding features (X11, ssh-agent, TCP and StreamLocal). Default `true`.
89
- `sshd_conf_src`: Optional string. Path to sshd configuration template. Default is in-role template.
910
- `sshd_conf_dest`: Optional string. Path to destination for sshd configuration file. Default is `/etc/ssh/sshd_config.d/10-ansible.conf` which overides `50-{cloud-init,redhat}` files, if present.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
sshd_password_authentication: false
2+
sshd_disable_forwarding: true
23
sshd_conf_src: sshd.conf.j2
34
sshd_conf_dest: /etc/ssh/sshd_config.d/10-ansible.conf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# {{ ansible_managed }}
22
PasswordAuthentication {{ 'yes' if sshd_password_authentication | bool else 'no' }}
3+
DisableForwarding {{ 'yes' if sshd_disable_forwarding | bool else 'no' }}

docs/networks.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ as an SSH proxy to access the other nodes, this can create problems in recoverin
1414
the cluster if the login node is unavailable and can make Ansible problems harder
1515
to debug.
1616

17+
> [!WARNING]
18+
> If home directories are on a shared filesystem with no authentication (such
19+
> as the default NFS share) then the network(s) the fileserver is attached to
20+
> form a security boundary. If an untrusted user can access these networks they
21+
> could mount the home directories setting any desired uid/gid.
22+
>
23+
> Ensure there is no external access to these networks and that no untrusted
24+
> instances are attached to them.
25+
1726
This page describes supported configurations and how to implement them using
1827
the OpenTofu variables. These will normally be set in
1928
`environments/site/tofu/terraform.tfvars` for the site base environment. If they
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
nfs_configurations:
2+
- comment: Export /exports/home from Slurm control node as /home
3+
nfs_enable:
4+
server: "{{ inventory_hostname in groups['control'] }}"
5+
# Don't mount share on server where it is exported from...
6+
# Could do something like `nfs_clients: "{{ 'nfs_servers' not in group_names }}"` instead.
7+
clients: "{{ inventory_hostname in groups['cluster'] and inventory_hostname not in groups['control'] }}"
8+
nfs_server: "{{ nfs_server_default }}"
9+
nfs_export: "/exports/home" # assumes skeleton TF is being used
10+
nfs_client_mnt_point: "/home"
11+
12+
# EXPERIMENTAL - not generally secure
13+
- comment: Export /exports/cluster from Slurm control node
14+
nfs_enable:
15+
server: "{{ inventory_hostname in groups['control'] }}"
16+
clients: false
17+
nfs_export: "/exports/cluster"

environments/common/inventory/group_vars/all/nfs.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ nfs_configurations:
1616
nfs_export: "/exports/home" # assumes skeleton TF is being used
1717
nfs_client_mnt_point: "/home"
1818

19-
- comment: Export /exports/cluster from Slurm control node
20-
nfs_enable:
21-
server: "{{ inventory_hostname in groups['control'] }}"
22-
clients: false
23-
nfs_export: "/exports/cluster"
19+
# Set 'secure' to prevent tunneling nfs mounts
20+
# Cannot set 'root_squash' due to home directory creation
21+
nfs_export_options: 'rw,secure,no_root_squash'

environments/skeleton/{{cookiecutter.environment}}/tofu/network.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,22 @@ data "openstack_networking_subnet_v2" "cluster_subnet" {
1313
name = each.value.subnet
1414
}
1515

16+
data "openstack_identity_auth_scope_v3" "scope" {
17+
# This is an arbitrary name which is only used as a unique identifier so an
18+
# actual token isn't used as the ID.
19+
name = "scope"
20+
}
21+
1622
data "openstack_networking_secgroup_v2" "login" {
1723
for_each = toset(var.login_security_groups)
1824

1925
name = each.key
26+
tenant_id = data.openstack_identity_auth_scope_v3.scope.project_id
2027
}
2128

2229
data "openstack_networking_secgroup_v2" "nonlogin" {
2330
for_each = toset(var.nonlogin_security_groups)
2431

2532
name = each.key
33+
tenant_id = data.openstack_identity_auth_scope_v3.scope.project_id
2634
}

0 commit comments

Comments
 (0)