Skip to content

Commit 65a29f3

Browse files
committed
refactored caas config to use new defaults
1 parent 491e951 commit 65a29f3

File tree

3 files changed

+16
-33
lines changed

3 files changed

+16
-33
lines changed

environments/.caas/inventory/extra_groups

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ compute
1515
[podman:children]
1616
zenith
1717

18-
[persist_hostkeys:children]
19-
openondemand
Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
nfs_server: "{{ nfs_server_default }}"
2-
3-
caas_nfs_ood_state:
4-
- comment: Export /var/lib/state from Slurm control node to OOD
5-
nfs_enable:
6-
server: "{{ inventory_hostname in groups['control'] }}"
7-
clients: "{{ inventory_hostname in groups['openondemand'] }}"
8-
nfs_export: "{{ appliances_state_dir }}"
9-
nfs_client_mnt_point: "{{ appliances_state_dir }}"
10-
nfs_client_mnt_options: "x-systemd.required-by=zenith-ood.service,x-systemd.before=zenith-ood.service"
11-
12-
caas_nfs_home:
13-
- comment: Export /exports/home from Slurm control node as /home
14-
nfs_enable:
15-
server: "{{ inventory_hostname in groups['control'] }}"
16-
clients: "{{ inventory_hostname in groups['cluster'] }}"
17-
nfs_export: "/exports/home" # assumes skeleton TF is being used
18-
nfs_client_mnt_point: "/home"
19-
20-
nfs_configurations: "{{ caas_nfs_ood_state + (caas_nfs_home if not cluster_home_manila_share | bool else []) }}"
1+
nfs_configurations: "{{ nfs_default_configs + (nfs_home_config if not cluster_home_manila_share | bool else []) }}"

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,7 @@
55

66
nfs_server_default: "{{ groups['control'] | first }}" # avoid using hostvars for compute-init
77

8-
nfs_configurations:
9-
- comment: Export /exports/home from Slurm control node as /home
10-
nfs_enable:
11-
server: "{{ inventory_hostname in groups['control'] }}"
12-
# Don't mount share on server where it is exported from...
13-
# Could do something like `nfs_clients: "{{ 'nfs_servers' not in group_names }}"` instead.
14-
clients: "{{ inventory_hostname in groups['cluster'] and inventory_hostname not in groups['control'] }}"
15-
nfs_server: "{{ nfs_server_default }}"
16-
nfs_export: "/exports/home" # assumes skeleton TF is being used
17-
nfs_client_mnt_point: "/home"
18-
8+
nfs_default_configs:
199
- comment: Export /exports/cluster from Slurm control node
2010
nfs_enable:
2111
server: "{{ inventory_hostname in groups['control'] }}"
@@ -30,3 +20,17 @@ nfs_configurations:
3020
nfs_server: "{{ nfs_server_default }}"
3121
nfs_client_mnt_point: "/mnt/hostkeys"
3222
nfs_client_mnt_options: "x-systemd.required-by=zenith-ood.service,x-systemd.before=zenith-ood.service"
23+
24+
# Separated to be overridable in caas
25+
nfs_home_config:
26+
- comment: Export /exports/home from Slurm control node as /home
27+
nfs_enable:
28+
server: "{{ inventory_hostname in groups['control'] }}"
29+
# Don't mount share on server where it is exported from...
30+
# Could do something like `nfs_clients: "{{ 'nfs_servers' not in group_names }}"` instead.
31+
clients: "{{ inventory_hostname in groups['cluster'] and inventory_hostname not in groups['control'] }}"
32+
nfs_server: "{{ nfs_server_default }}"
33+
nfs_export: "/exports/home" # assumes skeleton TF is being used
34+
nfs_client_mnt_point: "/home"
35+
36+
nfs_configurations: "{{ nfs_default_configs + nfs_home_config }}"

0 commit comments

Comments
 (0)