Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make multiple OOD nodes safe #213

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions environments/common/inventory/group_vars/all/grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ grafana_port: 3000
# Define where state is stored
grafana_data_dir: "{{ appliances_state_dir | default('/var/lib') }}/grafana"

# Configure internal address & URL - note "api" means "internal" to cloudalchemy.grafana but "external" to appliance:
# Configure internal address & URL - note "api" means "internal" to cloudalchemy.grafana but "external" to appliance
grafana_api_address: "{{ hostvars[groups['grafana'].0].internal_address }}"
grafana_api_url: "http://{{ grafana_api_address }}:{{ grafana_port }}"

# Configure external address, with external URL depending on whether we are using Open Ondemand as a proxy
grafana_url_direct: "http://{{ grafana_address }}:{{ grafana_port }}"
grafana_url_openondemand_proxy: "https://{{ openondemand_servername | default('') }}/node/{{ groups['grafana'].0 }}/{{ grafana_port }}"
grafana_url: "{{ grafana_url_openondemand_proxy if groups['openondemand'] | count > 0 else grafana_url_direct }}"
grafana_serve_from_sub_path: "{{ groups['openondemand'] | count > 0 }}"
# Enable proxying grafana through Open Ondemand (if available)
grafana_via_openondemand: "{{ groups['openondemand'] | count > 0 }}"

# Configure external address, using the **first** Open Ondemand node as a proxy if available
grafana_url: >-
{% if grafana_via_openondemand %}
https://{{ hostvars[groups['openondemand'].0]['openondemand_servername'] }}
{% else %}
http://{{ grafana_address }}:{{ grafana_port }}
{% endif %}
grafana_serve_from_sub_path: "{{ grafana_via_openondemand }}"

grafana_dashboards_default:
# node exporter slurm:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

# openondemand_servername: '' # Must be defined when using openondemand

openondemand_dashboard_links: # TODO: should really only be deployed if grafana is deployed and proxying configured
_openondemand_monitoring_link:
- name: Grafana
app_name: grafana
category: Monitoring
description: Dashboards
url: "{{ grafana_url_openondemand_proxy }}"
url: "{{ grafana_url }}"
openondemand_dashboard_links: "{{ _openondemand_monitoring_link if grafana_via_openondemand else [] }}"

openondemand_clusters:
slurm:
Expand Down