|
| 1 | +--- |
| 2 | +openondemand_auth: basic_pam |
| 3 | +openondemand_jupyter_partition: "compute" |
| 4 | +openondemand_desktop_partition: "compute" |
| 5 | + |
| 6 | +httpd_listen_addr_port: |
| 7 | + - 80 |
| 8 | + - 443 |
| 9 | + |
| 10 | +# Allow proxying to compute nodes for apps and control for monitoring only when the grafana group is available |
| 11 | +openondemand_host_regex: '({{ openhpc_cluster_name ~ "-compute-\d+)" ~ ( "|(" ~ groups["grafana"][0] ~ ")" if "grafana" in groups else "" ) }}' |
| 12 | + |
| 13 | +# Add grafana to dashboard links to OOD only if grafana group is available |
| 14 | +openondemand_dashboard_links_grafana: |
| 15 | + - name: Grafana |
| 16 | + app_name: grafana |
| 17 | + category: Monitoring |
| 18 | + description: Dashboards |
| 19 | + url: "{{ grafana_url_openondemand_proxy }}" |
| 20 | +openondemand_dashboard_links: "{{ openondemand_dashboard_links_grafana if 'grafana' in groups else [] }}" |
| 21 | + |
| 22 | +# Add grafana panel to jobs page only if grafana group is available |
| 23 | +openondemand_clusters: |
| 24 | + slurm: |
| 25 | + v2: |
| 26 | + metadata: |
| 27 | + title: "{{ openhpc_cluster_name }}" # interpolation here works as openondemand is lexically after openhpc |
| 28 | + login: |
| 29 | + host: "{{ hostvars[groups['login'].0].api_address }}" |
| 30 | + default: true |
| 31 | + job: |
| 32 | + adapter: slurm |
| 33 | + cluster: "{{ openhpc_cluster_name }}" |
| 34 | + batch_connect: |
| 35 | + basic: |
| 36 | + script_wrapper: |- |
| 37 | + module purge |
| 38 | + export PATH=/opt/jupyter/bin/:$PATH |
| 39 | + %s |
| 40 | + set_host: host=$(hostname -s) |
| 41 | + vnc: |
| 42 | + script_wrapper: |- |
| 43 | + module purge |
| 44 | + export PATH=/opt/TurboVNC/bin:$PATH |
| 45 | + # Workaround to avoid "Unable to contact settings server" when |
| 46 | + # lauching xfce4-session |
| 47 | + xfce4-session() { /bin/dbus-launch /bin/xfce4-session $@ ; } |
| 48 | + export -f xfce4-session |
| 49 | + %s |
| 50 | + set_host: host=$(hostname -s) |
| 51 | + custom: "{{ openondemand_clusters_grafana if 'grafana' in groups else {} }}" |
| 52 | + |
| 53 | +grafana_address: "{{ hostvars[groups['grafana'][0]]['api_address'] if 'grafana' in groups else '' }}" |
| 54 | +grafana_url_openondemand_proxy: "https://{{ openondemand_servername }}/node/{{ groups['grafana'][0] if 'grafana' in groups else '' }}/{{ grafana_port }}" |
| 55 | + |
| 56 | +openondemand_clusters_grafana: |
| 57 | + # embed grafana panels in Jobs app: https://osc.github.io/ood-documentation/latest/customization.html#grafana-support |
| 58 | + grafana: |
| 59 | + host: "{{ grafana_url_openondemand_proxy if 'openondemand' in groups else grafana_url_direct }}" |
| 60 | + orgId: 1 |
| 61 | + dashboard: |
| 62 | + name: "node-exporter-slurm" |
| 63 | + uid: "node-exporter-slurm" |
| 64 | + panels: |
| 65 | + cpu: 77 |
| 66 | + memory: 78 |
| 67 | + labels: |
| 68 | + cluster: "cluster" |
| 69 | + host: "host" |
| 70 | + jobid: "jobid" |
| 71 | + |
| 72 | +_opeonondemand_unset_auth: ' RequestHeader unset Authorization' |
| 73 | + |
| 74 | +# Fix grafana proxying for basic auth if anonymous grafana access enabled: |
| 75 | +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 '' }}" |
| 76 | + |
| 77 | + |
0 commit comments