Skip to content

Commit af7b682

Browse files
author
Matt Pryor
committed
Add Zenith proxy for OOD
1 parent 80d2efa commit af7b682

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

slurm-infra.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,24 @@
8686
zenith_proxy_mitm_auth_basic_username: "{{ grafana_security.admin_user }}"
8787
zenith_proxy_mitm_auth_basic_password: "{{ grafana_security.admin_password }}"
8888
when: zenith_subdomain_monitoring is defined
89+
# Deploy the Zenith client for OOD
90+
- hosts: openondemand
91+
tasks:
92+
- include_role:
93+
name: zenith_proxy
94+
vars:
95+
zenith_proxy_service_name: zenith-ood
96+
# Use the IP address for the upstream host
97+
zenith_proxy_upstream_scheme: https
98+
zenith_proxy_upstream_host: "{{ ansible_default_ipv4.address }}"
99+
zenith_proxy_upstream_port: 443
100+
zenith_proxy_client_token: "{{ zenith_token_ood }}"
101+
zenith_proxy_client_auth_params: {}
102+
zenith_proxy_mitm_enabled: yes
103+
zenith_proxy_mitm_auth_inject: basic
104+
zenith_proxy_mitm_auth_basic_username: azimuth
105+
zenith_proxy_mitm_auth_basic_password: "{{ vault_azimuth_user_password }}"
106+
when: zenith_subdomain_ood is defined
89107

90108
- import_playbook: vendor/stackhpc/ansible-slurm-appliance/ansible/adhoc/hpctests.yml
91109

@@ -94,9 +112,17 @@
94112
tasks:
95113
- debug: var=outputs
96114
vars:
97-
outputs:
98-
cluster_access_ip: "{{ hostvars[groups['openstack'][0]].cluster_floating_ip_address }}"
99-
# Ansible has a fit when there are two 'hostvars' evaluations in a resolution chain,
100-
# so we have to repeat logic here unfortunately
101-
openondemand_url: "https://{{ hostvars[groups['openstack'][0]].cluster_floating_ip_address | replace('.', '-') ~ '.sslip.io' }}"
102-
azimuth_user_password: "{{ hostvars[groups['control'][0]].ansible_local.openhpc_secrets.vault_azimuth_user_password }}"
115+
# Ansible has a fit when there are two 'hostvars' evaluations in a resolution chain,
116+
# so we have to repeat logic here unfortunately
117+
outputs: >-
118+
{{-
119+
{ "cluster_access_ip": hostvars[groups['openstack'][0]].cluster_floating_ip_address } |
120+
combine(
121+
{
122+
"openondemand_url": "https://" ~ (hostvars[groups['openstack'][0]].cluster_floating_ip_address | replace('.', '-')) ~ ".sslip.io",
123+
"azimuth_user_password": hostvars[groups['control'][0]].ansible_local.openhpc_secrets.vault_azimuth_user_password
124+
}
125+
if zenith_fqdn_ood is not defined
126+
else {}
127+
)
128+
}}

ui-meta/slurm-infra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ usage_template: |-
6666
6767
{% if cluster.outputs.openondemand_url %}
6868
The Open OnDemand portal for this cluster as available at
69-
[{{ cluster.outputs.openondemand_url.slice(8, -1) }}]({{ cluster.outputs.openondemand_url }}).
69+
[{{ cluster.outputs.openondemand_url.slice(8) }}]({{ cluster.outputs.openondemand_url }}).
7070
7171
Enter the username `azimuth` and password `{{ cluster.outputs.azimuth_user_password }}` when prompted.
7272
{% else %}

0 commit comments

Comments
 (0)