# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

# Usage: install_slurm_exporter.yml
installation_dir: "/var/lib/"
slurm_exporter_inst_dir: "/var/lib/slurm-exporter"
go_pack_url: "https://dl.google.com/go/go1.15.linux-amd64.tar.gz"
extended_path: "{{ installation_dir }}/go/bin"
go_exec_path: "{{ installation_dir }}/go/bin/go"
slurm_exporter_git_repo: "https://github.com/vpenso/prometheus-slurm-exporter.git"
go_modules_path: "{{ slurm_exporter_inst_dir }}/go/modules"
slurm_exporter_exec: "{{ slurm_exporter_inst_dir }}/bin/prometheus-slurm-exporter"
system_path: "/usr/bin"
stable_commit_id: "00a7dee"

#Usage: install_prometheus.yml
prometheus_git_repo: "https://github.com/prometheus/prometheus/releases/download/v2.23.0/prometheus-2.23.0.linux-amd64.tar.gz"
prometheus_inst_path: "/var/lib/prometheus-2.23.0.linux-amd64/"
prometheus_exec_path: "{{ prometheus_inst_path }}/prometheus"
system_local_path: "/usr/local/bin"
prometheus_config_file: "{{ prometheus_inst_path }}/prometheus.yml"

#Usage: start_service.yml
file_permission: "0755"
systemd_path_dest: "/etc/systemd/system/"
slurm_exporter_port: "8081"

#Usage: configure_prometheus_pod.yml
slurm_config_file: "slurm_exporter_config.yaml"

#Usage: configure_grafana.yml
prometheus_ip: http://localhost:9090
nginx_conf_file_path: /etc/nginx/nginx.conf
nginx_conf_file_mode: 2534
grafana_svc_ip: "{{ lookup('ini', 'ip section=grafana_svc file=../../k8s_start_services/files/grafana_svc_details.ini') }}"
grafana_svc_port: "{{ lookup('ini', 'port section=grafana_svc file=../../k8s_start_services/files/grafana_svc_details.ini') }}"
slurm_dashboard_json_files:
  - slurm-dashboard.json
  - slurm-dashboard-node-exporter.json