Skip to content

Commit 8a88e38

Browse files
committed
nfs export the state dir to login node for use by zenith-ood proxy
1 parent cfdb775 commit 8a88e38

File tree

8 files changed

+29
-10
lines changed

8 files changed

+29
-10
lines changed

group_vars/cluster.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ appliances_local_users_podman_enable: "{{ groups.get('podman', []) | length > 0
1717
# The server name for Open OnDemand depends on whether Zenith is enabled or not
1818
openondemand_servername_default: "{{ hostvars[groups['openstack'][0]].cluster_floating_ip_address | replace('.', '-') ~ '.sslip.io' }}"
1919
openondemand_servername: "{{ zenith_fqdn_ood | default(openondemand_servername_default) }}"
20+
21+
appliances_state_dir: /var/lib/state

group_vars/control.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

group_vars/grafana.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ grafana_serve_from_sub_path: "{{ 'openondemand' in groups }}"
55
grafana_auth_anonymous: "{{ 'openondemand' in groups }}"
66

77
grafana_url: "{{ grafana_url_openondemand_proxy if 'openondemand' in groups else grafana_url_direct }}"
8+
9+
state_dir_mnt_opts: "x-systemd.required-by=zenith-monitoring.service,x-systemd.before=zenith-monitoring.service"

group_vars/nfs.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# Use the IP address instead
2-
nfs_server_default: "{{ hostvars[groups['control'] | first ].ansible_default_ipv4.address }}"
2+
nfs_server: "{{ hostvars[groups['control'] | first ].ansible_default_ipv4.address }}"
3+
4+
nfs_configurations:
5+
- comment: Export /exports/home from Slurm control node as /home
6+
nfs_enable:
7+
server: "{{ inventory_hostname in groups['control'] }}"
8+
clients: "{{ inventory_hostname in groups['cluster'] and inventory_hostname not in groups['control'] }}"
9+
nfs_export: "/exports/home" # assumes skeleton TF is being used
10+
nfs_client_mnt_point: "/home"
11+
- comment: Export /var/lib/state from Slurm control node to login
12+
nfs_enable:
13+
server: "{{ inventory_hostname in groups['control'] }}"
14+
clients: "{{ inventory_hostname in groups['login'] }}"
15+
nfs_export: "{{ appliances_state_dir }}"
16+
nfs_client_mnt_point: "{{ appliances_state_dir }}"
17+
nfs_client_mnt_options: "{{ state_dir_mnt_opts }}"

group_vars/openondemand.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ _opeonondemand_unset_auth: ' RequestHeader unset Authorization'
7575
# Fix grafana proxying for basic auth if anonymous grafana access enabled:
7676
openondemand_node_proxy_directives: "{{ _opeonondemand_unset_auth if (openondemand_auth == 'basic_pam' and 'openondemand_host_regex' and 'grafana' in groups and hostvars[groups['grafana'][0]]._grafana_auth_is_anonymous) else '' }}"
7777

78-
78+
state_dir_mnt_opts: "x-systemd.required-by=zenith-ood.service,x-systemd.before=zenith-ood.service"

requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
roles:
33
- src: stackhpc.nfs
4-
version: v21.2.1
4+
version: v22.9.1
55
- src: https://github.com/stackhpc/ansible-role-openhpc.git
66
version: v0.16.0
77
name: stackhpc.openhpc

roles/cluster_infra/templates/resources.tf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ resource "openstack_compute_instance_v2" "control" {
169169
device: {{ home_volume_device_path }}
170170
partition: auto
171171
mounts:
172-
- [LABEL=state, /var/lib/state]
172+
- [LABEL=state, /var/lib/state, auto, "x-systemd.required-by=nfs-server.service,x-systemd.before=nfs-server.service"]
173173
- [LABEL=home, /exports/home, auto, "x-systemd.required-by=nfs-server.service,x-systemd.before=nfs-server.service"]
174174
EOF
175175
}

slurm-infra.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@
6969
- import_role:
7070
name: podman
7171
tasks_from: config.yml
72-
# Deploy the Zenith client for Grafana
72+
7373
- hosts: grafana
7474
tasks:
75-
- include_role:
75+
- name: Deploy the Zenith client for Grafana
76+
include_role:
7677
name: zenith_proxy
7778
vars:
7879
zenith_proxy_service_name: zenith-monitoring
@@ -87,10 +88,11 @@
8788
zenith_proxy_mitm_auth_basic_username: "{{ grafana_security.admin_user }}"
8889
zenith_proxy_mitm_auth_basic_password: "{{ grafana_security.admin_password }}"
8990
when: zenith_subdomain_monitoring is defined
90-
# Deploy the Zenith client for OOD
91+
9192
- hosts: openondemand
9293
tasks:
93-
- include_role:
94+
- name: Deploy the Zenith client for OOD
95+
include_role:
9496
name: zenith_proxy
9597
vars:
9698
zenith_proxy_service_name: zenith-ood

0 commit comments

Comments
 (0)