Browse Source

Issue #733: Update files to Unix-style LF

Signed-off-by: abhishek-sa1 <abhishek.sa3@dell.com>
abhishek-sa1 3 years ago
parent
commit
ec4b18a669
37 changed files with 3480 additions and 3473 deletions
  1. 199 199
      control_plane/input_params/ib_vars_edr.yml
  2. 63 63
      control_plane/roles/control_plane_monitoring/tasks/install_k8s_prom_stack.yml
  3. 32 32
      control_plane/roles/control_plane_monitoring/tasks/main.yml
  4. 9 2
      control_plane/roles/powervault_me4/tasks/main.yml
  5. 87 87
      control_plane/roles/webui_grafana/tasks/deployment.yml
  6. 39 39
      control_plane/roles/webui_grafana/tasks/main.yml
  7. 35 35
      control_plane/roles/webui_grafana/tasks/plugins.yml
  8. 40 40
      control_plane/roles/webui_grafana/tasks/pre-requisites.yml
  9. 44 44
      control_plane/roles/webui_grafana/tasks/secrets.yml
  10. 52 52
      control_plane/roles/webui_grafana/tasks/volume.yml
  11. 45 45
      control_plane/roles/webui_grafana/vars/main.yml
  12. 140 140
      platforms/roles/kubeflow/tasks/deploy_kubeflow.yml
  13. 44 44
      platforms/roles/kubeflow/tasks/firewalld_config.yml
  14. 2 2
      roles/k8s_start_services/files/grafana_svc_details.ini
  15. 73 73
      roles/k8s_start_services/tasks/configure_nginx_prom_grafana.yml
  16. 1533 1533
      roles/slurm_exporter/files/slurm-dashboard-node-exporter.json
  17. 64 64
      roles/slurm_exporter/tasks/configure_grafana.yml
  18. 35 35
      telemetry/input_params/base_vars.yml
  19. 44 44
      telemetry/input_params/login_vars.yml
  20. 78 78
      telemetry/roles/common/tasks/k8s_secrets.yml
  21. 26 26
      telemetry/roles/common/tasks/main.yml
  22. 66 66
      telemetry/roles/common/tasks/pre-requisites.yml
  23. 71 71
      telemetry/roles/common/tasks/validate_base_vars.yml
  24. 174 174
      telemetry/roles/common/tasks/validate_login_vars.yml
  25. 62 62
      telemetry/roles/common/vars/main.yml
  26. 55 55
      telemetry/roles/grafana_config/tasks/add_datasource.yml
  27. 20 20
      telemetry/roles/grafana_config/tasks/main.yml
  28. 17 17
      telemetry/roles/grafana_config/vars/main.yml
  29. 23 23
      telemetry/roles/idrac_telemetry/tasks/main.yml
  30. 32 32
      telemetry/roles/idrac_telemetry/vars/main.yml
  31. 35 35
      telemetry/roles/timescaledb/tasks/main.yml
  32. 34 34
      telemetry/roles/timescaledb/tasks/persistent_volume.yml
  33. 31 31
      telemetry/roles/timescaledb/tasks/persistent_volume_claim.yml
  34. 33 33
      telemetry/roles/timescaledb/tasks/service.yml
  35. 72 72
      telemetry/roles/timescaledb/tasks/timescaledb_pod.yml
  36. 25 25
      telemetry/roles/timescaledb/vars/main.yml
  37. 46 46
      telemetry/telemetry.yml

+ 199 - 199
control_plane/input_params/ib_vars_edr.yml

@@ -1,200 +1,200 @@
-# Copyright 2021 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.
-
-
-# Default configurations written for :
-  # ----Switch-IB(TM) 2 based EDR InfiniBand 1U Switch, 36 QSFP28 ports----
-# Change the configurations as per the switch model to avoid failures
-
-# Subnet Manager: centralized resource used by infiniband
-# to handle the management of the fabric.
-# Cache and Log directories of subnet manager
-# container are mounted to below mentioned path on host.
-
-# cache_directory: opensm stores certain data to the disk such that
-# subsequent runs are consistent. The default directory used is /var/cache/opensm.
-# The following files are included in it: guid2lid, guid2mkey, neighbors
-
-# log_directory: controls the directory in which the temporary files
-# generated by opensm are created. These files are: opensm-subnet.lst,
-# opensm.fdbs, and opensm.log. By default, this directory is /var/log.
-
-subnet_manager:
-  cache_directory: /var/cache/opensm
-  log_directory: /var/log
-
-# mellanox_switch_config: list of configuration lines to apply to the switch.
-  # Example:
-    # mellanox_switch_config:
-      # - Command 1
-      # - Command 2
-  # By default, the list is empty.
-mellanox_switch_config:
-
-# mellanox_switch_interface_config: contains interface configuration.
-  # It is a dict mapping switch interface names to configuration dicts.
-  # Each dict may contain the following items:
-    # description - a description to apply to the interface.
-    # config - a list of per-interface configuration.
-mellanox_switch_interface_config:
-  ib 1/1:
-    description: port 1
-    config:
-      - "no shutdown"
-  ib 1/2:
-    description: port 2
-    config:
-      - "no shutdown"
-  ib 1/3:
-    description: port 3
-    config:
-      - "no shutdown"
-  ib 1/4:
-    description: port 4
-    config:
-      - "no shutdown"
-  ib 1/5:
-    description: port 5
-    config:
-      - "no shutdown"
-  ib 1/6:
-    description: port 6
-    config:
-      - "no shutdown"
-  ib 1/7:
-    description: port 7
-    config:
-      - "no shutdown"
-  ib 1/8:
-    description: port 8
-    config:
-      - "no shutdown"
-  ib 1/9:
-    description: port 9
-    config:
-      - "no shutdown"
-  ib 1/10:
-    description: port 10
-    config:
-      - "no shutdown"
-  ib 1/11:
-    description: port 11
-    config:
-      - "no shutdown"
-  ib 1/12:
-    description: port 12
-    config:
-      - "no shutdown"
-  ib 1/13:
-    description: port 13
-    config:
-      - "no shutdown"
-  ib 1/14:
-    description: port 14
-    config:
-      - "no shutdown"
-  ib 1/15:
-    description: port 15
-    config:
-      - "no shutdown"
-  ib 1/16:
-    description: port 16
-    config:
-      - "no shutdown"
-  ib 1/17:
-    description: port 17
-    config:
-      - "no shutdown"
-  ib 1/18:
-    description: port 18
-    config:
-      - "no shutdown"
-  ib 1/19:
-    description: port 19
-    config:
-      - "no shutdown"
-  ib 1/20:
-    description: port 20
-    config:
-      - "no shutdown"
-  ib 1/21:
-    description: port 21
-    config:
-      - "no shutdown"
-  ib 1/22:
-    description: port 22
-    config:
-      - "no shutdown"
-  ib 1/23:
-    description: port 23
-    config:
-      - "no shutdown"
-  ib 1/24:
-    description: port 24
-    config:
-      - "no shutdown"
-  ib 1/25:
-    description: port 25
-    config:
-      - "no shutdown"
-  ib 1/26:
-    description: port 26
-    config:
-      - "no shutdown"
-  ib 1/27:
-    description: port 27
-    config:
-      - "no shutdown"
-  ib 1/28:
-    description: port 28
-    config:
-      - "no shutdown"
-  ib 1/29:
-    description: port 29
-    config:
-      - "no shutdown"
-  ib 1/30:
-    description: port 30
-    config:
-      - "no shutdown"
-  ib 1/31:
-    description: port 31
-    config:
-      - "no shutdown"
-  ib 1/32:
-    description: port 32
-    config:
-      - "no shutdown"
-  ib 1/33:
-    description: port 33
-    config:
-      - "no shutdown"
-  ib 1/34:
-    description: port 34
-    config:
-      - "no shutdown"
-  ib 1/35:
-    description: port 35
-    config:
-      - "no shutdown"
-  ib 1/36:
-    description: port 36
-    config:
-      - "no shutdown"
-
-# save_changes_to_startup: is a boolean flag. By default, this option is set to false.
-# When set to true, it will save the switch's running configuration to the startup configuration file
-# after the role applies its configuration. This will allow the configuration to persist after a
-# restart or power failure.
+# Copyright 2021 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.
+
+
+# Default configurations written for :
+  # ----Switch-IB(TM) 2 based EDR InfiniBand 1U Switch, 36 QSFP28 ports----
+# Change the configurations as per the switch model to avoid failures
+
+# Subnet Manager: centralized resource used by infiniband
+# to handle the management of the fabric.
+# Cache and Log directories of subnet manager
+# container are mounted to below mentioned path on host.
+
+# cache_directory: opensm stores certain data to the disk such that
+# subsequent runs are consistent. The default directory used is /var/cache/opensm.
+# The following files are included in it: guid2lid, guid2mkey, neighbors
+
+# log_directory: controls the directory in which the temporary files
+# generated by opensm are created. These files are: opensm-subnet.lst,
+# opensm.fdbs, and opensm.log. By default, this directory is /var/log.
+
+subnet_manager:
+  cache_directory: /var/cache/opensm
+  log_directory: /var/log
+
+# mellanox_switch_config: list of configuration lines to apply to the switch.
+  # Example:
+    # mellanox_switch_config:
+      # - Command 1
+      # - Command 2
+  # By default, the list is empty.
+mellanox_switch_config:
+
+# mellanox_switch_interface_config: contains interface configuration.
+  # It is a dict mapping switch interface names to configuration dicts.
+  # Each dict may contain the following items:
+    # description - a description to apply to the interface.
+    # config - a list of per-interface configuration.
+mellanox_switch_interface_config:
+  ib 1/1:
+    description: port 1
+    config:
+      - "no shutdown"
+  ib 1/2:
+    description: port 2
+    config:
+      - "no shutdown"
+  ib 1/3:
+    description: port 3
+    config:
+      - "no shutdown"
+  ib 1/4:
+    description: port 4
+    config:
+      - "no shutdown"
+  ib 1/5:
+    description: port 5
+    config:
+      - "no shutdown"
+  ib 1/6:
+    description: port 6
+    config:
+      - "no shutdown"
+  ib 1/7:
+    description: port 7
+    config:
+      - "no shutdown"
+  ib 1/8:
+    description: port 8
+    config:
+      - "no shutdown"
+  ib 1/9:
+    description: port 9
+    config:
+      - "no shutdown"
+  ib 1/10:
+    description: port 10
+    config:
+      - "no shutdown"
+  ib 1/11:
+    description: port 11
+    config:
+      - "no shutdown"
+  ib 1/12:
+    description: port 12
+    config:
+      - "no shutdown"
+  ib 1/13:
+    description: port 13
+    config:
+      - "no shutdown"
+  ib 1/14:
+    description: port 14
+    config:
+      - "no shutdown"
+  ib 1/15:
+    description: port 15
+    config:
+      - "no shutdown"
+  ib 1/16:
+    description: port 16
+    config:
+      - "no shutdown"
+  ib 1/17:
+    description: port 17
+    config:
+      - "no shutdown"
+  ib 1/18:
+    description: port 18
+    config:
+      - "no shutdown"
+  ib 1/19:
+    description: port 19
+    config:
+      - "no shutdown"
+  ib 1/20:
+    description: port 20
+    config:
+      - "no shutdown"
+  ib 1/21:
+    description: port 21
+    config:
+      - "no shutdown"
+  ib 1/22:
+    description: port 22
+    config:
+      - "no shutdown"
+  ib 1/23:
+    description: port 23
+    config:
+      - "no shutdown"
+  ib 1/24:
+    description: port 24
+    config:
+      - "no shutdown"
+  ib 1/25:
+    description: port 25
+    config:
+      - "no shutdown"
+  ib 1/26:
+    description: port 26
+    config:
+      - "no shutdown"
+  ib 1/27:
+    description: port 27
+    config:
+      - "no shutdown"
+  ib 1/28:
+    description: port 28
+    config:
+      - "no shutdown"
+  ib 1/29:
+    description: port 29
+    config:
+      - "no shutdown"
+  ib 1/30:
+    description: port 30
+    config:
+      - "no shutdown"
+  ib 1/31:
+    description: port 31
+    config:
+      - "no shutdown"
+  ib 1/32:
+    description: port 32
+    config:
+      - "no shutdown"
+  ib 1/33:
+    description: port 33
+    config:
+      - "no shutdown"
+  ib 1/34:
+    description: port 34
+    config:
+      - "no shutdown"
+  ib 1/35:
+    description: port 35
+    config:
+      - "no shutdown"
+  ib 1/36:
+    description: port 36
+    config:
+      - "no shutdown"
+
+# save_changes_to_startup: is a boolean flag. By default, this option is set to false.
+# When set to true, it will save the switch's running configuration to the startup configuration file
+# after the role applies its configuration. This will allow the configuration to persist after a
+# restart or power failure.
 save_changes_to_startup: false

+ 63 - 63
control_plane/roles/control_plane_monitoring/tasks/install_k8s_prom_stack.yml

@@ -1,63 +1,63 @@
-#  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.
----
-
-- name: Add prometheus-community chart
-  kubernetes.core.helm_repository:
-    name: prometheus-community
-    repo_url: "{{ helm_repo_prometheus }}"
-  failed_when: False
-
-- name: Install kube-prom-stack
-  block:
-    - name: Install kube-prom-stack
-      kubernetes.core.helm:
-        name: "{{ monitoring_app_name }}"
-        chart_ref: prometheus-community/kube-prometheus-stack
-        chart_version: "{{ k8s_prom_stack_chart_version }}"
-        update_repo_cache: True
-        release_namespace: "{{ monitoring_namespace }}"
-        create_namespace : yes
-        wait: true
-        values:
-          grafana:
-            enabled: False
-  rescue:
-    - name: Delete helm kube-prom-stack deployments
-      command: helm delete {{ monitoring_app_name }} -n {{ monitoring_namespace }}
-      changed_when: True
-      failed_when: False
-
-    - name: Delete existing kube-prom-stack crd
-      command: "kubectl delete crd {{ item }}"
-      changed_when: True
-      failed_when: False
-      with_items: "{{ k8s_prom_stack_crd }}"
-
-    - name: Install kube-prom-stack
-      kubernetes.core.helm:
-        name: "{{ monitoring_app_name }}"
-        chart_ref: prometheus-community/kube-prometheus-stack
-        chart_version: "{{ k8s_prom_stack_chart_version }}"
-        update_repo_cache: True
-        release_namespace: "{{ monitoring_namespace }}"
-        create_namespace : yes
-        wait: true
-        values:
-          grafana:
-            enabled: False
-
-- name: Wait for kube-prom-stack pod to come to ready state
-  command: kubectl wait --for=condition=ready --timeout=10m -n "{{ monitoring_namespace }}" pod -l app=kube-prometheus-stack-operator
-  changed_when: false
+#  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.
+---
+
+- name: Add prometheus-community chart
+  kubernetes.core.helm_repository:
+    name: prometheus-community
+    repo_url: "{{ helm_repo_prometheus }}"
+  failed_when: False
+
+- name: Install kube-prom-stack
+  block:
+    - name: Install kube-prom-stack
+      kubernetes.core.helm:
+        name: "{{ monitoring_app_name }}"
+        chart_ref: prometheus-community/kube-prometheus-stack
+        chart_version: "{{ k8s_prom_stack_chart_version }}"
+        update_repo_cache: True
+        release_namespace: "{{ monitoring_namespace }}"
+        create_namespace : yes
+        wait: true
+        values:
+          grafana:
+            enabled: False
+  rescue:
+    - name: Delete helm kube-prom-stack deployments
+      command: helm delete {{ monitoring_app_name }} -n {{ monitoring_namespace }}
+      changed_when: True
+      failed_when: False
+
+    - name: Delete existing kube-prom-stack crd
+      command: "kubectl delete crd {{ item }}"
+      changed_when: True
+      failed_when: False
+      with_items: "{{ k8s_prom_stack_crd }}"
+
+    - name: Install kube-prom-stack
+      kubernetes.core.helm:
+        name: "{{ monitoring_app_name }}"
+        chart_ref: prometheus-community/kube-prometheus-stack
+        chart_version: "{{ k8s_prom_stack_chart_version }}"
+        update_repo_cache: True
+        release_namespace: "{{ monitoring_namespace }}"
+        create_namespace : yes
+        wait: true
+        values:
+          grafana:
+            enabled: False
+
+- name: Wait for kube-prom-stack pod to come to ready state
+  command: kubectl wait --for=condition=ready --timeout=10m -n "{{ monitoring_namespace }}" pod -l app=kube-prometheus-stack-operator
+  changed_when: false

+ 32 - 32
control_plane/roles/control_plane_monitoring/tasks/main.yml

@@ -1,32 +1,32 @@
-#  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.
----
-
-- name: Install K8s prometheus stack
-  import_tasks: install_k8s_prom_stack.yml
-
-- name: Configure K8s prometheus in grafana
-  import_tasks: configure_k8s_prom_grafana.yml
-
-- name: Build promtail image
-  import_tasks: promtail_image.yml
-
-- name: Deploy loki pod
-  import_tasks: k8s_loki_pod.yml
-
-- name: Deploy loki service
-  import_tasks: loki_service.yml
-
-- name: Configure loki in grafana
-  import_tasks: configure_loki_grafana.yml
+#  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.
+---
+
+- name: Install K8s prometheus stack
+  import_tasks: install_k8s_prom_stack.yml
+
+- name: Configure K8s prometheus in grafana
+  import_tasks: configure_k8s_prom_grafana.yml
+
+- name: Build promtail image
+  import_tasks: promtail_image.yml
+
+- name: Deploy loki pod
+  import_tasks: k8s_loki_pod.yml
+
+- name: Deploy loki service
+  import_tasks: loki_service.yml
+
+- name: Configure loki in grafana
+  import_tasks: configure_loki_grafana.yml

+ 9 - 2
control_plane/roles/powervault_me4/tasks/main.yml

@@ -1,4 +1,4 @@
-#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  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.
@@ -23,23 +23,30 @@
 - name: Include variable file base_vars.yml
   include_vars: "{{ base_pv_file }}"
   no_log: true
+  run_once: true
 
 - name: Include variable file for powervault
   include_vars: "{{ pv_file }}"
   no_log: true
+  run_once: true
 
 - name: Include common variables
   include_vars: ../../control_plane_common/vars/main.yml
+  run_once: true
 
 - name: Validation of powervault vars
   include: pv_validation.yml
+  run_once: true
 
 - name: Check powervault pre-requisite
   include_tasks: pv_me4_prereq.yml
+  run_once: true
 
 - name: Create volume
   include_tasks: volume.yml
+  run_once: true
 
 - name: Set snmp parameters
   include_tasks: set_snmp.yml
-  when: snmp_trap_destination != ""
+  when: snmp_trap_destination != ""
+  run_once: true

+ 87 - 87
control_plane/roles/webui_grafana/tasks/deployment.yml

@@ -1,87 +1,87 @@
-# 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.
----
-
-- name: Grafana pod
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: apps/v1
-      kind: Deployment
-      metadata:
-        name: "{{ grafana_k8s }}"
-        namespace: "{{ grafana_namespace }}"
-        labels:
-          app: "{{ grafana_k8s }}"
-      spec:
-        selector:
-          matchLabels:
-            app: "{{ grafana_k8s }}"
-        replicas: 1
-        strategy:
-          type: RollingUpdate
-        template:
-          metadata:
-            labels:
-              app: "{{ grafana_k8s }}"
-          spec:
-            containers:
-              - name: grafana
-                image: "{{ grafana_image }}"
-                imagePullPolicy: "IfNotPresent"
-                env:
-                - name: GF_SERVER_HTTP_PORT
-                  value: "{{ grafana_port }}"
-                - name: GF_PLUGINS_PLUGIN_ADMIN_ENABLED
-                  value: "true"
-                - name: GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS
-                  value: "{{ grafana_plugins_names }}"
-                - name: GF_SECURITY_ADMIN_USER
-                  valueFrom:
-                    secretKeyRef:
-                      name: "{{ grafana_secrets }}"
-                      key: grafana_username
-                - name: GF_SECURITY_ADMIN_PASSWORD
-                  valueFrom:
-                    secretKeyRef:
-                      name: "{{ grafana_secrets }}"
-                      key: grafana_password
-                ports:
-                - containerPort: "{{ grafana_http_port }}"
-                volumeMounts:
-                - mountPath: /var/lib/grafana/
-                  name: grafana-data
-            volumes:
-            - name: grafana-data
-              persistentVolumeClaim:
-                claimName: grafana-volume-claim
-
-- name: Service for grafana
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: Service
-      metadata:
-        name: "{{ grafana_k8s }}"
-        namespace: "{{ grafana_namespace }}"
-        labels:
-          app: "{{ grafana_k8s }}"
-      spec:
-        type: ClusterIP
-        ports:
-          - name: http
-            port: "{{ grafana_http_port }}"
-        selector:
-          app: "{{ grafana_k8s }}"
+# 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.
+---
+
+- name: Grafana pod
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: apps/v1
+      kind: Deployment
+      metadata:
+        name: "{{ grafana_k8s }}"
+        namespace: "{{ grafana_namespace }}"
+        labels:
+          app: "{{ grafana_k8s }}"
+      spec:
+        selector:
+          matchLabels:
+            app: "{{ grafana_k8s }}"
+        replicas: 1
+        strategy:
+          type: RollingUpdate
+        template:
+          metadata:
+            labels:
+              app: "{{ grafana_k8s }}"
+          spec:
+            containers:
+              - name: grafana
+                image: "{{ grafana_image }}"
+                imagePullPolicy: "IfNotPresent"
+                env:
+                - name: GF_SERVER_HTTP_PORT
+                  value: "{{ grafana_port }}"
+                - name: GF_PLUGINS_PLUGIN_ADMIN_ENABLED
+                  value: "true"
+                - name: GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS
+                  value: "{{ grafana_plugins_names }}"
+                - name: GF_SECURITY_ADMIN_USER
+                  valueFrom:
+                    secretKeyRef:
+                      name: "{{ grafana_secrets }}"
+                      key: grafana_username
+                - name: GF_SECURITY_ADMIN_PASSWORD
+                  valueFrom:
+                    secretKeyRef:
+                      name: "{{ grafana_secrets }}"
+                      key: grafana_password
+                ports:
+                - containerPort: "{{ grafana_http_port }}"
+                volumeMounts:
+                - mountPath: /var/lib/grafana/
+                  name: grafana-data
+            volumes:
+            - name: grafana-data
+              persistentVolumeClaim:
+                claimName: grafana-volume-claim
+
+- name: Service for grafana
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: Service
+      metadata:
+        name: "{{ grafana_k8s }}"
+        namespace: "{{ grafana_namespace }}"
+        labels:
+          app: "{{ grafana_k8s }}"
+      spec:
+        type: ClusterIP
+        ports:
+          - name: http
+            port: "{{ grafana_http_port }}"
+        selector:
+          app: "{{ grafana_k8s }}"

+ 39 - 39
control_plane/roles/webui_grafana/tasks/main.yml

@@ -1,39 +1,39 @@
-# 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.
----
-
-- name: Pre-requisites for grafana
-  include_tasks: pre-requisites.yml
-
-- name: Create k8s secrets for grafana
-  include_tasks: secrets.yml
-
-- name: Create persistent volume for grafana
-  include_tasks: volume.yml
-
-- name: Create grafana pod
-  include_tasks: deployment.yml
-
-- name: Add grafana-plugins for visualization
-  include_tasks: plugins.yml
-
-- name: Get grafana service IP
-  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.clusterIP}'
-  changed_when: false
-  register: grafana_svc_ip
-
-- name: Get grafana service port
-  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.ports[0].port}'
-  changed_when: false
-  register: grafana_svc_port
+# 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.
+---
+
+- name: Pre-requisites for grafana
+  include_tasks: pre-requisites.yml
+
+- name: Create k8s secrets for grafana
+  include_tasks: secrets.yml
+
+- name: Create persistent volume for grafana
+  include_tasks: volume.yml
+
+- name: Create grafana pod
+  include_tasks: deployment.yml
+
+- name: Add grafana-plugins for visualization
+  include_tasks: plugins.yml
+
+- name: Get grafana service IP
+  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.clusterIP}'
+  changed_when: false
+  register: grafana_svc_ip
+
+- name: Get grafana service port
+  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.ports[0].port}'
+  changed_when: false
+  register: grafana_svc_port

+ 35 - 35
control_plane/roles/webui_grafana/tasks/plugins.yml

@@ -1,35 +1,35 @@
-# 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.
----
-
-- name: Git clone grafana plugin repo
-  ansible.builtin.git:
-    repo: "{{ grafana_plugins_github_repo }}"
-    dest: "{{ mount_location + grafana_plugins_folder_name }}"
-    version: main
-
-- name: Wait for grafana pod to come to ready state
-  command: kubectl wait --for=condition=ready --timeout=10m -n "{{ grafana_namespace }}" pod -l app="{{ grafana_k8s }}"
-  changed_when: false
-  
-- name: Unzip plugins at grafana-plugins folder
-  unarchive:
-    src: "{{ mount_location + grafana_plugins_folder_name + item }}"
-    dest: "{{ mount_location + grafana_k8s + '/plugins/'}}"
-  with_items: "{{ plugins_name }}"
-  changed_when: false
-
-- name: Restart grafana deployment to add grafana plugins
-  command: kubectl rollout restart deployment -n "{{ grafana_namespace }}"
-  changed_when: false
+# 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.
+---
+
+- name: Git clone grafana plugin repo
+  ansible.builtin.git:
+    repo: "{{ grafana_plugins_github_repo }}"
+    dest: "{{ mount_location + grafana_plugins_folder_name }}"
+    version: main
+
+- name: Wait for grafana pod to come to ready state
+  command: kubectl wait --for=condition=ready --timeout=10m -n "{{ grafana_namespace }}" pod -l app="{{ grafana_k8s }}"
+  changed_when: false
+  
+- name: Unzip plugins at grafana-plugins folder
+  unarchive:
+    src: "{{ mount_location + grafana_plugins_folder_name + item }}"
+    dest: "{{ mount_location + grafana_k8s + '/plugins/'}}"
+  with_items: "{{ plugins_name }}"
+  changed_when: false
+
+- name: Restart grafana deployment to add grafana plugins
+  command: kubectl rollout restart deployment -n "{{ grafana_namespace }}"
+  changed_when: false

+ 40 - 40
control_plane/roles/webui_grafana/tasks/pre-requisites.yml

@@ -1,40 +1,40 @@
-# 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.
----
-
-- name: Add kubernetes and grafana ansible-galaxy collection
-  command: ansible-galaxy collection install "{{ item }}"
-  with_items: "{{ collections_name }}"
-  changed_when: false
-  
-- name: Install openshift using pip3
-  pip:
-    name: openshift
-    state: present
-    executable: pip3
-
-- name: Create grafana namespace
-  kubernetes.core.k8s:
-    api_version: v1
-    kind: Namespace
-    name: "{{ grafana_namespace }}"
-    state: present
-
-- name: Make grafana persistent directory if it doesnt exist
-  file:
-    path: "{{ mount_location + grafana_k8s }}"
-    state: directory
-    mode: "{{ directory_mode }}"
-    group: root
-    owner: root
+# 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.
+---
+
+- name: Add kubernetes and grafana ansible-galaxy collection
+  command: ansible-galaxy collection install "{{ item }}"
+  with_items: "{{ collections_name }}"
+  changed_when: false
+  
+- name: Install openshift using pip3
+  pip:
+    name: openshift
+    state: present
+    executable: pip3
+
+- name: Create grafana namespace
+  kubernetes.core.k8s:
+    api_version: v1
+    kind: Namespace
+    name: "{{ grafana_namespace }}"
+    state: present
+
+- name: Make grafana persistent directory if it doesnt exist
+  file:
+    path: "{{ mount_location + grafana_k8s }}"
+    state: directory
+    mode: "{{ directory_mode }}"
+    group: root
+    owner: root

+ 44 - 44
control_plane/roles/webui_grafana/tasks/secrets.yml

@@ -1,44 +1,44 @@
-# 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.
----
-
-- name: Encrypt grafana username
-  shell: |
-    set -o pipefail
-    echo -n "{{ grafana_username }}" | base64
-  register: grafana_user_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Encrypt grafana password
-  shell: |
-    set -o pipefail
-    echo -n "{{ grafana_password }}" | base64
-  register: grafana_password_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Kubernetes secrets
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: Secret
-      metadata:
-        name: "{{ grafana_secrets }}"
-        namespace: "{{ grafana_namespace }}"
-      type: Opaque
-      data:
-        grafana_username: "{{ grafana_user_encrypted.stdout }}"
-        grafana_password: "{{ grafana_password_encrypted.stdout }}"
+# 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.
+---
+
+- name: Encrypt grafana username
+  shell: |
+    set -o pipefail
+    echo -n "{{ grafana_username }}" | base64
+  register: grafana_user_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Encrypt grafana password
+  shell: |
+    set -o pipefail
+    echo -n "{{ grafana_password }}" | base64
+  register: grafana_password_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Kubernetes secrets
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: Secret
+      metadata:
+        name: "{{ grafana_secrets }}"
+        namespace: "{{ grafana_namespace }}"
+      type: Opaque
+      data:
+        grafana_username: "{{ grafana_user_encrypted.stdout }}"
+        grafana_password: "{{ grafana_password_encrypted.stdout }}"

+ 52 - 52
control_plane/roles/webui_grafana/tasks/volume.yml

@@ -1,52 +1,52 @@
-# 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.
----
-
-- name: Persistent volume for grafana
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: PersistentVolume
-      metadata:
-        name: grafana-volume
-        namespace: "{{ grafana_namespace }}"
-        labels:
-          type: manual
-      spec:
-        storageClassName: manual
-        capacity:
-          storage: "{{ grafana_volume_memory }}"
-        accessModes:
-          - ReadWriteOnce
-        hostPath:
-          path: "{{ mount_location + grafana_k8s }}"
-
-
-- name: Persistent volume claim for grafana
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: PersistentVolumeClaim
-      metadata:
-        name: grafana-volume-claim
-        namespace: "{{ grafana_namespace }}"
-      spec:
-        storageClassName: manual
-        accessModes:
-          - ReadWriteOnce
-        resources:
-          requests:
-            storage: "{{ grafana_volume_memory }}"
+# 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.
+---
+
+- name: Persistent volume for grafana
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: PersistentVolume
+      metadata:
+        name: grafana-volume
+        namespace: "{{ grafana_namespace }}"
+        labels:
+          type: manual
+      spec:
+        storageClassName: manual
+        capacity:
+          storage: "{{ grafana_volume_memory }}"
+        accessModes:
+          - ReadWriteOnce
+        hostPath:
+          path: "{{ mount_location + grafana_k8s }}"
+
+
+- name: Persistent volume claim for grafana
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
+        name: grafana-volume-claim
+        namespace: "{{ grafana_namespace }}"
+      spec:
+        storageClassName: manual
+        accessModes:
+          - ReadWriteOnce
+        resources:
+          requests:
+            storage: "{{ grafana_volume_memory }}"

+ 45 - 45
control_plane/roles/webui_grafana/vars/main.yml

@@ -1,45 +1,45 @@
-#  Copyright 2021 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: pre-requisites.yml
-collections_name:
-  - kubernetes.core
-  - community.grafana
-directory_mode: '0774'
-
-# Usage: secrets.yml
-grafana_secrets: grafana-secrets
-
-# Usage: volume.yml
-grafana_volume_memory: 1Gi
-
-# Usage: deployment.yml
-grafana_k8s: grafana
-grafana_namespace: grafana
-grafana_image: grafana/grafana-enterprise:8.3.2
-
-# Usage: deployment.yml
-grafana_port: "5000"
-grafana_http_port: 5000
-grafana_plugins_names: "hpcviz-idvl-hpcc-sankey,hpcviz-idvl-hpcc-parallel-coordinate,hpcviz-idvl-hpcc-spiral-layout,hpcviz-idvl-hpcc-stream-net"
-
-# Usage: plugins.yml
-plugins_name:
-  - parallel-coordinate.zip
-  - sankey.zip
-  - spiral-layout.zip
-  - stream-net.zip
-grafana_plugins_folder_name: github-grafana-plugins/
-grafana_plugins_github_repo: https://github.com/nsfcac/grafana-plugin.git
+#  Copyright 2021 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: pre-requisites.yml
+collections_name:
+  - kubernetes.core
+  - community.grafana
+directory_mode: '0774'
+
+# Usage: secrets.yml
+grafana_secrets: grafana-secrets
+
+# Usage: volume.yml
+grafana_volume_memory: 1Gi
+
+# Usage: deployment.yml
+grafana_k8s: grafana
+grafana_namespace: grafana
+grafana_image: grafana/grafana-enterprise:8.3.2
+
+# Usage: deployment.yml
+grafana_port: "5000"
+grafana_http_port: 5000
+grafana_plugins_names: "hpcviz-idvl-hpcc-sankey,hpcviz-idvl-hpcc-parallel-coordinate,hpcviz-idvl-hpcc-spiral-layout,hpcviz-idvl-hpcc-stream-net"
+
+# Usage: plugins.yml
+plugins_name:
+  - parallel-coordinate.zip
+  - sankey.zip
+  - spiral-layout.zip
+  - stream-net.zip
+grafana_plugins_folder_name: github-grafana-plugins/
+grafana_plugins_github_repo: https://github.com/nsfcac/grafana-plugin.git

+ 140 - 140
platforms/roles/kubeflow/tasks/deploy_kubeflow.yml

@@ -1,141 +1,141 @@
-#  Copyright 2020 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.
----
-
-- name: Download kfctl release from the Kubeflow releases page
-  unarchive:
-    src: "{{ kfctl_download_url }}"
-    dest: "{{ kfctl_download_dest_path }}"
-    mode: "{{ kfctl_download_file_mode }}"
-    remote_src: yes
-
-- name: Delete omnia kubeflow directory if exists
-  file:
-    path: "{{ omnia_kubeflow_dir_path }}"
-    state: absent
-
-- name: Create omnia kubeflow directory
-  file:
-    path: "{{ omnia_kubeflow_dir_path }}"
-    state: directory
-    mode: "{{ omnia_kubeflow_dir_mode }}"
-    recurse: yes
-
-- name: Build kubeflow configuration
-  command:
-    cmd: /usr/bin/kfctl build -V -f "{{ kubeflow_config_yaml_url }}"
-    chdir: "{{ omnia_kubeflow_dir_path }}"
-  changed_when: true
-
-- name: Modify CPU limit for istio-ingressgateway-service-account
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: '---'
-    regexp: 'cpu: 100m'
-    replace: 'cpu: 2'
-
-- name: Modify memory limit for istio-ingressgateway-service-account
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: '---'
-    regexp: 'memory: 128Mi'
-    replace: 'memory: 512Mi'
-
-- name: Modify CPU request for istio-ingressgateway-service-account
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: '---'
-    regexp: 'cpu: 10m'
-    replace: 'cpu: 1'
-
-- name: Modify memory request for istio-ingressgateway-service-account
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: '---'
-    regexp: 'memory: 40Mi'
-    replace: 'memory: 256Mi'
-
-- name: Modify memory request for istio-engressgateway-service-account
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    after: 'serviceAccountName: istio-egressgateway-service-account'
-    before: '---'
-    regexp: 'memory: 128Mi'
-    replace: 'memory: 256Mi'
-
-- name: Modify memory request for istio-engressgateway-service-account
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    after: 'serviceAccountName: istio-egressgateway-service-account'
-    before: '---'
-    regexp: 'memory: 40Mi'
-    replace: 'memory: 128Mi'
-
-- name: Modify CPU limit for kfserving-gateway
-  replace:
-    path: "{{ kfserving_gateway_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: 'env:'
-    regexp: 'cpu: 100m'
-    replace: 'cpu: 2'
-
-- name: Modify memory limit for kfserving-gateway
-  replace:
-    path: "{{ kfserving_gateway_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: 'env:'
-    regexp: 'memory: 128Mi'
-    replace: 'memory: 512Mi'
-
-- name: Modify CPU request for kfserving-gateway
-  replace:
-    path: "{{ kfserving_gateway_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: 'env:'
-    regexp: 'cpu: 10m'
-    replace: 'cpu: 1'
-
-- name: Modify memory request for kfserving-gateway
-  replace:
-    path: "{{ kfserving_gateway_yaml_file_path }}"
-    after: 'serviceAccountName: istio-ingressgateway-service-account'
-    before: 'env:'
-    regexp: 'memory: 40Mi'
-    replace: 'memory: 256Mi'
-
-- name: Change argo base service from NodePort to LoadBalancer
-  replace:
-    path: "{{ argo_yaml_file_path }}"
-    regexp: 'NodePort'
-    replace: 'LoadBalancer'
-
-- name: Change istio-install base istio-noauth service from NodePort to LoadBalancer
-  replace:
-    path: "{{ istio_noauth_yaml_file_path }}"
-    regexp: 'NodePort'
-    replace: 'LoadBalancer'
-
-- name: Apply kubeflow configuration
-  command:
-    cmd: "/usr/bin/kfctl apply -V -f '{{ kubeflow_config_file }}'"
-    chdir: "{{ omnia_kubeflow_dir_path }}"
-  changed_when: true
-  register: apply_kubeflow_config
-  until: apply_kubeflow_config is not failed
-  retries: 20
+#  Copyright 2020 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.
+---
+
+- name: Download kfctl release from the Kubeflow releases page
+  unarchive:
+    src: "{{ kfctl_download_url }}"
+    dest: "{{ kfctl_download_dest_path }}"
+    mode: "{{ kfctl_download_file_mode }}"
+    remote_src: yes
+
+- name: Delete omnia kubeflow directory if exists
+  file:
+    path: "{{ omnia_kubeflow_dir_path }}"
+    state: absent
+
+- name: Create omnia kubeflow directory
+  file:
+    path: "{{ omnia_kubeflow_dir_path }}"
+    state: directory
+    mode: "{{ omnia_kubeflow_dir_mode }}"
+    recurse: yes
+
+- name: Build kubeflow configuration
+  command:
+    cmd: /usr/bin/kfctl build -V -f "{{ kubeflow_config_yaml_url }}"
+    chdir: "{{ omnia_kubeflow_dir_path }}"
+  changed_when: true
+
+- name: Modify CPU limit for istio-ingressgateway-service-account
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: '---'
+    regexp: 'cpu: 100m'
+    replace: 'cpu: 2'
+
+- name: Modify memory limit for istio-ingressgateway-service-account
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: '---'
+    regexp: 'memory: 128Mi'
+    replace: 'memory: 512Mi'
+
+- name: Modify CPU request for istio-ingressgateway-service-account
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: '---'
+    regexp: 'cpu: 10m'
+    replace: 'cpu: 1'
+
+- name: Modify memory request for istio-ingressgateway-service-account
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: '---'
+    regexp: 'memory: 40Mi'
+    replace: 'memory: 256Mi'
+
+- name: Modify memory request for istio-engressgateway-service-account
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    after: 'serviceAccountName: istio-egressgateway-service-account'
+    before: '---'
+    regexp: 'memory: 128Mi'
+    replace: 'memory: 256Mi'
+
+- name: Modify memory request for istio-engressgateway-service-account
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    after: 'serviceAccountName: istio-egressgateway-service-account'
+    before: '---'
+    regexp: 'memory: 40Mi'
+    replace: 'memory: 128Mi'
+
+- name: Modify CPU limit for kfserving-gateway
+  replace:
+    path: "{{ kfserving_gateway_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: 'env:'
+    regexp: 'cpu: 100m'
+    replace: 'cpu: 2'
+
+- name: Modify memory limit for kfserving-gateway
+  replace:
+    path: "{{ kfserving_gateway_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: 'env:'
+    regexp: 'memory: 128Mi'
+    replace: 'memory: 512Mi'
+
+- name: Modify CPU request for kfserving-gateway
+  replace:
+    path: "{{ kfserving_gateway_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: 'env:'
+    regexp: 'cpu: 10m'
+    replace: 'cpu: 1'
+
+- name: Modify memory request for kfserving-gateway
+  replace:
+    path: "{{ kfserving_gateway_yaml_file_path }}"
+    after: 'serviceAccountName: istio-ingressgateway-service-account'
+    before: 'env:'
+    regexp: 'memory: 40Mi'
+    replace: 'memory: 256Mi'
+
+- name: Change argo base service from NodePort to LoadBalancer
+  replace:
+    path: "{{ argo_yaml_file_path }}"
+    regexp: 'NodePort'
+    replace: 'LoadBalancer'
+
+- name: Change istio-install base istio-noauth service from NodePort to LoadBalancer
+  replace:
+    path: "{{ istio_noauth_yaml_file_path }}"
+    regexp: 'NodePort'
+    replace: 'LoadBalancer'
+
+- name: Apply kubeflow configuration
+  command:
+    cmd: "/usr/bin/kfctl apply -V -f '{{ kubeflow_config_file }}'"
+    chdir: "{{ omnia_kubeflow_dir_path }}"
+  changed_when: true
+  register: apply_kubeflow_config
+  until: apply_kubeflow_config is not failed
+  retries: 20
   delay: 10

+ 44 - 44
platforms/roles/kubeflow/tasks/firewalld_config.yml

@@ -1,45 +1,45 @@
-#  Copyright 2020 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.
----
-
-- name: Install firewalld
-  package:
-    name: firewalld
-    state: present
-  tags: firewalld
-
-- name: Start and enable firewalld
-  service:
-    name: firewalld
-    state: started
-    enabled: yes
-  tags: firewalld
-
-- name: Configure firewalld on master nodes
-  firewalld:
-    port: "{{ item }}/tcp"
-    permanent: yes
-    state: enabled
-  with_items: '{{ kubeflow_firewalld_ports }}'
-  tags: firewalld
-
-- name: Masquerade the firewall
-  command: firewall-cmd --add-masquerade --permanent
-  changed_when: true
-  tags: firewalld
-
-- name: Reload firewalld
-  command: firewall-cmd --reload
-  changed_when: true
+#  Copyright 2020 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.
+---
+
+- name: Install firewalld
+  package:
+    name: firewalld
+    state: present
+  tags: firewalld
+
+- name: Start and enable firewalld
+  service:
+    name: firewalld
+    state: started
+    enabled: yes
+  tags: firewalld
+
+- name: Configure firewalld on master nodes
+  firewalld:
+    port: "{{ item }}/tcp"
+    permanent: yes
+    state: enabled
+  with_items: '{{ kubeflow_firewalld_ports }}'
+  tags: firewalld
+
+- name: Masquerade the firewall
+  command: firewall-cmd --add-masquerade --permanent
+  changed_when: true
+  tags: firewalld
+
+- name: Reload firewalld
+  command: firewall-cmd --reload
+  changed_when: true
   tags: firewalld

+ 2 - 2
roles/k8s_start_services/files/grafana_svc_details.ini

@@ -1,3 +1,3 @@
-[grafana_svc]
-ip=
+[grafana_svc]
+ip=
 port=

+ 73 - 73
roles/k8s_start_services/tasks/configure_nginx_prom_grafana.yml

@@ -1,73 +1,73 @@
-#  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.
----
-
-- name: Install Nginx
-  package:
-    name: nginx
-    state: present
-  when: ansible_facts['distribution'] != opensuse_os_name
-
-- name: Install Nginx
-  zypper:
-    name: nginx
-    state: present
-  when: ansible_facts['distribution'] == opensuse_os_name
-
-- name: Get prometheus service IP
-  command: kubectl get svc -l app=prometheus,component=server -o=jsonpath='{.items[0].spec.clusterIP}'
-  changed_when: false
-  register: prometheus_svc_ip
-
-- name: Configure nginx.conf (1/2)
-  replace:
-    path: "{{ role_path }}/templates/nginx.conf.j2"
-    regexp: '        server_name  .*'
-    replace: "        server_name  {{ ansible_default_ipv4.address }};"
-  delegate_to: localhost
-
-- name: Configure nginx.conf (2/2)
-  replace:
-    path: "{{ role_path }}/templates/nginx.conf.j2"
-    regexp: '          proxy_pass http://.*'
-    replace: "          proxy_pass http://{{ prometheus_svc_ip.stdout }};"
-  delegate_to: localhost
-
-- name: Load nginx conf
-  template:
-    src: nginx.conf.j2
-    dest: "{{ nginx_conf_file_path }}"
-    mode: "{{ nginx_conf_file_mode }}"
-
-- name: Validate nginx conf file
-  command: nginx -t
-  changed_when: false
-
-- name: Start and enable nginx service
-  service:
-    name: nginx
-    state: restarted
-    enabled: yes
-
-- name: Create prometheus datasource in grafana
-  community.grafana.grafana_datasource:
-    name: "hpc-prometheus-{{ ansible_default_ipv4.address }}"
-    grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
-    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
-    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
-    ds_type: prometheus
-    ds_url: "http://{{ ansible_default_ipv4.address }}:{{ nginx_listen_port }}"
-    access: direct
-  delegate_to: localhost
-  no_log: true
+#  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.
+---
+
+- name: Install Nginx
+  package:
+    name: nginx
+    state: present
+  when: ansible_facts['distribution'] != opensuse_os_name
+
+- name: Install Nginx
+  zypper:
+    name: nginx
+    state: present
+  when: ansible_facts['distribution'] == opensuse_os_name
+
+- name: Get prometheus service IP
+  command: kubectl get svc -l app=prometheus,component=server -o=jsonpath='{.items[0].spec.clusterIP}'
+  changed_when: false
+  register: prometheus_svc_ip
+
+- name: Configure nginx.conf (1/2)
+  replace:
+    path: "{{ role_path }}/templates/nginx.conf.j2"
+    regexp: '        server_name  .*'
+    replace: "        server_name  {{ ansible_default_ipv4.address }};"
+  delegate_to: localhost
+
+- name: Configure nginx.conf (2/2)
+  replace:
+    path: "{{ role_path }}/templates/nginx.conf.j2"
+    regexp: '          proxy_pass http://.*'
+    replace: "          proxy_pass http://{{ prometheus_svc_ip.stdout }};"
+  delegate_to: localhost
+
+- name: Load nginx conf
+  template:
+    src: nginx.conf.j2
+    dest: "{{ nginx_conf_file_path }}"
+    mode: "{{ nginx_conf_file_mode }}"
+
+- name: Validate nginx conf file
+  command: nginx -t
+  changed_when: false
+
+- name: Start and enable nginx service
+  service:
+    name: nginx
+    state: restarted
+    enabled: yes
+
+- name: Create prometheus datasource in grafana
+  community.grafana.grafana_datasource:
+    name: "hpc-prometheus-{{ ansible_default_ipv4.address }}"
+    grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
+    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
+    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
+    ds_type: prometheus
+    ds_url: "http://{{ ansible_default_ipv4.address }}:{{ nginx_listen_port }}"
+    access: direct
+  delegate_to: localhost
+  no_log: true

File diff suppressed because it is too large
+ 1533 - 1533
roles/slurm_exporter/files/slurm-dashboard-node-exporter.json


+ 64 - 64
roles/slurm_exporter/tasks/configure_grafana.yml

@@ -1,64 +1,64 @@
-#  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.
----
-
-- name: Include k8s_start_services variables
-  include_vars: ../../k8s_start_services/vars/main.yml
-
-- name: Create prometheus datasource in grafana
-  community.grafana.grafana_datasource:
-    name: "hpc-prometheus-{{ ansible_default_ipv4.address }}"
-    grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
-    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
-    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
-    ds_type: prometheus
-    ds_url: "http://{{ ansible_default_ipv4.address }}:{{ nginx_listen_port }}"
-    access: direct
-  delegate_to: localhost
-  no_log: true
-
-- name: Replace data source in slurm dashboard
-  replace:
-    path: "{{ role_path }}/files/{{ item }}"
-    regexp: '"uid": "hpc.*'
-    replace: '"uid": "hpc-prometheus-{{ ansible_default_ipv4.address }}"'
-  with_items: "{{ slurm_dashboard_json_files }}"
-  delegate_to: localhost
-
-- name: Replace title in slurm dashboard (1/2)
-  replace:
-    path: "{{ role_path }}/files/slurm-dashboard-node-exporter.json"
-    regexp: '"title": "SLURM - Node Exporter Server Metrics.*'
-    replace: '"title": "SLURM - Node Exporter Server Metrics - ({{ ansible_default_ipv4.address }})",'
-  delegate_to: localhost
-
-- name: Replace title in slurm dashboard (2/2)
-  replace:
-    path: "{{ role_path }}/files/slurm-dashboard.json"
-    regexp: '"title": "SLURM - CPUs/GPUs, Nodes, Jobs, Scheduler.*'
-    replace: '"title": "SLURM - CPUs/GPUs, Nodes, Jobs, Scheduler ({{ ansible_default_ipv4.address }})",'
-  delegate_to: localhost
-
-- name: Import Slurm Grafana dashboards
-  community.grafana.grafana_dashboard:
-    grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
-    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
-    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
-    state: present
-    commit_message: Updated by ansible
-    overwrite: yes
-    path: "{{ role_path }}/files/{{ item }}"
-  with_items: "{{ slurm_dashboard_json_files }}"
-  delegate_to: localhost
-  no_log: true
+#  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.
+---
+
+- name: Include k8s_start_services variables
+  include_vars: ../../k8s_start_services/vars/main.yml
+
+- name: Create prometheus datasource in grafana
+  community.grafana.grafana_datasource:
+    name: "hpc-prometheus-{{ ansible_default_ipv4.address }}"
+    grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
+    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
+    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
+    ds_type: prometheus
+    ds_url: "http://{{ ansible_default_ipv4.address }}:{{ nginx_listen_port }}"
+    access: direct
+  delegate_to: localhost
+  no_log: true
+
+- name: Replace data source in slurm dashboard
+  replace:
+    path: "{{ role_path }}/files/{{ item }}"
+    regexp: '"uid": "hpc.*'
+    replace: '"uid": "hpc-prometheus-{{ ansible_default_ipv4.address }}"'
+  with_items: "{{ slurm_dashboard_json_files }}"
+  delegate_to: localhost
+
+- name: Replace title in slurm dashboard (1/2)
+  replace:
+    path: "{{ role_path }}/files/slurm-dashboard-node-exporter.json"
+    regexp: '"title": "SLURM - Node Exporter Server Metrics.*'
+    replace: '"title": "SLURM - Node Exporter Server Metrics - ({{ ansible_default_ipv4.address }})",'
+  delegate_to: localhost
+
+- name: Replace title in slurm dashboard (2/2)
+  replace:
+    path: "{{ role_path }}/files/slurm-dashboard.json"
+    regexp: '"title": "SLURM - CPUs/GPUs, Nodes, Jobs, Scheduler.*'
+    replace: '"title": "SLURM - CPUs/GPUs, Nodes, Jobs, Scheduler ({{ ansible_default_ipv4.address }})",'
+  delegate_to: localhost
+
+- name: Import Slurm Grafana dashboards
+  community.grafana.grafana_dashboard:
+    grafana_url: "http://{{ grafana_svc_ip }}:{{ grafana_svc_port }}"
+    grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
+    grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
+    state: present
+    commit_message: Updated by ansible
+    overwrite: yes
+    path: "{{ role_path }}/files/{{ item }}"
+  with_items: "{{ slurm_dashboard_json_files }}"
+  delegate_to: localhost
+  no_log: true

+ 35 - 35
telemetry/input_params/base_vars.yml

@@ -1,35 +1,35 @@
-# 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.
----
-
-# At this location all telemetry related files will be stored and
-# both timescale and mysql databases will be mounted.
-mount_location: /mnt/omnia/
-
-# This variable is used to enable iDRAC telemetry support and visualizations
-# Accepted values:  "true" or "false"
-idrac_telemetry_support: true
-
-# This variable is used to enable slurm telemetry support and visualizations
-# Pre-requisite: idrac_telemetry_support should be set to true
-# Accepted values:  "true" or "false"
-slurm_telemetry_support: true
-
-# Postgres DB with timescale extension is used for storing iDRAC and slurm telemetry metrics
-# This is the database name which stores these metrics.
-timescaledb_name: telemetry_metrics
-
-# MySQL DB is used to store IPs and credentials of iDRACs having datacenter license
-# This is the database name which stores this information
-mysqldb_name: idrac_telemetrysource_services_db
+# 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.
+---
+
+# At this location all telemetry related files will be stored and
+# both timescale and mysql databases will be mounted.
+mount_location: /mnt/omnia/
+
+# This variable is used to enable iDRAC telemetry support and visualizations
+# Accepted values:  "true" or "false"
+idrac_telemetry_support: true
+
+# This variable is used to enable slurm telemetry support and visualizations
+# Pre-requisite: idrac_telemetry_support should be set to true
+# Accepted values:  "true" or "false"
+slurm_telemetry_support: true
+
+# Postgres DB with timescale extension is used for storing iDRAC and slurm telemetry metrics
+# This is the database name which stores these metrics.
+timescaledb_name: telemetry_metrics
+
+# MySQL DB is used to store IPs and credentials of iDRACs having datacenter license
+# This is the database name which stores this information
+mysqldb_name: idrac_telemetrysource_services_db

+ 44 - 44
telemetry/input_params/login_vars.yml

@@ -1,44 +1,44 @@
-# 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.
----
-
-# Username used for connecting to timescale db
-# The username must not contain -,\, ',"
-# The Length of the username should be at least 2 characters.
-# Mandatory field
-timescaledb_user: ""
-
-# Password used for connecting to timescale db
-# The password must not contain -,\, ',"
-# The Length of the password should be at least 2 characters.
-# Mandatory field
-timescaledb_password: ""
-
-# Username used for connecting to mysql db
-# The username must not contain -,\, ',"
-# The Length of the username should be at least 2 characters.
-# Mandatory field
-mysqldb_user: ""
-
-# Password used for connecting to mysql db
-# The password must not contain -,\, ',"
-# The Length of the password should be at least 2 characters.
-# Mandatory field
-mysqldb_password: ""
-
-# Password used for connecting to timescale db for root user
-# The password must not contain -,\, ',"
-# The Length of the password should be at least 2 characters.
-# Mandatory field
-mysqldb_root_password: ""
+# 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.
+---
+
+# Username used for connecting to timescale db
+# The username must not contain -,\, ',"
+# The Length of the username should be at least 2 characters.
+# Mandatory field
+timescaledb_user: ""
+
+# Password used for connecting to timescale db
+# The password must not contain -,\, ',"
+# The Length of the password should be at least 2 characters.
+# Mandatory field
+timescaledb_password: ""
+
+# Username used for connecting to mysql db
+# The username must not contain -,\, ',"
+# The Length of the username should be at least 2 characters.
+# Mandatory field
+mysqldb_user: ""
+
+# Password used for connecting to mysql db
+# The password must not contain -,\, ',"
+# The Length of the password should be at least 2 characters.
+# Mandatory field
+mysqldb_password: ""
+
+# Password used for connecting to timescale db for root user
+# The password must not contain -,\, ',"
+# The Length of the password should be at least 2 characters.
+# Mandatory field
+mysqldb_root_password: ""

+ 78 - 78
telemetry/roles/common/tasks/k8s_secrets.yml

@@ -1,78 +1,78 @@
-# 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.
----
-
-- name: Create namespace
-  kubernetes.core.k8s:
-    api_version: v1
-    kind: Namespace
-    name: "{{ namespace }}"
-    state: present
-
-- name: Encrypt timescaledb username
-  shell: |
-    set -o pipefail
-    echo -n "{{ timescaledb_user }}" | base64
-  register: timescaledb_user_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Encrypt timescaledb password
-  shell: |
-    set -o pipefail
-    echo -n "{{ timescaledb_password }}" | base64
-  register: timescaledb_password_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Encrypt mysqldb username
-  shell: |
-    set -o pipefail
-    echo -n "{{ mysqldb_user }}" | base64
-  register: mysqldb_user_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Encrypt mysqldb password
-  shell: |
-    set -o pipefail
-    echo -n "{{ mysqldb_password }}" | base64
-  register: mysqldb_password_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Encrypt mysqldb password for root user
-  shell: |
-    set -o pipefail
-    echo -n "{{ mysqldb_root_password }}" | base64
-  register: mysqldb_root_password_encrypted
-  changed_when: false
-  no_log: true
-
-- name: Kubernetes secrets
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: Secret
-      metadata:
-        name: "{{ secrets_name }}"
-        namespace: "{{ namespace }}"
-      type: Opaque
-      data:
-        timescaledb_user: "{{ timescaledb_user_encrypted.stdout }}"
-        timescaledb_password: "{{ timescaledb_password_encrypted.stdout }}"
-        sqldb_user: "{{ mysqldb_user_encrypted.stdout }}"
-        sqldb_password: "{{ mysqldb_password_encrypted.stdout }}"
-        sqldb_root_password: "{{ mysqldb_root_password_encrypted.stdout }}"
+# 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.
+---
+
+- name: Create namespace
+  kubernetes.core.k8s:
+    api_version: v1
+    kind: Namespace
+    name: "{{ namespace }}"
+    state: present
+
+- name: Encrypt timescaledb username
+  shell: |
+    set -o pipefail
+    echo -n "{{ timescaledb_user }}" | base64
+  register: timescaledb_user_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Encrypt timescaledb password
+  shell: |
+    set -o pipefail
+    echo -n "{{ timescaledb_password }}" | base64
+  register: timescaledb_password_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Encrypt mysqldb username
+  shell: |
+    set -o pipefail
+    echo -n "{{ mysqldb_user }}" | base64
+  register: mysqldb_user_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Encrypt mysqldb password
+  shell: |
+    set -o pipefail
+    echo -n "{{ mysqldb_password }}" | base64
+  register: mysqldb_password_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Encrypt mysqldb password for root user
+  shell: |
+    set -o pipefail
+    echo -n "{{ mysqldb_root_password }}" | base64
+  register: mysqldb_root_password_encrypted
+  changed_when: false
+  no_log: true
+
+- name: Kubernetes secrets
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: Secret
+      metadata:
+        name: "{{ secrets_name }}"
+        namespace: "{{ namespace }}"
+      type: Opaque
+      data:
+        timescaledb_user: "{{ timescaledb_user_encrypted.stdout }}"
+        timescaledb_password: "{{ timescaledb_password_encrypted.stdout }}"
+        sqldb_user: "{{ mysqldb_user_encrypted.stdout }}"
+        sqldb_password: "{{ mysqldb_password_encrypted.stdout }}"
+        sqldb_root_password: "{{ mysqldb_root_password_encrypted.stdout }}"

+ 26 - 26
telemetry/roles/common/tasks/main.yml

@@ -1,26 +1,26 @@
-# 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.
----
-
-- name: Check pre-requisites for telemetry and visualizations
-  include_tasks: pre-requisites.yml
-
-- name: Validate base_vars.yml
-  include_tasks: validate_base_vars.yml
-
-- name: Validate login_vars.yml
-  include_tasks: validate_login_vars.yml
-
-- name: Create k8s secrets for database credentials
-  include_tasks: k8s_secrets.yml
+# 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.
+---
+
+- name: Check pre-requisites for telemetry and visualizations
+  include_tasks: pre-requisites.yml
+
+- name: Validate base_vars.yml
+  include_tasks: validate_base_vars.yml
+
+- name: Validate login_vars.yml
+  include_tasks: validate_login_vars.yml
+
+- name: Create k8s secrets for database credentials
+  include_tasks: k8s_secrets.yml

+ 66 - 66
telemetry/roles/common/tasks/pre-requisites.yml

@@ -1,66 +1,66 @@
-# 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.
----
-
-- name: Check existence of awx and grafana on management station
-  block:
-    - name: Check AWX instance
-      command: awx --version
-      changed_when: false
-
-    - name: Check grafana service
-      command: kubectl get svc -n grafana
-      register: grafana_svc_register
-      failed_when: "'grafana' not in grafana_svc_register.stdout"
-      changed_when: false
-  rescue:
-    - name: AWX and grafana needs to be installed
-      fail:
-        msg: "{{ control_plane_installation_required }}"
-
-- name: Check that the base_vars.yml exists
-  stat:
-    path: "{{ base_vars_file }}"
-  register: stat_result
-
-- name: Fail if base_vars.yml file doesn't exist
-  fail:
-    msg: "{{ fail_msg_base_vars }}"
-  when: not stat_result.stat.exists
-
-- name: Check that telemetry/login_vars.yml exists
-  stat:
-    path: "{{ login_vars_file }}"
-  register: stat_result
-
-- name: Fail if telemetry/login_vars.yml file doesn't exist
-  fail:
-    msg: "{{ fail_msg_login_vars }}"
-  when: not stat_result.stat.exists
-
-- name: Check that control_plane/login_vars.yml exists
-  stat:
-    path: "{{ ctrl_plane_login_vars_filename }}"
-  register: stat_result
-
-- name: Fail if control_plane/login_vars.yml file doesn't exist
-  fail:
-    msg: "{{ ctrl_plane_fail_msg_login_vars }}"
-  when: not stat_result.stat.exists
-
-- name: Install openshift using pip3
-  pip:
-    name: openshift
-    state: present
-    executable: pip3
+# 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.
+---
+
+- name: Check existence of awx and grafana on management station
+  block:
+    - name: Check AWX instance
+      command: awx --version
+      changed_when: false
+
+    - name: Check grafana service
+      command: kubectl get svc -n grafana
+      register: grafana_svc_register
+      failed_when: "'grafana' not in grafana_svc_register.stdout"
+      changed_when: false
+  rescue:
+    - name: AWX and grafana needs to be installed
+      fail:
+        msg: "{{ control_plane_installation_required }}"
+
+- name: Check that the base_vars.yml exists
+  stat:
+    path: "{{ base_vars_file }}"
+  register: stat_result
+
+- name: Fail if base_vars.yml file doesn't exist
+  fail:
+    msg: "{{ fail_msg_base_vars }}"
+  when: not stat_result.stat.exists
+
+- name: Check that telemetry/login_vars.yml exists
+  stat:
+    path: "{{ login_vars_file }}"
+  register: stat_result
+
+- name: Fail if telemetry/login_vars.yml file doesn't exist
+  fail:
+    msg: "{{ fail_msg_login_vars }}"
+  when: not stat_result.stat.exists
+
+- name: Check that control_plane/login_vars.yml exists
+  stat:
+    path: "{{ ctrl_plane_login_vars_filename }}"
+  register: stat_result
+
+- name: Fail if control_plane/login_vars.yml file doesn't exist
+  fail:
+    msg: "{{ ctrl_plane_fail_msg_login_vars }}"
+  when: not stat_result.stat.exists
+
+- name: Install openshift using pip3
+  pip:
+    name: openshift
+    state: present
+    executable: pip3

+ 71 - 71
telemetry/roles/common/tasks/validate_base_vars.yml

@@ -1,71 +1,71 @@
-# 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.
----
-
-- name: Include telemetry base_vars.yml file
-  include_vars: "{{ base_vars_file }}"
-  no_log: true
-
-- name: Create mount directory if it doesn't exist
-  block:
-    - name: Checking directory
-      stat:
-        path: "{{ mount_location }}"
-      register: stat_result
-
-    - name: Creating directory
-      file:
-        path: "{{ mount_location }}"
-        state: directory
-        mode: "{{ folder_perm }}"
-        group: root
-        owner: root
-      when: not stat_result.stat.exists
-
-- name: Assert idrac telemetry support
-  assert:
-    that:
-      - idrac_telemetry_support == true or idrac_telemetry_support == false
-    quiet: true
-    success_msg: "{{ idrac_telemetry_support_success_msg }}"
-    fail_msg: "{{ idrac_telemetry_support_fail_msg }}"
-
-- name: Assert slurm telemetry support
-  assert:
-    that:
-      - slurm_telemetry_support == true or slurm_telemetry_support == false
-    quiet: true
-    success_msg: "{{ slurm_telemetry_support_success_msg }}"
-    fail_msg: "{{ slurm_telemetry_support_fail_msg }}"
-
-- name: Assert slurm telemetry support
-  assert:
-    that:
-      - idrac_telemetry_support == true
-    quiet: true
-    success_msg: "{{ slurm_telemetry_idrac_support_success_msg }}"
-    fail_msg: "{{ slurm_telemetry_idrac_support_fail_msg }}"
-  when: slurm_telemetry_support is true
-
-- name: Assert timescale db name
-  assert:
-    that: timescaledb_name | length > 1
-    success_msg: "{{ timescaledb_success_msg }}"
-    fail_msg: "{{ timescaledb_fail_msg }}"
-
-- name: Assert mysql db name
-  assert:
-    that: mysqldb_name | length > 1
-    success_msg: "{{ mysqldb_success_msg }}"
-    fail_msg: "{{ mysqldb_fail_msg }}"
+# 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.
+---
+
+- name: Include telemetry base_vars.yml file
+  include_vars: "{{ base_vars_file }}"
+  no_log: true
+
+- name: Create mount directory if it doesn't exist
+  block:
+    - name: Checking directory
+      stat:
+        path: "{{ mount_location }}"
+      register: stat_result
+
+    - name: Creating directory
+      file:
+        path: "{{ mount_location }}"
+        state: directory
+        mode: "{{ folder_perm }}"
+        group: root
+        owner: root
+      when: not stat_result.stat.exists
+
+- name: Assert idrac telemetry support
+  assert:
+    that:
+      - idrac_telemetry_support == true or idrac_telemetry_support == false
+    quiet: true
+    success_msg: "{{ idrac_telemetry_support_success_msg }}"
+    fail_msg: "{{ idrac_telemetry_support_fail_msg }}"
+
+- name: Assert slurm telemetry support
+  assert:
+    that:
+      - slurm_telemetry_support == true or slurm_telemetry_support == false
+    quiet: true
+    success_msg: "{{ slurm_telemetry_support_success_msg }}"
+    fail_msg: "{{ slurm_telemetry_support_fail_msg }}"
+
+- name: Assert slurm telemetry support
+  assert:
+    that:
+      - idrac_telemetry_support == true
+    quiet: true
+    success_msg: "{{ slurm_telemetry_idrac_support_success_msg }}"
+    fail_msg: "{{ slurm_telemetry_idrac_support_fail_msg }}"
+  when: slurm_telemetry_support is true
+
+- name: Assert timescale db name
+  assert:
+    that: timescaledb_name | length > 1
+    success_msg: "{{ timescaledb_success_msg }}"
+    fail_msg: "{{ timescaledb_fail_msg }}"
+
+- name: Assert mysql db name
+  assert:
+    that: mysqldb_name | length > 1
+    success_msg: "{{ mysqldb_success_msg }}"
+    fail_msg: "{{ mysqldb_fail_msg }}"

+ 174 - 174
telemetry/roles/common/tasks/validate_login_vars.yml

@@ -1,174 +1,174 @@
-# 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.
----
-
-# Include telemetry/login_vars.yml
-- name: Check login_vars file is encrypted
-  command: cat {{ login_vars_file }}
-  changed_when: false
-  register: config_content
-  no_log: true
-
-- name: Decrpyt login_vars.yml
-  command: >-
-    ansible-vault decrypt {{ login_vars_file }}
-    --vault-password-file {{ vault_filename }}
-  changed_when: false
-  when: "'$ANSIBLE_VAULT;' in config_content.stdout"
-
-- name: Include variable file telemetry/login_vars.yml
-  include_vars: "{{ login_vars_file }}"
-  no_log: true
-
-- name: Assert usernames and passwords in login_vars.yml
-  block:
-  - name: Assert timescaledb user name
-    assert:
-      that:
-        - timescaledb_user | length > 1
-        - '"-" not in timescaledb_user '
-        - '"\\" not in timescaledb_user '
-        - '"\"" not in timescaledb_user '
-        - " \"'\" not in timescaledb_user "
-    no_log: true
-
-  - name: Assert timescaledb user password
-    assert:
-      that:
-        - timescaledb_password | length > 1
-        - '"-" not in timescaledb_password '
-        - '"\\" not in timescaledb_password '
-        - '"\"" not in timescaledb_password '
-        - " \"'\" not in timescaledb_password "
-    no_log: true
-
-  - name: Assert mysqldb user name
-    assert:
-      that:
-        - mysqldb_user | length > 1
-        - '"-" not in mysqldb_user '
-        - '"\\" not in mysqldb_user '
-        - '"\"" not in mysqldb_user '
-        - " \"'\" not in mysqldb_user "
-    no_log: true
-
-  - name: Assert mysqldb user password
-    assert:
-      that:
-        - mysqldb_password | length > 1
-        - '"-" not in mysqldb_password '
-        - '"\\" not in mysqldb_password '
-        - '"\"" not in mysqldb_password '
-        - " \"'\" not in mysqldb_password "
-    no_log: true
-
-  - name: Assert mysqldb root user password
-    assert:
-      that:
-        - mysqldb_root_password | length > 1
-        - '"-" not in mysqldb_root_password '
-        - '"\\" not in mysqldb_root_password '
-        - '"\"" not in mysqldb_root_password '
-        - " \"'\" not in mysqldb_root_password "
-    no_log: true
-
-  rescue:
-    - name: Validation issue in login/vars.yml
-      fail:
-        msg: "{{ login_vars_fail_msg }}"
-
-- name: Create ansible vault key
-  set_fact:
-    vault_key: "{{ lookup('password', '/dev/null chars=ascii_letters') }}"
-  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
-
-- name: Save vault key
-  copy:
-    dest: "{{ vault_filename }}"
-    content: |
-      {{ vault_key }}
-    owner: root
-    force: yes
-    mode: "{{ vault_file_perm }}"
-  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
-
-- name: Encrypt input config file
-  command: >-
-    ansible-vault encrypt {{ login_vars_file }}
-    --vault-password-file {{ vault_filename }}
-  changed_when: false
-
-# Include control_plane/login_vars.yml
-- name: Check login_vars file is encrypted
-  command: cat {{ ctrl_plane_login_vars_filename }}
-  changed_when: false
-  register: config_content
-  no_log: true
-
-- name: Decrpyt login_vars.yml
-  command: >-
-    ansible-vault decrypt {{ ctrl_plane_login_vars_filename }}
-    --vault-password-file {{ ctrl_plane_login_vault_filename }}
-  changed_when: false
-  when: "'$ANSIBLE_VAULT;' in config_content.stdout"
-
-- name: Include variable file control_plane/login_vars.yml
-  include_vars: "{{ ctrl_plane_login_vars_filename }}"
-  no_log: true
-
-- name: Assert grafana credentials
-  block:
-    - name: Assert grafana_username and grafana_username
-      assert:
-        that:
-          - grafana_username | length >= min_length_grafana
-          - grafana_username | length <= max_length
-          - '"-" not in grafana_username '
-          - '"\\" not in grafana_username '
-          - '"\"" not in grafana_username '
-          - " \"'\" not in grafana_username "
-          - grafana_password | length >= min_length_grafana
-          - grafana_password | length <= max_length
-          - not grafana_password == 'admin'
-          - '"-" not in grafana_password '
-          - '"\\" not in grafana_password '
-          - '"\"" not in grafana_password '
-          - " \"'\" not in grafana_password "
-      no_log: true
-
-  rescue:
-    - name: Validation issue in control_plane/login_vars.yml
-      fail:
-        msg: "{{ ctrl_plane_login_vars_fail_msg }}"
-
-- name: Create ansible vault key
-  set_fact:
-    vault_key: "{{ lookup('password', '/dev/null chars=ascii_letters') }}"
-  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
-
-- name: Save vault key
-  copy:
-    dest: "{{ ctrl_plane_login_vault_filename }}"
-    content: |
-      {{ vault_key }}
-    owner: root
-    force: yes
-    mode: "{{ vault_file_perm }}"
-  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
-
-- name: Encrypt input config file
-  command: >-
-    ansible-vault encrypt {{ ctrl_plane_login_vars_filename }}
-    --vault-password-file {{ ctrl_plane_login_vault_filename }}
-  changed_when: false
+# 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.
+---
+
+# Include telemetry/login_vars.yml
+- name: Check login_vars file is encrypted
+  command: cat {{ login_vars_file }}
+  changed_when: false
+  register: config_content
+  no_log: true
+
+- name: Decrpyt login_vars.yml
+  command: >-
+    ansible-vault decrypt {{ login_vars_file }}
+    --vault-password-file {{ vault_filename }}
+  changed_when: false
+  when: "'$ANSIBLE_VAULT;' in config_content.stdout"
+
+- name: Include variable file telemetry/login_vars.yml
+  include_vars: "{{ login_vars_file }}"
+  no_log: true
+
+- name: Assert usernames and passwords in login_vars.yml
+  block:
+  - name: Assert timescaledb user name
+    assert:
+      that:
+        - timescaledb_user | length > 1
+        - '"-" not in timescaledb_user '
+        - '"\\" not in timescaledb_user '
+        - '"\"" not in timescaledb_user '
+        - " \"'\" not in timescaledb_user "
+    no_log: true
+
+  - name: Assert timescaledb user password
+    assert:
+      that:
+        - timescaledb_password | length > 1
+        - '"-" not in timescaledb_password '
+        - '"\\" not in timescaledb_password '
+        - '"\"" not in timescaledb_password '
+        - " \"'\" not in timescaledb_password "
+    no_log: true
+
+  - name: Assert mysqldb user name
+    assert:
+      that:
+        - mysqldb_user | length > 1
+        - '"-" not in mysqldb_user '
+        - '"\\" not in mysqldb_user '
+        - '"\"" not in mysqldb_user '
+        - " \"'\" not in mysqldb_user "
+    no_log: true
+
+  - name: Assert mysqldb user password
+    assert:
+      that:
+        - mysqldb_password | length > 1
+        - '"-" not in mysqldb_password '
+        - '"\\" not in mysqldb_password '
+        - '"\"" not in mysqldb_password '
+        - " \"'\" not in mysqldb_password "
+    no_log: true
+
+  - name: Assert mysqldb root user password
+    assert:
+      that:
+        - mysqldb_root_password | length > 1
+        - '"-" not in mysqldb_root_password '
+        - '"\\" not in mysqldb_root_password '
+        - '"\"" not in mysqldb_root_password '
+        - " \"'\" not in mysqldb_root_password "
+    no_log: true
+
+  rescue:
+    - name: Validation issue in login/vars.yml
+      fail:
+        msg: "{{ login_vars_fail_msg }}"
+
+- name: Create ansible vault key
+  set_fact:
+    vault_key: "{{ lookup('password', '/dev/null chars=ascii_letters') }}"
+  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
+
+- name: Save vault key
+  copy:
+    dest: "{{ vault_filename }}"
+    content: |
+      {{ vault_key }}
+    owner: root
+    force: yes
+    mode: "{{ vault_file_perm }}"
+  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
+
+- name: Encrypt input config file
+  command: >-
+    ansible-vault encrypt {{ login_vars_file }}
+    --vault-password-file {{ vault_filename }}
+  changed_when: false
+
+# Include control_plane/login_vars.yml
+- name: Check login_vars file is encrypted
+  command: cat {{ ctrl_plane_login_vars_filename }}
+  changed_when: false
+  register: config_content
+  no_log: true
+
+- name: Decrpyt login_vars.yml
+  command: >-
+    ansible-vault decrypt {{ ctrl_plane_login_vars_filename }}
+    --vault-password-file {{ ctrl_plane_login_vault_filename }}
+  changed_when: false
+  when: "'$ANSIBLE_VAULT;' in config_content.stdout"
+
+- name: Include variable file control_plane/login_vars.yml
+  include_vars: "{{ ctrl_plane_login_vars_filename }}"
+  no_log: true
+
+- name: Assert grafana credentials
+  block:
+    - name: Assert grafana_username and grafana_username
+      assert:
+        that:
+          - grafana_username | length >= min_length_grafana
+          - grafana_username | length <= max_length
+          - '"-" not in grafana_username '
+          - '"\\" not in grafana_username '
+          - '"\"" not in grafana_username '
+          - " \"'\" not in grafana_username "
+          - grafana_password | length >= min_length_grafana
+          - grafana_password | length <= max_length
+          - not grafana_password == 'admin'
+          - '"-" not in grafana_password '
+          - '"\\" not in grafana_password '
+          - '"\"" not in grafana_password '
+          - " \"'\" not in grafana_password "
+      no_log: true
+
+  rescue:
+    - name: Validation issue in control_plane/login_vars.yml
+      fail:
+        msg: "{{ ctrl_plane_login_vars_fail_msg }}"
+
+- name: Create ansible vault key
+  set_fact:
+    vault_key: "{{ lookup('password', '/dev/null chars=ascii_letters') }}"
+  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
+
+- name: Save vault key
+  copy:
+    dest: "{{ ctrl_plane_login_vault_filename }}"
+    content: |
+      {{ vault_key }}
+    owner: root
+    force: yes
+    mode: "{{ vault_file_perm }}"
+  when: "'$ANSIBLE_VAULT;' not in config_content.stdout"
+
+- name: Encrypt input config file
+  command: >-
+    ansible-vault encrypt {{ ctrl_plane_login_vars_filename }}
+    --vault-password-file {{ ctrl_plane_login_vault_filename }}
+  changed_when: false

+ 62 - 62
telemetry/roles/common/vars/main.yml

@@ -1,62 +1,62 @@
-# 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: pre-requisites.yml
-control_plane_installation_required: "AWX and grafana installation through control_plane.yml is mandatory for telemetry.yml"
-
-base_vars_file: "{{ role_path }}/../../input_params/base_vars.yml"
-login_vars_file: "{{ role_path }}/../../input_params/login_vars.yml"
-ctrl_plane_login_vars_filename: "{{ role_path }}/../../../control_plane/input_params/login_vars.yml"
-
-fail_msg_base_vars: "telemetry/base_vars.yml file doesn't exist."
-fail_msg_login_vars: "telemetry/login_vars.yml file doesn't exist."
-ctrl_plane_fail_msg_login_vars: "control_plane/login_vars.yml file doesn't exist"
-
-#Usage: validate_base_vars.yml
-folder_perm: '644'
-vault_file_perm: '0644'
-
-idrac_telemetry_support_success_msg: "idrac_telemetry_support validated"
-idrac_telemetry_support_fail_msg: "Failed. idrac_telemetry_support only accepts boolean
-                                    values true or false"
-
-slurm_telemetry_support_success_msg: "slurm_telemetry_support validated"
-slurm_telemetry_support_fail_msg: "Failed. slurm_telemetry_support only accepts boolean
-                                    values true or false"
-
-slurm_telemetry_idrac_support_success_msg: "slurm and idrac telemetry are supported"
-slurm_telemetry_idrac_support_fail_msg: "slurm telemetry is supported only when
-                                      idrac_telemetry_support is true"
-
-timescaledb_success_msg: "Timescale DB name validated successfully"
-timescaledb_fail_msg: "Timescale DB name should have minimum length of 2"
-
-mysqldb_success_msg: "MySQL DB name validated successfully"
-mysqldb_fail_msg: "MySQL DB name should have minimum length of 2"
-
-# Usage: validate_login_vars.yml
-vault_filename: "{{ role_path }}/../../input_params/.login_vault_key"
-login_vars_fail_msg: "Usernames and passwords in input_params/login_vars.yml should have minimum length 2"
-
-ctrl_plane_login_vault_filename: "{{ role_path }}/../../../control_plane/input_params/.login_vault_key"
-min_length_grafana: 5
-max_length: 30
-ctrl_plane_login_vars_fail_msg: "Incorrect grafana_username or grafana_password format provided
-                                  in control_plane/login_vars.yml"
-
-# Usage: k8s_secrets.yml
-namespace: telemetry-and-visualizations
-
-secrets_name: credentials
+# 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: pre-requisites.yml
+control_plane_installation_required: "AWX and grafana installation through control_plane.yml is mandatory for telemetry.yml"
+
+base_vars_file: "{{ role_path }}/../../input_params/base_vars.yml"
+login_vars_file: "{{ role_path }}/../../input_params/login_vars.yml"
+ctrl_plane_login_vars_filename: "{{ role_path }}/../../../control_plane/input_params/login_vars.yml"
+
+fail_msg_base_vars: "telemetry/base_vars.yml file doesn't exist."
+fail_msg_login_vars: "telemetry/login_vars.yml file doesn't exist."
+ctrl_plane_fail_msg_login_vars: "control_plane/login_vars.yml file doesn't exist"
+
+#Usage: validate_base_vars.yml
+folder_perm: '644'
+vault_file_perm: '0644'
+
+idrac_telemetry_support_success_msg: "idrac_telemetry_support validated"
+idrac_telemetry_support_fail_msg: "Failed. idrac_telemetry_support only accepts boolean
+                                    values true or false"
+
+slurm_telemetry_support_success_msg: "slurm_telemetry_support validated"
+slurm_telemetry_support_fail_msg: "Failed. slurm_telemetry_support only accepts boolean
+                                    values true or false"
+
+slurm_telemetry_idrac_support_success_msg: "slurm and idrac telemetry are supported"
+slurm_telemetry_idrac_support_fail_msg: "slurm telemetry is supported only when
+                                      idrac_telemetry_support is true"
+
+timescaledb_success_msg: "Timescale DB name validated successfully"
+timescaledb_fail_msg: "Timescale DB name should have minimum length of 2"
+
+mysqldb_success_msg: "MySQL DB name validated successfully"
+mysqldb_fail_msg: "MySQL DB name should have minimum length of 2"
+
+# Usage: validate_login_vars.yml
+vault_filename: "{{ role_path }}/../../input_params/.login_vault_key"
+login_vars_fail_msg: "Usernames and passwords in input_params/login_vars.yml should have minimum length 2"
+
+ctrl_plane_login_vault_filename: "{{ role_path }}/../../../control_plane/input_params/.login_vault_key"
+min_length_grafana: 5
+max_length: 30
+ctrl_plane_login_vars_fail_msg: "Incorrect grafana_username or grafana_password format provided
+                                  in control_plane/login_vars.yml"
+
+# Usage: k8s_secrets.yml
+namespace: telemetry-and-visualizations
+
+secrets_name: credentials

+ 55 - 55
telemetry/roles/grafana_config/tasks/add_datasource.yml

@@ -1,55 +1,55 @@
-# 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.
----
-
-- name: Get grafana service IP
-  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.clusterIP}'
-  changed_when: false
-  register: grafana_svc_ip
-
-- name: Get grafana service port
-  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.ports[0].port}'
-  changed_when: false
-  register: grafana_svc_port
-
-- name: Get timescaleDB svc IP
-  command: kubectl get svc -n "{{ namespace }}" -o=jsonpath='{.items[0].spec.clusterIP}'
-  changed_when: false
-  register: timescale_svc_ip
-
-- name: Get timescaleDB svc port
-  command: kubectl get svc -n "{{ namespace }}" -o=jsonpath='{.items[0].spec.ports[0].port}'
-  changed_when: false
-  register: timescale_svc_port
-
-- name: Wait for grafana pod to come to ready state
-  command: kubectl wait --for=condition=ready --timeout=10m -n "{{ grafana_namespace }}" pod -l app="{{ grafana_k8s }}"
-  changed_when: false
-
-- name: Add timescale datasource on grafana
-  community.grafana.grafana_datasource:
-    name: telemetry-postgres
-    grafana_url: "http://{{ grafana_svc_ip.stdout }}:{{ grafana_svc_port.stdout }}"
-    grafana_user: "{{ grafana_username }}"
-    grafana_password: "{{ grafana_password }}"
-    ds_type: "postgres"
-    ds_url: "http://{{ timescale_svc_ip.stdout }}:{{ timescale_svc_port.stdout }}"
-    user: "{{ timescaledb_user }}"
-    sslmode: "disable"
-    additional_json_data:
-      postgresVersion: 12
-      timescaledb: true
-    additional_secure_json_data:
-      password: "{{ timescaledb_password }}"
-  no_log: true
+# 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.
+---
+
+- name: Get grafana service IP
+  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.clusterIP}'
+  changed_when: false
+  register: grafana_svc_ip
+
+- name: Get grafana service port
+  command: kubectl get svc "{{ grafana_k8s }}" -n "{{ grafana_namespace }}" -o=jsonpath='{.spec.ports[0].port}'
+  changed_when: false
+  register: grafana_svc_port
+
+- name: Get timescaleDB svc IP
+  command: kubectl get svc -n "{{ namespace }}" -o=jsonpath='{.items[0].spec.clusterIP}'
+  changed_when: false
+  register: timescale_svc_ip
+
+- name: Get timescaleDB svc port
+  command: kubectl get svc -n "{{ namespace }}" -o=jsonpath='{.items[0].spec.ports[0].port}'
+  changed_when: false
+  register: timescale_svc_port
+
+- name: Wait for grafana pod to come to ready state
+  command: kubectl wait --for=condition=ready --timeout=10m -n "{{ grafana_namespace }}" pod -l app="{{ grafana_k8s }}"
+  changed_when: false
+
+- name: Add timescale datasource on grafana
+  community.grafana.grafana_datasource:
+    name: telemetry-postgres
+    grafana_url: "http://{{ grafana_svc_ip.stdout }}:{{ grafana_svc_port.stdout }}"
+    grafana_user: "{{ grafana_username }}"
+    grafana_password: "{{ grafana_password }}"
+    ds_type: "postgres"
+    ds_url: "http://{{ timescale_svc_ip.stdout }}:{{ timescale_svc_port.stdout }}"
+    user: "{{ timescaledb_user }}"
+    sslmode: "disable"
+    additional_json_data:
+      postgresVersion: 12
+      timescaledb: true
+    additional_secure_json_data:
+      password: "{{ timescaledb_password }}"
+  no_log: true

+ 20 - 20
telemetry/roles/grafana_config/tasks/main.yml

@@ -1,20 +1,20 @@
-# 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.
----
-
-- name: Add telemetry datasource on grafana
-  include_tasks: add_datasource.yml
-
-#- name: Add dashboards on grafana
-#  include_tasks: add_dashboards.yml
+# 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.
+---
+
+- name: Add telemetry datasource on grafana
+  include_tasks: add_datasource.yml
+
+#- name: Add dashboards on grafana
+#  include_tasks: add_dashboards.yml

+ 17 - 17
telemetry/roles/grafana_config/vars/main.yml

@@ -1,17 +1,17 @@
-# 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.
----
-
-grafana_k8s: grafana
-grafana_namespace: grafana
+# 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.
+---
+
+grafana_k8s: grafana
+grafana_namespace: grafana

+ 23 - 23
telemetry/roles/idrac_telemetry/tasks/main.yml

@@ -1,23 +1,23 @@
-# 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.
----
-
-- name: Deploy idrac-telemetry
-  block:
-  - name: Deploy mysqldb pod for idrac credentials
-    include_tasks: mysqldb_deployment.yml
-
-  - name: Deploy idrac_telemetry pods
-    include_tasks: idrac_telemetry_deployment.yml
-  when: idrac_telemetry_support is true
+# 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.
+---
+
+- name: Deploy idrac-telemetry
+  block:
+  - name: Deploy mysqldb pod for idrac credentials
+    include_tasks: mysqldb_deployment.yml
+
+  - name: Deploy idrac_telemetry pods
+    include_tasks: idrac_telemetry_deployment.yml
+  when: idrac_telemetry_support is true

+ 32 - 32
telemetry/roles/idrac_telemetry/vars/main.yml

@@ -1,32 +1,32 @@
-# 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: mysqldb_deployment.yml
-mysql_pv_name: mysqldb-storage
-mysqldb_storage: 1Gi
-mysqldb_name: idrac_telemetrysource_services_db
-mysqldb_pvc_name: mysqldb-storage-claim
-mysqldb_k8s_name: mysqldb
-statefulset_replicas: 1
-mysqldb_container_port1: 3306
-mysqldb_port1: "3306"
-mysqldb_container_port2: 33060
-
-# Usage: idrac_telemetry_deployment.yml
-idrac_telemetry_k8s_name: idrac-telemetry
-activemq_http_port_1: 8161
-activemq_http_port_2: 61616
-messagebus_http_port: "61613"
-configui_http_port: "8082"
+# 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: mysqldb_deployment.yml
+mysql_pv_name: mysqldb-storage
+mysqldb_storage: 1Gi
+mysqldb_name: idrac_telemetrysource_services_db
+mysqldb_pvc_name: mysqldb-storage-claim
+mysqldb_k8s_name: mysqldb
+statefulset_replicas: 1
+mysqldb_container_port1: 3306
+mysqldb_port1: "3306"
+mysqldb_container_port2: 33060
+
+# Usage: idrac_telemetry_deployment.yml
+idrac_telemetry_k8s_name: idrac-telemetry
+activemq_http_port_1: 8161
+activemq_http_port_2: 61616
+messagebus_http_port: "61613"
+configui_http_port: "8082"

+ 35 - 35
telemetry/roles/timescaledb/tasks/main.yml

@@ -1,35 +1,35 @@
-# 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.
----
-
-- name: Create persistent volume for timescaledb
-  include_tasks: persistent_volume.yml
-
-- name: Create persistent volume claim for timescaledb
-  include_tasks: persistent_volume_claim.yml
-
-- name: Checkout iDRAC telemetry github repo
-  ansible.builtin.git:
-    repo: "{{ idrac_telemetry_github }}"
-    dest: "{{ mount_location + idrac_telemetry_folder_name }}"
-    version: master
-
-- name: Create timescaledb pod
-  include_tasks: timescaledb_pod.yml
-
-- name: Create service for timescale db
-  include_tasks: service.yml
-
-- name: Create service for timescale db
-  include_tasks: initialize_db.yml
+# 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.
+---
+
+- name: Create persistent volume for timescaledb
+  include_tasks: persistent_volume.yml
+
+- name: Create persistent volume claim for timescaledb
+  include_tasks: persistent_volume_claim.yml
+
+- name: Checkout iDRAC telemetry github repo
+  ansible.builtin.git:
+    repo: "{{ idrac_telemetry_github }}"
+    dest: "{{ mount_location + idrac_telemetry_folder_name }}"
+    version: master
+
+- name: Create timescaledb pod
+  include_tasks: timescaledb_pod.yml
+
+- name: Create service for timescale db
+  include_tasks: service.yml
+
+- name: Create service for timescale db
+  include_tasks: initialize_db.yml

+ 34 - 34
telemetry/roles/timescaledb/tasks/persistent_volume.yml

@@ -1,34 +1,34 @@
-# 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.
----
-
-- name: Persistent volume for timescaledb
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: PersistentVolume
-      metadata:
-        name: "{{ pv_name }}"
-        namespace: "{{ namespace }}"
-        labels:
-          type: local
-      spec:
-        storageClassName: manual
-        capacity:
-          storage: "{{ timescaledb_storage }}"
-        accessModes:
-          - ReadWriteOnce
-        hostPath:
-          path: "{{ mount_location + 'timescaledb' }}"
+# 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.
+---
+
+- name: Persistent volume for timescaledb
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: PersistentVolume
+      metadata:
+        name: "{{ pv_name }}"
+        namespace: "{{ namespace }}"
+        labels:
+          type: local
+      spec:
+        storageClassName: manual
+        capacity:
+          storage: "{{ timescaledb_storage }}"
+        accessModes:
+          - ReadWriteOnce
+        hostPath:
+          path: "{{ mount_location + 'timescaledb' }}"

+ 31 - 31
telemetry/roles/timescaledb/tasks/persistent_volume_claim.yml

@@ -1,31 +1,31 @@
-# 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.
----
-
-- name: Persistent volume claim for timescaledb
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: PersistentVolumeClaim
-      metadata:
-        name: "{{ pvc_name }}"
-        namespace: "{{ namespace }}"
-      spec:
-        storageClassName: manual
-        accessModes:
-          - ReadWriteOnce
-        resources:
-          requests:
-            storage: "{{ timescaledb_storage }}"
+# 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.
+---
+
+- name: Persistent volume claim for timescaledb
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
+        name: "{{ pvc_name }}"
+        namespace: "{{ namespace }}"
+      spec:
+        storageClassName: manual
+        accessModes:
+          - ReadWriteOnce
+        resources:
+          requests:
+            storage: "{{ timescaledb_storage }}"

+ 33 - 33
telemetry/roles/timescaledb/tasks/service.yml

@@ -1,33 +1,33 @@
-# 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.
----
-
-- name: Service for timescaledb
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: v1
-      kind: Service
-      metadata:
-        name: "{{ timescaledb_k8s_name }}"
-        namespace: "{{ namespace }}"
-        labels:
-          app: "{{ timescaledb_k8s_name }}"
-      spec:
-        type: ClusterIP
-        ports:
-          - name: timescaledb
-            port: "{{ timescaledb_container_port }}"
-        selector:
-          app: "{{ timescaledb_k8s_name }}"
+# 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.
+---
+
+- name: Service for timescaledb
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: v1
+      kind: Service
+      metadata:
+        name: "{{ timescaledb_k8s_name }}"
+        namespace: "{{ namespace }}"
+        labels:
+          app: "{{ timescaledb_k8s_name }}"
+      spec:
+        type: ClusterIP
+        ports:
+          - name: timescaledb
+            port: "{{ timescaledb_container_port }}"
+        selector:
+          app: "{{ timescaledb_k8s_name }}"

+ 72 - 72
telemetry/roles/timescaledb/tasks/timescaledb_pod.yml

@@ -1,72 +1,72 @@
-# 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.
----
-
-- name: Timescaledb pod definition
-  kubernetes.core.k8s:
-    state: present
-    definition:
-      apiVersion: apps/v1
-      kind: StatefulSet
-      metadata:
-        name: "{{ timescaledb_k8s_name }}"
-        namespace: "{{ namespace }}"
-      spec:
-        selector:
-          matchLabels:
-            app: "{{ timescaledb_k8s_name }}"
-        serviceName: "{{ timescaledb_k8s_name }}"
-        replicas: "{{ statefulset_replicas }}"
-        template:
-          metadata:
-            labels:
-              app: "{{ timescaledb_k8s_name }}"
-          spec:
-            volumes:
-              - name: telemetry-reference-tools
-                hostPath:
-                  path: "{{ mount_location + idrac_telemetry_folder_name }}"
-                  type: Directory
-
-              - name: timescaledb-pvc
-                persistentVolumeClaim:
-                  claimName: "{{ pvc_name }}"
-
-            containers:
-              - name: timescale
-                image: timescale/timescaledb:latest-pg12
-                imagePullPolicy: "IfNotPresent"
-                volumeMounts:
-                  - mountPath: /go/src/github.com/telemetry-reference-tools
-                    name: telemetry-reference-tools
-                  - mountPath: /var/lib/postgresql/
-                    name: timescaledb-pvc
-                workingDir: /go/src/github.com/telemetry-reference-tools
-                env:
-                  - name: node.name
-                    value: timescale
-                  - name: POSTGRES_USER
-                    valueFrom:
-                      secretKeyRef:
-                        name: "{{ secrets_name }}"
-                        key: timescaledb_user
-                  - name: POSTGRES_PASSWORD
-                    valueFrom:
-                      secretKeyRef:
-                        name: "{{ secrets_name }}"
-                        key: timescaledb_password
-                  - name: TIMESCALE_DB
-                    value: "{{ timescaledb_name }}"
-                ports:
-                  - containerPort: "{{ timescaledb_container_port }}"
+# 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.
+---
+
+- name: Timescaledb pod definition
+  kubernetes.core.k8s:
+    state: present
+    definition:
+      apiVersion: apps/v1
+      kind: StatefulSet
+      metadata:
+        name: "{{ timescaledb_k8s_name }}"
+        namespace: "{{ namespace }}"
+      spec:
+        selector:
+          matchLabels:
+            app: "{{ timescaledb_k8s_name }}"
+        serviceName: "{{ timescaledb_k8s_name }}"
+        replicas: "{{ statefulset_replicas }}"
+        template:
+          metadata:
+            labels:
+              app: "{{ timescaledb_k8s_name }}"
+          spec:
+            volumes:
+              - name: telemetry-reference-tools
+                hostPath:
+                  path: "{{ mount_location + idrac_telemetry_folder_name }}"
+                  type: Directory
+
+              - name: timescaledb-pvc
+                persistentVolumeClaim:
+                  claimName: "{{ pvc_name }}"
+
+            containers:
+              - name: timescale
+                image: timescale/timescaledb:latest-pg12
+                imagePullPolicy: "IfNotPresent"
+                volumeMounts:
+                  - mountPath: /go/src/github.com/telemetry-reference-tools
+                    name: telemetry-reference-tools
+                  - mountPath: /var/lib/postgresql/
+                    name: timescaledb-pvc
+                workingDir: /go/src/github.com/telemetry-reference-tools
+                env:
+                  - name: node.name
+                    value: timescale
+                  - name: POSTGRES_USER
+                    valueFrom:
+                      secretKeyRef:
+                        name: "{{ secrets_name }}"
+                        key: timescaledb_user
+                  - name: POSTGRES_PASSWORD
+                    valueFrom:
+                      secretKeyRef:
+                        name: "{{ secrets_name }}"
+                        key: timescaledb_password
+                  - name: TIMESCALE_DB
+                    value: "{{ timescaledb_name }}"
+                ports:
+                  - containerPort: "{{ timescaledb_container_port }}"

+ 25 - 25
telemetry/roles/timescaledb/vars/main.yml

@@ -1,25 +1,25 @@
-# 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.
----
-
-pv_name: timescaledb-storage
-timescaledb_storage: 30Gi
-pvc_name: timescaledb-storage-claim
-idrac_telemetry_github: https://github.com/dell/iDRAC-Telemetry-Reference-Tools.git
-idrac_telemetry_folder_name: iDRAC-Telemetry-Reference-Tools
-statefulset_replicas: 1
-timescaledb_k8s_name: timescaledb
-timescaledb_container_port: 5432
-retries: 10
-delay: 10
+# 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.
+---
+
+pv_name: timescaledb-storage
+timescaledb_storage: 30Gi
+pvc_name: timescaledb-storage-claim
+idrac_telemetry_github: https://github.com/dell/iDRAC-Telemetry-Reference-Tools.git
+idrac_telemetry_folder_name: iDRAC-Telemetry-Reference-Tools
+statefulset_replicas: 1
+timescaledb_k8s_name: timescaledb
+timescaledb_container_port: 5432
+retries: 10
+delay: 10

+ 46 - 46
telemetry/telemetry.yml

@@ -1,46 +1,46 @@
-# 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.
----
-
--  name: Telemetry and visualization
-   hosts: localhost
-   connection: local
-   gather_facts: false
-   roles:
-    - common
-    - timescaledb
-    - idrac_telemetry
-    - grafana_config
-
-- name: Get node inventory
-  hosts: localhost
-  gather_facts: false
-  tasks:
-    - name: Get node inventory
-      include_role:
-        name: slurm_telemetry
-        tasks_from: get_node_inventory.yml
-      tags: slurm_telemetry
-
-- name: Update slurm node IPs and service tags
-  import_playbook: "{{ playbook_dir }}/roles/slurm_telemetry/files/update_service_tags.yml"
-  tags: slurm_telemetry
-
-- name: Slurm Telemetry
-  hosts: localhost
-  connection: local
-  gather_facts: false
-  roles:
-   - slurm_telemetry
-  tags: slurm_telemetry
+# 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.
+---
+
+-  name: Telemetry and visualization
+   hosts: localhost
+   connection: local
+   gather_facts: false
+   roles:
+    - common
+    - timescaledb
+    - idrac_telemetry
+    - grafana_config
+
+- name: Get node inventory
+  hosts: localhost
+  gather_facts: false
+  tasks:
+    - name: Get node inventory
+      include_role:
+        name: slurm_telemetry
+        tasks_from: get_node_inventory.yml
+      tags: slurm_telemetry
+
+- name: Update slurm node IPs and service tags
+  import_playbook: "{{ playbook_dir }}/roles/slurm_telemetry/files/update_service_tags.yml"
+  tags: slurm_telemetry
+
+- name: Slurm Telemetry
+  hosts: localhost
+  connection: local
+  gather_facts: false
+  roles:
+   - slurm_telemetry
+  tags: slurm_telemetry