From 69c7f8361e13e38a167431380b12c4f404073c2e Mon Sep 17 00:00:00 2001 From: Joseph V Date: Thu, 24 Nov 2022 17:12:41 +0530 Subject: [PATCH] Remove dashboard, keystone and srm toolchain --- installer/README.md | 6 +- installer/ansible/clean.yml | 14 +- installer/ansible/group_vars/auth.yml | 38 - installer/ansible/group_vars/common.yml | 60 - installer/ansible/group_vars/dashboard.yml | 54 - installer/ansible/group_vars/delfin.yml | 30 +- .../ansible/group_vars/srm-toolchain.yml | 46 - installer/ansible/local.hosts | 4 +- .../roles/auth-installer/tasks/main.yml | 38 - .../roles/cleaner/scenarios/auth-keystone.yml | 44 - .../roles/cleaner/scenarios/delfin.yml | 2 +- .../roles/cleaner/scenarios/release.yml | 2 +- .../roles/cleaner/scenarios/srm-toolchain.yml | 51 - .../ansible/roles/cleaner/tasks/main.yml | 32 +- .../scenarios/container.yml | 63 - .../scenarios/source-code.yml | 48 - .../roles/dashboard-installer/tasks/main.yml | 32 - .../delfin-installer/scenarios/container.yml | 2 +- .../delfin-installer/scenarios/rabbitmq.yml | 2 +- .../delfin-installer/scenarios/redis.yml | 2 +- .../scenarios/source-code.yml | 2 +- .../scenarios/start-delfin.yml | 2 +- .../roles/delfin-installer/tasks/main.yml | 8 +- .../scenarios/install-srm-toolchain.yml | 33 - .../srm-toolchain-installer/tasks/main.yml | 68 - installer/ansible/script/create_cert.sh | 68 - installer/ansible/script/create_db.py | 2 +- installer/ansible/script/keystone.sh | 279 --- installer/ansible/script/ministone.py | 204 -- .../mod_prometheus_config_for_alertmanager.sh | 23 - .../mod_prometheus_config_for_lvm_exporter.sh | 22 - ...mod_prometheus_config_for_node_exporter.sh | 22 - .../mod_prometheus_config_for_pushgateway.sh | 23 - installer/ansible/script/openssl.cnf | 350 ---- installer/ansible/script/sdsrc | 45 - .../script/set_alertmanager_service.sh | 34 - installer/ansible/script/set_nginx_config.sh | 43 - .../script/set_node_exporter_service.sh | 32 - .../ansible/script/set_prometheus_config.sh | 26 - .../ansible/script/set_prometheus_service.sh | 32 - .../ansible/script/set_pushgateway_service.sh | 32 - installer/ansible/script/srm_toolchain.sh | 32 - installer/ansible/script/util.sh | 92 - installer/ansible/script/virtualenv3_exec.j2 | 2 +- installer/ansible/script/virtualenv_exec.j2 | 18 - installer/ansible/site.yml | 58 +- .../srm-toolchain/alertmanager/config.yml | 6 - .../ansible/srm-toolchain/config.grafana | 7 - .../ansible/srm-toolchain/docker-compose.yml | 56 - .../grafana/dashboards/overall-dashboard.json | 1803 ----------------- .../dashboards/storage-details-dashboard.json | 905 --------- .../grafana/provisioning/dashboards/all.yml | 13 - .../grafana/provisioning/datasources/all.yml | 21 - .../srm-toolchain/prometheus/alerts.rules | 62 - .../srm-toolchain/prometheus/prometheus.yml | 40 - 55 files changed, 55 insertions(+), 4980 deletions(-) delete mode 100644 installer/ansible/group_vars/auth.yml delete mode 100644 installer/ansible/group_vars/common.yml delete mode 100644 installer/ansible/group_vars/dashboard.yml delete mode 100644 installer/ansible/group_vars/srm-toolchain.yml delete mode 100644 installer/ansible/roles/auth-installer/tasks/main.yml delete mode 100644 installer/ansible/roles/cleaner/scenarios/auth-keystone.yml delete mode 100644 installer/ansible/roles/cleaner/scenarios/srm-toolchain.yml delete mode 100644 installer/ansible/roles/dashboard-installer/scenarios/container.yml delete mode 100644 installer/ansible/roles/dashboard-installer/scenarios/source-code.yml delete mode 100644 installer/ansible/roles/dashboard-installer/tasks/main.yml delete mode 100644 installer/ansible/roles/srm-toolchain-installer/scenarios/install-srm-toolchain.yml delete mode 100644 installer/ansible/roles/srm-toolchain-installer/tasks/main.yml delete mode 100644 installer/ansible/script/create_cert.sh delete mode 100755 installer/ansible/script/keystone.sh delete mode 100755 installer/ansible/script/ministone.py delete mode 100644 installer/ansible/script/mod_prometheus_config_for_alertmanager.sh delete mode 100644 installer/ansible/script/mod_prometheus_config_for_lvm_exporter.sh delete mode 100644 installer/ansible/script/mod_prometheus_config_for_node_exporter.sh delete mode 100644 installer/ansible/script/mod_prometheus_config_for_pushgateway.sh delete mode 100644 installer/ansible/script/openssl.cnf delete mode 100755 installer/ansible/script/sdsrc delete mode 100644 installer/ansible/script/set_alertmanager_service.sh delete mode 100755 installer/ansible/script/set_nginx_config.sh delete mode 100644 installer/ansible/script/set_node_exporter_service.sh delete mode 100644 installer/ansible/script/set_prometheus_config.sh delete mode 100644 installer/ansible/script/set_prometheus_service.sh delete mode 100644 installer/ansible/script/set_pushgateway_service.sh delete mode 100755 installer/ansible/script/srm_toolchain.sh delete mode 100755 installer/ansible/script/util.sh delete mode 100644 installer/ansible/script/virtualenv_exec.j2 delete mode 100644 installer/ansible/srm-toolchain/alertmanager/config.yml delete mode 100644 installer/ansible/srm-toolchain/config.grafana delete mode 100644 installer/ansible/srm-toolchain/docker-compose.yml delete mode 100644 installer/ansible/srm-toolchain/grafana/dashboards/overall-dashboard.json delete mode 100644 installer/ansible/srm-toolchain/grafana/dashboards/storage-details-dashboard.json delete mode 100644 installer/ansible/srm-toolchain/grafana/provisioning/dashboards/all.yml delete mode 100644 installer/ansible/srm-toolchain/grafana/provisioning/datasources/all.yml delete mode 100644 installer/ansible/srm-toolchain/prometheus/alerts.rules delete mode 100644 installer/ansible/srm-toolchain/prometheus/prometheus.yml diff --git a/installer/README.md b/installer/README.md index ac855d96b..d163d198d 100644 --- a/installer/README.md +++ b/installer/README.md @@ -1,8 +1,8 @@ # Delfin Installation Guide The SODA Delfin supports two types of installation -* Installation using Ansible for user experiance with Dashboard -* Installation using scripts +* Installation using Ansible +* Installation using Bash scripts ## Ansible installer @@ -42,7 +42,7 @@ Please refer [user guides](https://docs.sodafoundation.io/guides/user-guides/del -## Bash installer +## Bash script installer This is a standalone/non-containerized installer for SODA Infrastructure Manager (delfin) project. It contains a script and options to check the environment feasible for installing delfin. Installs required dependent software/binaries. diff --git a/installer/ansible/clean.yml b/installer/ansible/clean.yml index 03781e025..0170a9979 100644 --- a/installer/ansible/clean.yml +++ b/installer/ansible/clean.yml @@ -1,4 +1,4 @@ -# Copyright 2019 The OpenSDS Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,20 +13,14 @@ # limitations under the License. --- -# Defines some clean processes when banishing the cluster. - -- name: destory an opensds cluster +# Defines some clean processes when banishing the nodes. +- name: Cleanup delfin installation hosts: - - controllers - - worker-nodes - - docks + - delfin-nodes remote_user: root vars_files: - group_vars/common.yml - - group_vars/auth.yml - - group_vars/dashboard.yml - group_vars/delfin.yml - - group_vars/srm-toolchain.yml gather_facts: false become: True tasks: diff --git a/installer/ansible/group_vars/auth.yml b/installer/ansible/group_vars/auth.yml deleted file mode 100644 index 475eb3e6f..000000000 --- a/installer/ansible/group_vars/auth.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2019 The OpenSDS Authors. -# -# 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. - ---- -# Dummy variable to avoid error because ansible does not recognize the -# file as a good configuration file when no variable in it. -dummy: - - -########### -# GENERAL # -########### - -# OpenSDS authentication strategy, support 'noauth' and 'keystone'. -opensds_auth_strategy: keystone - -# Install keystone with docker -install_keystone_with_docker: true - -# The URL should be replaced with the keystone actual URL -keystone_os_auth_url: "http://{{ host_ip }}/identity" - -# delete all keystone packages -keystone_uninstall_purge: false - -# Certs dir -opensds_certs_dir: "/opt/opensds-security/" diff --git a/installer/ansible/group_vars/common.yml b/installer/ansible/group_vars/common.yml deleted file mode 100644 index bc28aa158..000000000 --- a/installer/ansible/group_vars/common.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2019 The OpenSDS Authors. -# -# 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. - ---- -# Dummy variable to avoid error because ansible does not recognize the -# file as a good configuration file when no variable in it. -dummy: - - -########### -# GENERAL # -########### - -# This field indicates local machine host ip -# For HA configuration, add the IP on which the Core Services (Hotpot) are reachable from the Kubernetes node. -host_ip: 127.0.0.1 - -# This field indicates which way user prefers to install, currently support -# 'repository', 'release' and 'container' -install_from: release - -# These fields below will specify the tag based on install_from type -repo_branch: master -release_version: v1.7.0 - -# This field indicates which os family the system will be running, currently -# support 'Debian' and 'RedHat' -ansible_os_family: Debian - -# delete all source packages -source_purge: true - -# delete database -database_purge: true - -############### -# Respective projects release versions -dashboard_release_version: v1.7.0 -delfin_release_version: v1.6.0 - -################# -# URLs, Environment Variables, IP addresses and Ports list -soda_delfin_url: "http://{{ host_ip }}:8190" - -# ToDo: Use this variable across the SODA Projects. Currently using this only for the SODA Dashboard. -# Inform the SODA Dashboard whether SODA Multicloud UI should support only service plans or backends -# If true, user will have access only to the service plans for bucket management and not to the cloud backends -# If false, user will have access to register cloud backends and access the cloud backends for bucket management. -enable_storage_service_plans: false diff --git a/installer/ansible/group_vars/dashboard.yml b/installer/ansible/group_vars/dashboard.yml deleted file mode 100644 index e03f6397c..000000000 --- a/installer/ansible/group_vars/dashboard.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2019 The OpenSDS Authors. -# -# 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. - ---- -# Dummy variable to avoid error because ansible does not recognize the -# file as a good configuration file when no variable in it. -dummy: - - -########### -# GENERAL # -########### - -enable_dashboard: true - -# Dashboard installation types are: 'container', 'source_code' -dashboard_installation_type: container - -# These fields are NOT suggested to be modified -dashboard_work_dir: /opt/opensds-dashboard-linux-amd64 - -#Dashboard Console Login Address -console_login_url: "{{ host_ip }}:8088" - -########## -# DOCKER # -########## - - -dashboard_docker_image: sodafoundation/dashboard:{{ dashboard_release_version }} - - - -############## -# SOURCECODE # -############## - -# If user specifies intalling from source code, then he can choose the specific -# repository branch -dashboard_repo_branch: "{{ repo_branch }}" - -# These fields are NOT suggested to be modified -dashboard_remote_url: https://github.com/opensds/opensds-dashboard.git diff --git a/installer/ansible/group_vars/delfin.yml b/installer/ansible/group_vars/delfin.yml index b7cbbfd66..df765a333 100644 --- a/installer/ansible/group_vars/delfin.yml +++ b/installer/ansible/group_vars/delfin.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,8 +22,34 @@ dummy: # GENERAL # ########### +# This field indicates local machine host ip +host_ip: 127.0.0.1 + # delfin installation types are: 'repository', 'release' and 'container'' -delfin_installation_type: "{{ install_from }}" +delfin_installation_type: release + +# These fields below will specify the tag based on install_from type +repo_branch: master +release_version: v1.7.0 + +# This field indicates which os family the system will be running, currently +# support 'Debian' and 'RedHat' +ansible_os_family: Debian + +# delete all source packages +source_purge: true + +# delete database +database_purge: true + +# Delfin projects release versions +delfin_release_version: v1.6.0 + +# Depended projects release versions +dashboard_release_version: v1.7.0 + +# URLs, Environment Variables, IP addresses and Ports list +soda_delfin_url: "http://{{ host_ip }}:8190" # These fields are NOT suggested to be modified delfin_work_dir: /opt/delfin-linux-amd64 diff --git a/installer/ansible/group_vars/srm-toolchain.yml b/installer/ansible/group_vars/srm-toolchain.yml deleted file mode 100644 index 0d292932f..000000000 --- a/installer/ansible/group_vars/srm-toolchain.yml +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2020 The SODA Authors. -# -# 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. - ---- -# Dummy variable to avoid error because ansible does not recognize the -# file as a good configuration file when no variable in it. -dummy: - -######################### -# INSTALL SRM TOOLCHAIN # -######################### -# The SRM Toolchain is required if you wish to use the SODA Dashboard to view the metrics and visualization. -# If you set this to true then the installer will install Prometheus:, AlertManager and Grafana. -# Please note that this installer will install the above as docker containers. -# If you already have any of the above running then please make the appropriate -# changes to the docker container name and ports at {srm_toolchain_dir}/docker-compose.yml -# If you set this to false then you will not be able to view the visualization using SODA Dashboard. -# You can however configure your own dashboard or receiver to connect with Delfin. - -install_srm_toolchain: true - -# The source directory where the SRM Toolchain installer files reside -srm_toolchain_dir: srm-toolchain - -# The working directory where the SRM Toolchain installer files are copied. -srm_toolchain_work_dir: /opt/srm-toolchain - -prometheus_image_tag: v2.23.0 -prometheus_port: 9090 - -alertmanager_image_tag: v0.21.0 -alertmanager_port: 9093 - -grafana_image_tag: 7.3.5 -grafana_port: 3000 diff --git a/installer/ansible/local.hosts b/installer/ansible/local.hosts index c5d1d5e98..21a989d9b 100644 --- a/installer/ansible/local.hosts +++ b/installer/ansible/local.hosts @@ -1,4 +1,4 @@ -# Copyright 2022 The OpenSDS Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,5 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -[controllers] +[delfin-nodes] localhost ansible_connection=local diff --git a/installer/ansible/roles/auth-installer/tasks/main.yml b/installer/ansible/roles/auth-installer/tasks/main.yml deleted file mode 100644 index 9285d9349..000000000 --- a/installer/ansible/roles/auth-installer/tasks/main.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2018 The OpenSDS Authors. -# -# 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 port usage - wait_for: - port: "{{ item }}" - timeout: 5 - state: stopped - msg: "Port {{ item }} is not free" - with_items: - - 80 - become: yes - -- name: install keystone with the script - shell: "{{ item }}" - with_items: - - bash ./script/keystone.sh install script - when: opensds_auth_strategy == "keystone" and install_keystone_with_docker != true - become: yes - -- name: install keystone with the docker - shell: "{{ item }}" - with_items: - - bash ./script/keystone.sh install docker - when: opensds_auth_strategy == "keystone" and install_keystone_with_docker == true - become: yes diff --git a/installer/ansible/roles/cleaner/scenarios/auth-keystone.yml b/installer/ansible/roles/cleaner/scenarios/auth-keystone.yml deleted file mode 100644 index 2dfa3c96d..000000000 --- a/installer/ansible/roles/cleaner/scenarios/auth-keystone.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2019 The OpenSDS Authors. -# -# 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: uninstall opensds keystone with the script - shell: "{{ item }}" - with_items: - - bash ./script/keystone.sh uninstall script - when: - - install_keystone_with_docker != true - ignore_errors: yes - become: yes - tags: keystone - -- name: uninstall opensds keystone with the docker - shell: "{{ item }}" - with_items: - - bash ./script/keystone.sh uninstall docker - when: - - install_keystone_with_docker == true - ignore_errors: yes - become: yes - tags: keystone - -- name: cleanup opensds keystone - shell: "{{ item }}" - with_items: - - bash ./script/keystone.sh uninstall_purge - when: - - keystone_uninstall_purge == true - ignore_errors: yes - become: yes - tags: keystone diff --git a/installer/ansible/roles/cleaner/scenarios/delfin.yml b/installer/ansible/roles/cleaner/scenarios/delfin.yml index 01fcd92a9..9071a3041 100644 --- a/installer/ansible/roles/cleaner/scenarios/delfin.yml +++ b/installer/ansible/roles/cleaner/scenarios/delfin.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/cleaner/scenarios/release.yml b/installer/ansible/roles/cleaner/scenarios/release.yml index d0d3c7fa4..2ae48bb48 100644 --- a/installer/ansible/roles/cleaner/scenarios/release.yml +++ b/installer/ansible/roles/cleaner/scenarios/release.yml @@ -1,4 +1,4 @@ -# Copyright 2018 The OpenSDS Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/cleaner/scenarios/srm-toolchain.yml b/installer/ansible/roles/cleaner/scenarios/srm-toolchain.yml deleted file mode 100644 index 255517df0..000000000 --- a/installer/ansible/roles/cleaner/scenarios/srm-toolchain.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2020 The SODA Authors. -# -# 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 for SRM Toolchain files existed - stat: - path: "{{ srm_toolchain_work_dir }}" - register: srmtoolchainexisted - -- name: Stop and remove Prometheus, Alertmanager, Grafana containers but don't delete the images - shell: docker compose rm -fs - args: - chdir: "{{ srm_toolchain_work_dir }}/" - when: - - source_purge == false - - srmtoolchainexisted.stat.isdir is defined and srmtoolchainexisted.stat.isdir - -- name: Stop and remove Prometheus, Alertmanager, Grafana containers & delete the images - shell: docker compose down --rmi all - args: - chdir: "{{ srm_toolchain_work_dir }}/" - when: - - source_purge is undefined or source_purge != false - - srmtoolchainexisted.stat.isdir is defined and srmtoolchainexisted.stat.isdir - -- name: clean up all SRM Toolchain directories - file: - path: "{{ item }}" - state: absent - force: yes - with_items: - - "{{ srm_toolchain_work_dir }}/" - ignore_errors: yes - tags: - - srm_toolchain - - clean - when: - - source_purge is undefined or source_purge != false - - srmtoolchainexisted.stat.isdir is defined and srmtoolchainexisted.stat.isdir - diff --git a/installer/ansible/roles/cleaner/tasks/main.yml b/installer/ansible/roles/cleaner/tasks/main.yml index 7475e3b22..71dfb96d0 100644 --- a/installer/ansible/roles/cleaner/tasks/main.yml +++ b/installer/ansible/roles/cleaner/tasks/main.yml @@ -1,4 +1,4 @@ -# Copyright 2019 The OpenSDS Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,19 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: stop container where dashboard is located - docker_container: - name: dashboard - image: "{{ dashboard_docker_image }}" - state: absent - when: dashboard_installation_type == "container" and enable_dashboard == true - ignore_errors: true - tags: dashboard - -- name: include scenarios/auth-keystone.yml when keystone specified - include_tasks: scenarios/auth-keystone.yml - when: opensds_auth_strategy == "keystone" and enable_dashboard == true - tags: keystone - name: include scenarios/release.yml if installed from release include_tasks: scenarios/release.yml @@ -32,14 +19,8 @@ - name: include scenarios/delfin.yml for cleaning up delfin service include_tasks: scenarios/delfin.yml -# when: enable_delfin == true tags: delfin -- name: include scenarios/srm-toolchain.yml for cleaning up SRM Toolchain - include_tasks: scenarios/srm-toolchain.yml - when: install_srm_toolchain == true - tags: srm_toolchain - - name: clean all configuration and log files file: path: "{{ item }}" @@ -48,14 +29,3 @@ with_items: - "{{ delfin_config_dir }}" ignore_errors: yes - -- name: clean all created work directories - file: - path: "{{ item }}" - state: absent - force: yes - with_items: - - "{{ dashboard_work_dir }}" - ignore_errors: yes - when: source_purge is undefined or source_purge != false - tags: clean diff --git a/installer/ansible/roles/dashboard-installer/scenarios/container.yml b/installer/ansible/roles/dashboard-installer/scenarios/container.yml deleted file mode 100644 index 29486aeb3..000000000 --- a/installer/ansible/roles/dashboard-installer/scenarios/container.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2018 The OpenSDS Authors. -# -# 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 docker-py package with pip when enabling containerized deployment - pip: - name: docker-py - -- name: run dashboard containerized service - docker_container: - name: dashboard - image: "{{ dashboard_docker_image }}" - state: started - network_mode: host - restart_policy: always - env: - OPENSDS_AUTH_URL: "http://{{ host_ip }}/identity" - OPENSDS_HOTPOT_URL: "http://{{ host_ip }}:50040" - OPENSDS_GELATO_URL: "http://{{ host_ip }}:8089" - SODA_DELFIN_URL: "{{ soda_delfin_url }}" - OPENSDS_ORCHESTRATION_URL: "http://{{ host_ip }}:5000" - OPENSDS_S3_URL: "http://{{ host_ip }}:8090" - OPENSDS_S3_HOST: "{{ host_ip }}" - OPENSDS_S3_PORT: "8090" - SODA_PROMETHEUS_PORT: "{{ prometheus_port | quote }}" - SODA_ALERTMANAGER_PORT: "{{ alertmanager_port | quote }}" - SODA_GRAFANA_PORT: "{{ grafana_port | quote }}" - STORAGE_SERVICE_PLAN_ENABLED: "{{ enable_storage_service_plans | string }}" - SODA_ALERTMANAGER_URL: "http://{{ host_ip }}:{{ alertmanager_port }}" - -# - name: run dashboard containerized service for mulit-cloud HA -# docker_container: -# name: dashboard -# image: "{{ dashboard_docker_image }}" -# state: started -# network_mode: host -# restart_policy: always -# env: -# OPENSDS_AUTH_URL: "http://{{ host_ip }}/identity" -# OPENSDS_HOTPOT_URL: "http://{{ host_ip }}:50040" -# OPENSDS_GELATO_URL: "http://{{ gelato_ha_api_ip }}:{{ gelato_ha_api_port }}" -# SODA_DELFIN_URL: "{{ soda_delfin_url }}" -# OPENSDS_ORCHESTRATION_URL: "http://{{ host_ip }}:5000" -# OPENSDS_S3_URL: "http://{{ gelato_ha_s3_ip }}:{{ gelato_ha_s3_port }}" -# OPENSDS_S3_HOST: "{{ gelato_ha_s3_ip }}" -# OPENSDS_S3_PORT: "{{ gelato_ha_s3_port }}" -# SODA_PROMETHEUS_PORT: "{{ prometheus_port }}" -# SODA_ALERTMANAGER_PORT: "{{ alertmanager_port }}" -# SODA_GRAFANA_PORT: "{{ grafana_port }}" -# STORAGE_SERVICE_PLAN_ENABLED: "{{ enable_storage_service_plans }}" -# SODA_ALERTMANAGER_URL: "http://{{ host_ip }}:{{ alertmanager_port }}" -# when: gelato_ha == true diff --git a/installer/ansible/roles/dashboard-installer/scenarios/source-code.yml b/installer/ansible/roles/dashboard-installer/scenarios/source-code.yml deleted file mode 100644 index 437c5c3af..000000000 --- a/installer/ansible/roles/dashboard-installer/scenarios/source-code.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2018 The OpenSDS Authors. -# -# 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 for opensds-dashboard source code existed - stat: - path: "{{ dashboard_work_dir }}" - register: opensdsexisted - -- name: download opensds-dashboard source code if not exists - git: - repo: "{{ dashboard_remote_url }}" - dest: "{{ dashboard_work_dir }}" - version: "{{ dashboard_repo_branch }}" - when: - - opensdsexisted.stat.exists is undefined or opensdsexisted.stat.exists == false - -- name: build and configure opensds dashboard - shell: "{{ item }}" - with_items: - - service apache2 stop - - make - - service apache2 start - args: - chdir: "{{ dashboard_work_dir }}" - warn: false - become: yes - ignore_errors: yes - -- name: update nginx default config - become: yes - shell: bash ./script/set_nginx_config.sh - -- name: restart nginx - service: - name: nginx - state: restarted diff --git a/installer/ansible/roles/dashboard-installer/tasks/main.yml b/installer/ansible/roles/dashboard-installer/tasks/main.yml deleted file mode 100644 index 51b82fe1d..000000000 --- a/installer/ansible/roles/dashboard-installer/tasks/main.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2018 The OpenSDS Authors. -# -# 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: use container to install dashboard - include_tasks: scenarios/container.yml - when: - - dashboard_installation_type == "container" - - opensds_auth_strategy == "keystone" - -- name: use source code to install dashboard - include_tasks: scenarios/source-code.yml - when: - - dashboard_installation_type == "source_code" - - opensds_auth_strategy == "keystone" - -- name: login console - debug: msg="please use '{{ console_login_url }}' login console" - when: - - dashboard_installation_type == "container" or dashboard_installation_type == "source_code" - - opensds_auth_strategy == "keystone" diff --git a/installer/ansible/roles/delfin-installer/scenarios/container.yml b/installer/ansible/roles/delfin-installer/scenarios/container.yml index 3b23d87b8..9f8940964 100644 --- a/installer/ansible/roles/delfin-installer/scenarios/container.yml +++ b/installer/ansible/roles/delfin-installer/scenarios/container.yml @@ -1,4 +1,4 @@ -# Copyright 2021 The OpenSDS Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/delfin-installer/scenarios/rabbitmq.yml b/installer/ansible/roles/delfin-installer/scenarios/rabbitmq.yml index ec3d226f0..33ae699ca 100644 --- a/installer/ansible/roles/delfin-installer/scenarios/rabbitmq.yml +++ b/installer/ansible/roles/delfin-installer/scenarios/rabbitmq.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/delfin-installer/scenarios/redis.yml b/installer/ansible/roles/delfin-installer/scenarios/redis.yml index 259a2f68c..81ae5e806 100644 --- a/installer/ansible/roles/delfin-installer/scenarios/redis.yml +++ b/installer/ansible/roles/delfin-installer/scenarios/redis.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/delfin-installer/scenarios/source-code.yml b/installer/ansible/roles/delfin-installer/scenarios/source-code.yml index fd3da00d2..0ba9b1689 100644 --- a/installer/ansible/roles/delfin-installer/scenarios/source-code.yml +++ b/installer/ansible/roles/delfin-installer/scenarios/source-code.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/delfin-installer/scenarios/start-delfin.yml b/installer/ansible/roles/delfin-installer/scenarios/start-delfin.yml index 7600d17ec..a24950231 100644 --- a/installer/ansible/roles/delfin-installer/scenarios/start-delfin.yml +++ b/installer/ansible/roles/delfin-installer/scenarios/start-delfin.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/roles/delfin-installer/tasks/main.yml b/installer/ansible/roles/delfin-installer/tasks/main.yml index 6f8c41d44..aa4106df1 100644 --- a/installer/ansible/roles/delfin-installer/tasks/main.yml +++ b/installer/ansible/roles/delfin-installer/tasks/main.yml @@ -1,4 +1,4 @@ -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,6 +31,6 @@ include_tasks: scenarios/start-delfin.yml when: delfin_installation_type != "container" -# - name: containerized delfin deployment -# include_tasks: scenarios/container.yml -# when: delfin_installation_type == "container" +- name: containerized delfin deployment + include_tasks: scenarios/container.yml + when: delfin_installation_type == "container" diff --git a/installer/ansible/roles/srm-toolchain-installer/scenarios/install-srm-toolchain.yml b/installer/ansible/roles/srm-toolchain-installer/scenarios/install-srm-toolchain.yml deleted file mode 100644 index dfbc7374b..000000000 --- a/installer/ansible/roles/srm-toolchain-installer/scenarios/install-srm-toolchain.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2020 The SODA Authors. -# -# 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 for SRM Toolchain files existed - stat: - path: "{{ srm_toolchain_work_dir }}/docker-compose.yml" - register: srmtoolchainexisted - -- name: Create srm toolchain work directory - file: - path: "{{ srm_toolchain_work_dir }}/" - state: directory - when: - - srmtoolchainexisted.stat.exists is undefined or srmtoolchainexisted.stat.exists == false - -- name: copy SRM Toolchain configuration into srm toolchain work directory - copy: - src: "{{ srm_toolchain_dir }}/" - dest: "{{ srm_toolchain_work_dir }}" - when: - - srmtoolchainexisted.stat.exists is undefined or srmtoolchainexisted.stat.exists == false diff --git a/installer/ansible/roles/srm-toolchain-installer/tasks/main.yml b/installer/ansible/roles/srm-toolchain-installer/tasks/main.yml deleted file mode 100644 index 235eade16..000000000 --- a/installer/ansible/roles/srm-toolchain-installer/tasks/main.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2020 The SODA Authors. -# -# 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 scenarios/install-srm-toolchain.yml - tags: - - srm_toolchain - include: scenarios/install-srm-toolchain.yml - -- name: replace image tags and ports for prometheus, alertmanager and grafana in docker-compose configuration of SRM Toolchain - replace: - path: "{{ srm_toolchain_work_dir }}/docker-compose.yml" - regexp: "{{ item.regexp }}" - replace: "{{ item.replace }}" - with_items: - - { regexp: '\"HOST_IP\"', replace: '{{ host_ip }}'} - - { regexp: 'prom/prometheus.*$', replace: 'prom/prometheus:{{ prometheus_image_tag }}'} - - { regexp: 'prom/alertmanager.*$', replace: 'prom/alertmanager:{{ alertmanager_image_tag }}'} - - { regexp: 'grafana/grafana.*$', replace: 'grafana/grafana:{{ grafana_image_tag }}'} - - { regexp: 'SODA_PROMETHEUS_PORT', replace: '{{ prometheus_port }}'} - - { regexp: 'SODA_ALERTMANAGER_PORT', replace: '{{ alertmanager_port }}'} - - { regexp: 'SODA_GRAFANA_PORT', replace: '{{ grafana_port }}'} - when: install_srm_toolchain == true - -- name: replace host_ip and Alertmanager Port in prometheus configuration - replace: - path: "{{ srm_toolchain_work_dir }}/prometheus/prometheus.yml" - regexp: "{{ item.regexp }}" - replace: "{{ item.replace }}" - with_items: - - { regexp: 'HOST_IP', replace: '{{ host_ip }}'} - - { regexp: 'SODA_ALERTMANAGER_PORT', replace: '{{ alertmanager_port }}'} - when: install_srm_toolchain == true - -- name: replace host_ip and prometheus port in datasource configuration for grafana - replace: - path: "{{ srm_toolchain_work_dir }}/grafana/provisioning/datasources/all.yml" - regexp: "{{ item.regexp }}" - replace: "{{ item.replace }}" - with_items: - - { regexp: 'HOST_IP', replace: '{{ host_ip }}'} - - { regexp: 'SODA_PROMETHEUS_PORT', replace: '{{ prometheus_port }}'} - when: install_srm_toolchain == true - -- name: set PROMETHEUS as the default exporter - shell: export PROMETHEUS=True - -- name: Stop and remove Prometheus, Alertmanager, Grafana containers, keeping images - shell: docker compose rm -fs - args: - chdir: "{{ srm_toolchain_work_dir }}/" - -- name: start service - shell: docker compose up -d - args: - chdir: "{{ srm_toolchain_work_dir }}/" - diff --git a/installer/ansible/script/create_cert.sh b/installer/ansible/script/create_cert.sh deleted file mode 100644 index b95686eae..000000000 --- a/installer/ansible/script/create_cert.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The OpenSDS Authors. -# -# 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. - -openssl version >& /dev/null -if [ $? -ne 0 ];then - echo "Failed to run openssl. Please ensure openssl is installed." - exit 1 -fi - -CUR_DIR=$(cd "$(dirname "$0")" || exit; pwd) - -export OPENSSL_CONF="${CUR_DIR}"/openssl.cnf - -COMPONENT=("opensds" "nbp") - -OPENSDS_CERT_DIR=$1 - -if [ -z "${OPENSDS_CERT_DIR}" ];then - OPENSDS_CERT_DIR="/opt/opensds-security" -fi - -# Clean up installation context -if [ -d "${OPENSDS_CERT_DIR}" ];then - rm -rf "${OPENSDS_CERT_DIR}" -fi - -# Generate root ca cert -ROOT_CERT_DIR=${ROOT_CERT_DIR:-"${OPENSDS_CERT_DIR}"/ca} -mkdir -p "${ROOT_CERT_DIR}" -mkdir -p "${ROOT_CERT_DIR}"/demoCA/ -mkdir -p "${ROOT_CERT_DIR}"/demoCA/newcerts -touch "${ROOT_CERT_DIR}"/demoCA/index.txt -echo "01" > "${ROOT_CERT_DIR}"/demoCA/serial -echo "unique_subject = no" > "${ROOT_CERT_DIR}"/demoCA/index.txt.attr - -cd "${ROOT_CERT_DIR}" -openssl genrsa -passout pass:xxxxx -out "${ROOT_CERT_DIR}"/ca-key.pem -aes256 2048 -openssl req -new -x509 -sha256 -key "${ROOT_CERT_DIR}"/ca-key.pem -out "${ROOT_CERT_DIR}"/ca-cert.pem -days 365 -subj "/CN=CA" -passin pass:xxxxx - -# Generate component cert -for com in ${COMPONENT[*]};do - openssl genrsa -aes256 -passout pass:xxxxx -out "${ROOT_CERT_DIR}"/"${com}"-key.pem 2048 - openssl req -new -sha256 -key "${ROOT_CERT_DIR}"/"${com}"-key.pem -out "${ROOT_CERT_DIR}"/"${com}"-csr.pem -days 365 -subj "/CN=${com}" -passin pass:xxxxx - openssl ca -batch -in "${ROOT_CERT_DIR}"/"${com}"-csr.pem -cert "${ROOT_CERT_DIR}"/ca-cert.pem -keyfile "${ROOT_CERT_DIR}"/ca-key.pem -out "${ROOT_CERT_DIR}"/"${com}"-cert.pem -md sha256 -days 365 -passin pass:xxxxx - - # Cancel the password for the private key - openssl rsa -in "${ROOT_CERT_DIR}"/"${com}"-key.pem -out "${ROOT_CERT_DIR}"/"${com}"-key.pem -passin pass:xxxxx - - mkdir -p "${OPENSDS_CERT_DIR}"/"${com}" - mv "${ROOT_CERT_DIR}"/"${com}"-key.pem "${OPENSDS_CERT_DIR}"/"${com}"/ - mv "${ROOT_CERT_DIR}"/"${com}"-cert.pem "${OPENSDS_CERT_DIR}"/"${com}"/ - rm -rf "${ROOT_CERT_DIR}"/"${com}"-csr.pem -done - -rm -rf "${ROOT_CERT_DIR}"/demoCA \ No newline at end of file diff --git a/installer/ansible/script/create_db.py b/installer/ansible/script/create_db.py index f8e1e5007..655f0caed 100644 --- a/installer/ansible/script/create_db.py +++ b/installer/ansible/script/create_db.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/installer/ansible/script/keystone.sh b/installer/ansible/script/keystone.sh deleted file mode 100755 index 6352cd7a4..000000000 --- a/installer/ansible/script/keystone.sh +++ /dev/null @@ -1,279 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The OpenSDS Authors. -# -# 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. - -# 'stack' user is just for install keystone through devstack - -create_user(){ - if id "${STACK_USER_NAME}" &> /dev/null; then - return - fi - sudo useradd -s /bin/bash -d "${STACK_HOME}" -m "${STACK_USER_NAME}" - echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack -} - - -remove_user(){ - userdel "${STACK_USER_NAME}" -f -r - rm /etc/sudoers.d/stack -} - -devstack_local_conf(){ -DEV_STACK_LOCAL_CONF=${DEV_STACK_DIR}/local.conf -cat > "$DEV_STACK_LOCAL_CONF" << DEV_STACK_LOCAL_CONF_DOCK -[[local|localrc]] -# use TryStack git mirror -GIT_BASE=$STACK_GIT_BASE - -# If the "*_PASSWORD" variables are not set here you will be prompted to enter -# values for them by "stack.sh" and they will be added to "local.conf". -ADMIN_PASSWORD=$STACK_PASSWORD -DATABASE_PASSWORD=$STACK_PASSWORD -RABBIT_PASSWORD=$STACK_PASSWORD -SERVICE_PASSWORD=$STACK_PASSWORD - -# Neither is set by default. -HOST_IP=$HOST_IP - -# path of the destination log file. A timestamp will be appended to the given name. -LOGFILE=\$DEST/logs/stack.sh.log - -# Old log files are automatically removed after 7 days to keep things neat. Change -# the number of days by setting "LOGDAYS". -LOGDAYS=2 - -ENABLED_SERVICES=mysql,key -# Using stable/queens branches -# --------------------------------- -KEYSTONE_BRANCH=$STACK_BRANCH -KEYSTONECLIENT_BRANCH=$STACK_BRANCH -DEV_STACK_LOCAL_CONF_DOCK -chown stack:stack "$DEV_STACK_LOCAL_CONF" -} - -hotpot_conf() { -mkdir -p $OPENSDS_CONFIG_DIR -cat > "$OPENSDS_CONFIG_DIR/opensds.conf" << OPENSDS_GLOBAL_CONFIG_DOC -[keystone_authtoken] -memcached_servers = $HOST_IP:11211 -signing_dir = /var/cache/opensds -cafile = /opt/stack/data/ca-bundle.pem -auth_uri = http://$HOST_IP/identity -project_domain_name = Default -project_name = service -user_domain_name = Default -password = $STACK_PASSWORD -# Whether to encrypt the password. If enabled, the value of the password must be ciphertext. -enable_encrypted = False -# Encryption and decryption tool. Default value is aes. The decryption tool can only decrypt the corresponding ciphertext. -pwd_encrypter = aes -username = $OPENSDS_SERVER_NAME -auth_url = http://$HOST_IP/identity -auth_type = password - -OPENSDS_GLOBAL_CONFIG_DOC - -cp "$TOP_DIR/../../conf/policy.json" "$OPENSDS_CONFIG_DIR" -} - -gelato_conf() { - local compose_file=/opt/opensds-gelato-linux-amd64/docker-compose.yml - sed -i "s,OS_AUTH_AUTHSTRATEGY=.*$,OS_AUTH_AUTHSTRATEGY=keystone," $compose_file - sed -i "s,OS_AUTH_URL=.*$,OS_AUTH_URL=http://$HOST_IP/identity," $compose_file - sed -i "s,OS_USERNAME=.*$,OS_USERNAME=$MULTICLOUD_SERVER_NAME," $compose_file - sed -i "s,OS_PASSWORD=.*$,OS_PASSWORD=$STACK_PASSWORD," $compose_file - sed -i "s,IAM_HOST=.*$,IAM_HOST=$HOST_IP," $compose_file -} - -keystone_credentials () { - export OS_AUTH_URL="http://${HOST_IP}/identity" - export OS_USERNAME=admin - export OS_PASSWORD="${STACK_PASSWORD}" - export OS_PROJECT_NAME=admin - export OS_PROJECT_DOMAIN_NAME=Default - export OS_USER_DOMAIN_NAME=Default - export OS_IDENTITY_API_VERSION=3 -} - -wait_for_keystone () { - local count=0 - local interval=${1:-10} - local times=${2:-12} - - while true - do - # get a token to check if keystone is working correctly or not. - # keystone credentials such as OS_USERNAME must be set before. - python3 ${TOP_DIR}/ministone.py token_issue - if [ "$?" == "0" ]; then - return - fi - count=`expr ${count} \+ 1` - if [ ${count} -ge ${times} ]; then - echo "ERROR: keystone didn't come up. Aborting..." - exit 1 - fi - sleep ${interval} - done -} - -create_user_and_endpoint_for_hotpot(){ - . "$DEV_STACK_DIR/openrc" admin admin - if openstack user show $OPENSDS_SERVER_NAME &>/dev/null; then - return - fi - - openstack user create --domain default --password "$STACK_PASSWORD" "$OPENSDS_SERVER_NAME" - openstack role add --project service --user "$OPENSDS_SERVER_NAME" admin - openstack group create service - openstack group add user service "$OPENSDS_SERVER_NAME" - openstack role add service --project service --group service - openstack group add user admins admin - openstack service create --name "opensds$OPENSDS_VERSION" --description "OpenSDS Block Storage" "opensds$OPENSDS_VERSION" - openstack endpoint create --region RegionOne "opensds$OPENSDS_VERSION" public "http://$HOST_IP:50040/$OPENSDS_VERSION/%(tenant_id)s" - openstack endpoint create --region RegionOne "opensds$OPENSDS_VERSION" internal "http://$HOST_IP:50040/$OPENSDS_VERSION/%(tenant_id)s" - openstack endpoint create --region RegionOne "opensds$OPENSDS_VERSION" admin "http://$HOST_IP:50040/$OPENSDS_VERSION/%(tenant_id)s" -} - -create_user_and_endpoint_for_gelato(){ - . "$DEV_STACK_DIR/openrc" admin admin - if openstack user show $MULTICLOUD_SERVER_NAME &>/dev/null; then - return - fi - openstack user create --domain default --password "$STACK_PASSWORD" "$MULTICLOUD_SERVER_NAME" - openstack role add --project service --user "$MULTICLOUD_SERVER_NAME" admin - openstack group create service - openstack group add user service "$MULTICLOUD_SERVER_NAME" - openstack role add service --project service --group service - openstack group add user admins admin - openstack service create --name "multicloud$MULTICLOUD_VERSION" --description "Multi-cloud Block Storage" "multicloud$MULTICLOUD_VERSION" - openstack endpoint create --region RegionOne "multicloud$MULTICLOUD_VERSION" public "http://$HOST_IP:8089/$MULTICLOUD_VERSION/%(tenant_id)s" - openstack endpoint create --region RegionOne "multicloud$MULTICLOUD_VERSION" internal "http://$HOST_IP:8089/$MULTICLOUD_VERSION/%(tenant_id)s" - openstack endpoint create --region RegionOne "multicloud$MULTICLOUD_VERSION" admin "http://$HOST_IP:8089/$MULTICLOUD_VERSION/%(tenant_id)s" -} - -delete_redundancy_data() { - . "$DEV_STACK_DIR/openrc" admin admin - openstack project delete demo - openstack project delete alt_demo - openstack project delete invisible_to_admin - openstack user delete demo - openstack user delete alt_demo -} - -download_code(){ - if [ ! -d "${DEV_STACK_DIR}" ];then - git clone "${STACK_GIT_BASE}/openstack-dev/devstack.git" -b "${STACK_BRANCH}" "${DEV_STACK_DIR}" - chown stack:stack -R "${DEV_STACK_DIR}" - fi -} - -install(){ - if [ "docker" == "$1" ] - then - docker pull opensdsio/opensds-authchecker:latest - docker run -d --privileged=true --restart=always --net=host --name=opensds-authchecker opensdsio/opensds-authchecker:latest - docker cp "$TOP_DIR/../../conf/keystone.policy.json" opensds-authchecker:/etc/keystone/policy.json - keystone_credentials - wait_for_keystone - python3 ${TOP_DIR}/ministone.py endpoint_bulk_update keystone "http://${HOST_IP}/identity" - else - create_user - download_code - # If keystone is ready to start, there is no need continue next step. - if wait_for_url "http://$HOST_IP/identity" "keystone" 0.25 4; then - return - fi - devstack_local_conf - cd "${DEV_STACK_DIR}" - su "$STACK_USER_NAME" -c "${DEV_STACK_DIR}/stack.sh" >/dev/null - delete_redundancy_data - cp "$TOP_DIR/../../conf/keystone.policy.json" "${KEYSTONE_CONFIG_DIR}/policy.json" - fi -} - -uninstall(){ - if [ "docker" == "$1" ] - then - docker stop opensds-authchecker - docker rm opensds-authchecker - else - su "$STACK_USER_NAME" -c "${DEV_STACK_DIR}/clean.sh" >/dev/null - su "$STACK_USER_NAME" -c "${DEV_STACK_DIR}/unstack.sh" >/dev/null - fi - -} - -uninstall_purge() { - rm "${STACK_HOME:?'STACK_HOME must be defined and cannot be empty'}/*" -rf - remove_user -} - -config_hotpot() { - hotpot_conf - if [ "docker" != "$1" ] ;then - create_user_and_endpoint_for_hotpot - else - keystone_credentials - python3 ${TOP_DIR}/ministone.py endpoint_bulk_update "opensds$OPENSDS_VERSION" "http://${HOST_IP}:50040/$OPENSDS_VERSION/%(tenant_id)s" - fi -} - -config_gelato() { - gelato_conf - if [ "docker" != "$1" ] ;then - create_user_and_endpoint_for_gelato - else - keystone_credentials - python3 ${TOP_DIR}/ministone.py endpoint_bulk_update "multicloud$MULTICLOUD_VERSION" "http://${HOST_IP}:8089/v1beta/%(tenant_id)s" - fi -} - -# *************************** -TOP_DIR=$(cd $(dirname "$0") && pwd) - -# OpenSDS configuration directory -OPENSDS_CONFIG_DIR=${OPENSDS_CONFIG_DIR:-/etc/opensds} -# Keystone configuration directory -KEYSTONE_CONFIG_DIR=${KEYSTONE_CONFIG_DIR:-/etc/keystone} -if [[ -e $TOP_DIR/local.conf ]];then - source $TOP_DIR/local.conf -fi -source "$TOP_DIR/util.sh" -source "$TOP_DIR/sdsrc" - -case "$# $1" in - "2 install") - echo "Starting install keystone..." - install $2 - ;; - "2 uninstall") - echo "Starting uninstall keystone..." - uninstall $2 - ;; - "3 config") - [[ X$2 != Xhotpot && X$2 != Xgelato ]] && echo "config type must be hotpot or gelato" && exit 1 - echo "Starting config $2 ..." - config_$2 $3 - ;; - "1 uninstall_purge") - echo "Starting uninstall purge keystone..." - uninstall_purge - ;; - *) - echo "Usage: $(basename $0) [parameters ...]" - exit 1 - ;; -esac diff --git a/installer/ansible/script/ministone.py b/installer/ansible/script/ministone.py deleted file mode 100755 index 448f42e06..000000000 --- a/installer/ansible/script/ministone.py +++ /dev/null @@ -1,204 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2019 The OpenSDS Authors. -# -# 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. -# -import sys -import os -import requests -import json - - -def token_issue(): - body = { - 'auth': { - 'identity': {'methods': ['password'], - 'password': { - 'user': { - 'name': OS_USERNAME, - 'domain': {'name': OS_USER_DOMAIN_NAME}, - 'password': OS_PASSWORD - } - } - }, - 'scope': { - 'project': { - 'name': OS_PROJECT_NAME, - 'domain': {'name': OS_USER_DOMAIN_NAME} - } - } - } - } - - headers = {'Content-Type': 'application/json'} - r_post = '' - try: - r_post = requests.post(OS_AUTH_URL + '/v3/auth/tokens', - headers=headers, data=json.dumps(body)) - except Exception as ex: - print('ERROR: %s' % (body)) - print('Execption: %s' % (ex)) - return None - - if debug: - print('DEBUG: POST /v3/auth/tokens status_code = %s' % - (r_post.status_code)) - print('DEBUG: token: %s' % (r_post.headers['X-Subject-Token'])) - if r_post.status_code == 201: - return r_post.headers['X-Subject-Token'] - else: - return None - - -def service_list(token): - headers = { - 'Content-Type': 'application/json', - 'X-Auth-Token': token - } - result_dict = dict() - try: - r_get = requests.get(OS_AUTH_URL + '/v3/services', headers=headers) - if debug: - print('DEBUG: GET /v3/services status_code = %s' % - (r_get.status_code)) - if r_get.status_code != 200: - return None - - result_list = json.loads(r_get.text)['services'] - - for s in result_list: - result_dict[s['name']] = s['id'] - except Exception as ex: - print("Got exception %s", ex) - return None - - return result_dict - - -def endpoint_list(token, service): - - headers = { - 'Content-Type': 'application/json', - 'X-Auth-Token': token - } - r_get = '' - try: - r_get = requests.get(OS_AUTH_URL + '/v3/endpoints', headers=headers) - if debug: - print('DEBUG: GET /v3/endpoints - status_code = %s' % - (r_get.status_code)) - except Exception as ex: - print("Got exception %s", ex) - return None - - if r_get.status_code != 200: - return None - - response = r_get.text - service_dict = service_list(token) - - ep_list = [] - for ep in json.loads(response)['endpoints']: - if service in service_dict.keys() and (ep['service_id'] == - service_dict[service]): - if debug: - print('DEBUG: %s %s' % (ep['id'], ep['interface'])) - print('DEBUG: url %s' % (ep['url'])) - ep_list.append([ep['id'], ep['interface']]) - - return ep_list - - -def endpoint_bulk_update(token, service, url): - headers = { - 'Content-Type': 'application/json', - 'X-Auth-Token': token - } - - ep_list = endpoint_list(token, service) - if not ep_list: - sys.exit(1) - - if debug: - print("DEBUG: ep_list: %s %s" % (ep_list, url)) - - for ep in ep_list: - body = {"endpoint": {"url": url}} - endpoint_id = ep[0] - if debug: - print("DEBUG: %s / %s" % - (OS_AUTH_URL + '/v3/endpoints/' + endpoint_id, body)) - r_patch = '' - try: - r_patch = requests.patch(OS_AUTH_URL + '/v3/endpoints/' + - endpoint_id, - headers=headers, data=json.dumps(body)) - except Exception as ex: - print('ERROR: endpoint update for id: %s failed. %s' - % (endpoint_id), ex) - # continue for all the given endpoints - if r_patch.status_code != 200: - print('ERROR: endpoint update for id: %s failed. HTTP %s' % - (endpoint_id, r_patch.status_code)) - if debug: - print('DEBUG: PATCH /endpoints/XXXX - status_code = %s' % - (r_patch.status_code)) - -# -# ministone.py - A simple stupid keystone client with almost no dependencies. -# -# Usage: -# 1) ministone.py token_issue -# Gets a new project scope token, and exit with 0 if successful. -# Exit with non zero (1) if unsuccessful. -# Can be used both wating for keystone service start up and -# getting a token (inernally). -# 2) ministone.py endoint_bulk_update SERVICE_NAME URL -# Updates URL portion of keystone endpoints of given SERVICE_NAME -# in one action. -# - - -if __name__ == '__main__': - - debug = False - - OS_AUTH_URL = os.environ['OS_AUTH_URL'] - OS_PASSWORD = os.environ['OS_PASSWORD'] - OS_PROJECT_DOMAIN_NAME = os.environ['OS_PROJECT_DOMAIN_NAME'] - OS_PROJECT_NAME = os.environ['OS_PROJECT_NAME'] - OS_USERNAME = os.environ['OS_USERNAME'] - OS_USER_DOMAIN_NAME = os.environ['OS_USER_DOMAIN_NAME'] - # OS_USER_DOMAIN_ID=os.environ['OS_USER_DOMAIN_ID'] - - # token_issue - # used for keystone process start up check. - token = '' - if len(sys.argv) == 2 and sys.argv[1] == 'token_issue': - token = token_issue() - if not token: - sys.exit(1) - else: - sys.exit(0) - - # endpoint_bulk_update - # used for overwriting keystone endpoints - if not ((len(sys.argv) == 4) and (sys.argv[1] == 'endpoint_bulk_update')): - print('Specify service_name and url for bulk update. Exiting...') - sys.exit(1) - - token = token_issue() - if not token: - sys.exit(1) - endpoint_bulk_update(token, sys.argv[2], sys.argv[3]) diff --git a/installer/ansible/script/mod_prometheus_config_for_alertmanager.sh b/installer/ansible/script/mod_prometheus_config_for_alertmanager.sh deleted file mode 100644 index 5d350c355..000000000 --- a/installer/ansible/script/mod_prometheus_config_for_alertmanager.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The OpenSDS Authors. -# -# 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. - -cat >> /etc/prometheus/prometheus.yml <> /etc/prometheus/prometheus.yml <> /etc/prometheus/prometheus.yml <> /etc/prometheus/prometheus.yml < /etc/systemd/system/alertmanager.service < /etc/nginx/sites-available/default < /etc/systemd/system/node_exporter.service < /etc/prometheus/prometheus.yml < /etc/systemd/system/prometheus.service < /etc/systemd/system/pushgateway.service </dev/null || { - echo_summary "curl must be installed" - exit 1 - } - - local i - for i in $(seq 1 "$times"); do - local out - if out=$(curl --max-time 1 -gkfs "$url" 2>/dev/null); then - echo_summary "On try ${i}, ${prefix}: ${out}" - return 0 - fi - sleep "${wait}" - done - echo_summary "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each" - return 1 -} - -# Prints line number and "message" in error format -# err $LINENO "message" -err() { - local exitcode=$? - local xtrace - xtrace=$(set +o | grep xtrace) - set +o xtrace - local msg="[ERROR] ${BASH_SOURCE[2]}:$1 $2" - echo "$msg" - $xtrace - return $exitcode -} - -# Prints line number and "message" then exits -# die $LINENO "message" -die() { - local exitcode=$? - set +o xtrace - local line=$1; shift - if [ $exitcode == 0 ]; then - exitcode=1 - fi - err "$line" "$*" - # Give buffers a second to flush - sleep 1 - exit $exitcode -} - -get_default_host_ip() { - local host_ip=$1 - local af=$2 - # Search for an IP unless an explicit is set by ``HOST_IP`` environment variable - if [ -z "$host_ip" ]; then - host_ip="" - # Find the interface used for the default route - host_ip_iface=${host_ip_iface:-$(ip -f "$af" route | awk '/default/ {print $5}' | head -1)} - local host_ips - host_ips=$(LC_ALL=C ip -f "$af" addr show "${host_ip_iface}" | sed /temporary/d |awk /$af'/ {split($2,parts,"/"); print parts[1]}') - local ip - for ip in $host_ips; do - host_ip=$ip - break; - done - fi - echo "$host_ip" -} diff --git a/installer/ansible/script/virtualenv3_exec.j2 b/installer/ansible/script/virtualenv3_exec.j2 index 1bac0e8a4..5ae12bebf 100644 --- a/installer/ansible/script/virtualenv3_exec.j2 +++ b/installer/ansible/script/virtualenv3_exec.j2 @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2020 The SODA Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/installer/ansible/script/virtualenv_exec.j2 b/installer/ansible/script/virtualenv_exec.j2 deleted file mode 100644 index fd6778129..000000000 --- a/installer/ansible/script/virtualenv_exec.j2 +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The OpenSDS Authors. -# -# 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. - -source {{ venv }}/bin/activate -python $@ diff --git a/installer/ansible/site.yml b/installer/ansible/site.yml index 4fe04186c..2b4d7aca8 100644 --- a/installer/ansible/site.yml +++ b/installer/ansible/site.yml @@ -1,4 +1,4 @@ -# Copyright 2019 The OpenSDS Authors. +# Copyright 2022 The SODA Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,15 +13,15 @@ # limitations under the License. --- -# Defines deployment design and assigns role to server groups +# Defines deployment design and assigns role to node groups - hosts: - - controllers + - delfin-nodes gather_facts: true any_errors_fatal: true become: True - name: Install delfin - hosts: controllers + hosts: delfin-nodes remote_user: root vars_files: - group_vars/common.yml @@ -32,53 +32,3 @@ - import_role: name: delfin-installer tags: delfin - -- name: Install SRM Toolchain - hosts: controllers - remote_user: root - vars_files: - - group_vars/common.yml - - group_vars/delfin.yml - - group_vars/srm-toolchain.yml - gather_facts: false - become: True - tasks: - - import_role: - name: srm-toolchain-installer - when: - - install_srm_toolchain == true - tags: srm_toolchain - -# Defines deployment design and assigns role to server groups -- name: Install keystone services - hosts: controllers - remote_user: root - vars_files: - - group_vars/common.yml - - group_vars/auth.yml - - group_vars/dashboard.yml - gather_facts: false - become: True - tasks: - - import_role: - name: auth-installer - when: - - enable_dashboard == true - tags: keystone - -- name: deploy dashboard - hosts: controllers - remote_user: root - vars_files: - - group_vars/common.yml - - group_vars/auth.yml - - group_vars/srm-toolchain.yml - - group_vars/dashboard.yml - gather_facts: false - become: True - tasks: - - include_role: - name: dashboard-installer - when: - - enable_dashboard == true - tags: dashboard diff --git a/installer/ansible/srm-toolchain/alertmanager/config.yml b/installer/ansible/srm-toolchain/alertmanager/config.yml deleted file mode 100644 index 6536f43a8..000000000 --- a/installer/ansible/srm-toolchain/alertmanager/config.yml +++ /dev/null @@ -1,6 +0,0 @@ -route: - receiver: 'delfin' - group_by: [severity] - -receivers: -- name: 'delfin' diff --git a/installer/ansible/srm-toolchain/config.grafana b/installer/ansible/srm-toolchain/config.grafana deleted file mode 100644 index fd7cb2cf3..000000000 --- a/installer/ansible/srm-toolchain/config.grafana +++ /dev/null @@ -1,7 +0,0 @@ -GF_USERS_DEFAULT_THEME=light -GF_AUTH_DISABLE_LOGIN_FORM=true -GF_AUTH_ANONYMOUS_ENABLED=true -GF_AUTH_ANONYMOUS_ORG_ROLE=Admin -GF_SECURITY_ALLOW_EMBEDDING=true - - diff --git a/installer/ansible/srm-toolchain/docker-compose.yml b/installer/ansible/srm-toolchain/docker-compose.yml deleted file mode 100644 index ba5ca462f..000000000 --- a/installer/ansible/srm-toolchain/docker-compose.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: '3.1' - -volumes: - prometheus_data: {} - grafana_data: {} - -services: - prometheus: - image: prom/prometheus: { prometheus_docker_version } - container_name: monitoring_prometheus - volumes: - - ./prometheus/:/etc/prometheus/ - - prometheus_data:/prometheus - - ./prometheus/alerts.rules:/alertmanager/alerts.rules - command: - - '--config.file=/etc/prometheus/prometheus.yml' - - '--storage.tsdb.path=/prometheus' - ports: - - SODA_PROMETHEUS_PORT:SODA_PROMETHEUS_PORT - links: - - alertmanager:alertmanager - restart: always - deploy: - mode: global - environment: - - HOST_IP="HOST_IP" - - alertmanager: - image: prom/alertmanager: { alertmanager_docker_version } - container_name: monitoring_alertmanager - ports: - - SODA_ALERTMANAGER_PORT:SODA_ALERTMANAGER_PORT - volumes: - - ./alertmanager/:/etc/alertmanager/ - restart: always - command: - - '--config.file=/etc/alertmanager/config.yml' - - '--storage.path=/alertmanager' - deploy: - mode: global - - grafana: - image: grafana/grafana: { grafana_docker_version } - container_name: monitoring_grafana - depends_on: - - prometheus - ports: - - SODA_GRAFANA_PORT:SODA_GRAFANA_PORT - volumes: - - grafana_data:/var/lib/grafana - - ./grafana/dashboards:/var/lib/grafana/dashboards - - ./grafana/provisioning:/etc/grafana/provisioning - restart: always - env_file: - - config.grafana - diff --git a/installer/ansible/srm-toolchain/grafana/dashboards/overall-dashboard.json b/installer/ansible/srm-toolchain/grafana/dashboards/overall-dashboard.json deleted file mode 100644 index 38d79b494..000000000 --- a/installer/ansible/srm-toolchain/grafana/dashboards/overall-dashboard.json +++ /dev/null @@ -1,1803 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 6, - "iteration": 1624635664577, - "links": [], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 38, - "panels": [], - "title": "Quick Stats", - "type": "row" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 40, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7.3.5", - "targets": [ - { - "expr": "avg(${resource_type}_iops{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"})", - "instant": false, - "interval": "", - "legendFormat": "", - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average IOPS", - "transparent": true, - "type": "stat" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 4, - "y": 1 - }, - "id": 42, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7.3.5", - "targets": [ - { - "expr": "avg(${resource_type}_throughput{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"})", - "interval": "", - "legendFormat": "", - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average Throughput", - "transparent": true, - "type": "stat" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 8, - "y": 1 - }, - "id": 43, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "7.3.5", - "targets": [ - { - "expr": "avg(${resource_type}_responseTime{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"})", - "interval": "", - "legendFormat": "", - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average Response Time", - "transparent": true, - "type": "stat" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 45, - "panels": [], - "title": "Response Time", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 21, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "maxPerRow": 3, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "repeat": null, - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_responseTime{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "hide": false, - "interval": "", - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Response Time", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [], - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 16, - "panels": [], - "repeat": null, - "title": "Throughput", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 7, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_throughput{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Throughput", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "MBs", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 7, - "x": 7, - "y": 19 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_readThroughput{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Read Throughput", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "MBs", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 7, - "x": 14, - "y": 19 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_writeThroughput{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "intervalFactor": 1, - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Write Throughput", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "MBs", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 28 - }, - "id": 18, - "panels": [], - "repeat": null, - "title": "IOPS", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 7, - "x": 0, - "y": 29 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_iops{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} IOPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "iops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 7, - "x": 7, - "y": 29 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_readIops{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Read IOPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "iops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 7, - "x": 14, - "y": 29 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_writeIops{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Write IOPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "iops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 22, - "panels": [], - "repeat": null, - "title": "IO Size", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "unit": "deckbytes" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 7, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 24, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_ioSize{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} IO Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "deckbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "unit": "deckbytes" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 7, - "x": 7, - "y": 39 - }, - "hiddenSeries": false, - "id": 26, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_readIoSize{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Read IO Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "deckbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "unit": "deckbytes" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 7, - "x": 14, - "y": 39 - }, - "hiddenSeries": false, - "id": 28, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_writeIoSize{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Write IO Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "deckbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 47 - }, - "id": 30, - "panels": [], - "title": "Cache Hit Ratio", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "unit": "percent" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 7, - "x": 0, - "y": 48 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_cacheHitRatio{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Cache Hit Ratio", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "unit": "percent" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 7, - "x": 7, - "y": 48 - }, - "hiddenSeries": false, - "id": 34, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_readCacheHitRatio{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Read Cache Hit Ratio", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "unit": "percent" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 7, - "x": 14, - "y": 48 - }, - "hiddenSeries": false, - "id": 36, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "${resource_type}_writeCacheHitRatio{storage_id=\"${delfin_storage_id}\", resource_id=\"${resource_id}\"}", - "interval": "", - "legendFormat": "${resource_id}", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "${resource_id} Write Cache Hit Ratio", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": null, - "value": null - }, - "datasource": "Prometheus", - "definition": "label_values(storage_id)", - "error": null, - "hide": 0, - "includeAll": false, - "label": "Delfin Storage ID", - "multi": false, - "name": "delfin_storage_id", - "options": [], - "query": "label_values(storage_id)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": null, - "value": null - }, - "datasource": "Prometheus", - "definition": "label_values(resource_type)", - "error": null, - "hide": 0, - "includeAll": false, - "label": "Resource Type", - "multi": false, - "name": "resource_type", - "options": [], - "query": "label_values(resource_type)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": null, - "value": null - }, - "datasource": "Prometheus", - "definition": "label_values({resource_type=\"$resource_type\"}, resource_id)", - "error": null, - "hide": 0, - "includeAll": false, - "label": "Resource ID", - "multi": false, - "name": "resource_id", - "options": [ - { - "selected": false, - "text": null, - "value": null - } - ], - "query": "label_values({resource_type=\"$resource_type\"}, resource_id)", - "refresh": 0, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Performance Monitor - Overall Dashboard", - "uid": "UnRt1zknk", - "version": 15 -} diff --git a/installer/ansible/srm-toolchain/grafana/dashboards/storage-details-dashboard.json b/installer/ansible/srm-toolchain/grafana/dashboards/storage-details-dashboard.json deleted file mode 100644 index a4ee346cc..000000000 --- a/installer/ansible/srm-toolchain/grafana/dashboards/storage-details-dashboard.json +++ /dev/null @@ -1,905 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 2, - "iteration": 1624629890830, - "links": [], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 20, - "panels": [], - "title": "Response Times", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 23, - "x": 0, - "y": 1 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "maxPerRow": 3, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "repeat": null, - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_responseTime", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Storage ID: {{storage_id}} ", - "queryType": "randomWalk", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Response Time", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [], - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 16, - "panels": [], - "repeat": null, - "title": "Storage Throughput", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 23, - "x": 0, - "y": 8 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_throughput", - "interval": "", - "legendFormat": "Storage ID: {{storage_id}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Throughput", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "MBs", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 23, - "x": 0, - "y": 14 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_readThroughput", - "interval": "", - "legendFormat": "Storage ID: {{storage_id}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Read Throughput", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "MBs", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "MBs" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 23, - "x": 0, - "y": 20 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_writeThroughput", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Storage ID: {{storage_id}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Write Throughput", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "MBs", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 18, - "panels": [], - "title": "Storage Requests", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 23, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_iops", - "interval": "", - "legendFormat": "Storage ID: {{storage_id}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Total IOPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "iops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 23, - "x": 0, - "y": 35 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_readIops", - "interval": "", - "legendFormat": "Storage ID: {{storage_id}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Read IOPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "iops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "iops" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 23, - "x": 0, - "y": 43 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "storage_writeIops", - "interval": "", - "legendFormat": "Storage ID: {{storage_id}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Storage Write IOPS", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "iops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "30s", - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "datasource": "Prometheus", - "error": null, - "filters": [ - { - "condition": "", - "key": "storage_id", - "operator": "=", - "value": null - } - ], - "hide": 0, - "label": "Filters", - "name": "filters", - "skipUrlSync": false, - "type": "adhoc" - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Performance Monitor - Storage Details", - "uid": "Tut2q3AMk", - "version": 3 -} diff --git a/installer/ansible/srm-toolchain/grafana/provisioning/dashboards/all.yml b/installer/ansible/srm-toolchain/grafana/provisioning/dashboards/all.yml deleted file mode 100644 index 09974b9b6..000000000 --- a/installer/ansible/srm-toolchain/grafana/provisioning/dashboards/all.yml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: 1 - -providers: -- name: 'default' - org_id: 1 - folder: '' - type: file - disableDeletion: false - allowUiUpdates: true - updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards - options: - path: /var/lib/grafana/dashboards - foldersFromFilesStructure: true diff --git a/installer/ansible/srm-toolchain/grafana/provisioning/datasources/all.yml b/installer/ansible/srm-toolchain/grafana/provisioning/datasources/all.yml deleted file mode 100644 index 8bd85f1e5..000000000 --- a/installer/ansible/srm-toolchain/grafana/provisioning/datasources/all.yml +++ /dev/null @@ -1,21 +0,0 @@ -# config file version -apiVersion: 1 - -# list of datasources that should be deleted from the database -deleteDatasources: - - name: Prometheus - orgId: 1 - -# list of datasources to insert/update depending -# whats available in the database -datasources: - # name of the datasource. Required -- name: 'Prometheus' - type: 'prometheus' - access: 'proxy' - org_id: 1 - url: "http://HOST_IP:SODA_PROMETHEUS_PORT" - is_default: true - version: 1 - editable: true - \ No newline at end of file diff --git a/installer/ansible/srm-toolchain/prometheus/alerts.rules b/installer/ansible/srm-toolchain/prometheus/alerts.rules deleted file mode 100644 index b49278726..000000000 --- a/installer/ansible/srm-toolchain/prometheus/alerts.rules +++ /dev/null @@ -1,62 +0,0 @@ -groups: -- name: Throughput - rules: - - - alert: high_throughput - expr: storage_throughput > 80 - for: 30s - labels: - severity: warning - annotations: - summary: "{{$labels.storage_id}} is experiencing high Throughput usage" - description: "{{$labels.storage_id}} of {{$labels.job}} is experiencing high throughput usage." - - - alert: critical_throughput - expr: storage_throughput > 90 - for: 30s - labels: - severity: critical - annotations: - summary: "{{$labels.storage_id}} is experiencing critical Throughput usage" - description: "{{$labels.storage_id}} of {{$labels.job}} is experiencing critical throughput usage. Please take remedial measures immediately" - -- name: Requests - rules: - - - alert: high_requests - expr: storage_requests > 80 - for: 30s - labels: - severity: warning - annotations: - summary: "{{$labels.storage_id}} is experiencing high request usage" - description: "{{$labels.storage_id}} of {{$labels.job}} is experiencing high request usage." - - - alert: critical_requests - expr: storage_requests > 90 - for: 30s - labels: - severity: critical - annotations: - summary: "{{$labels.storage_id}} is experiencing critical requests usage" - description: "{{$labels.storage_id}} of {{$labels.job}} is experiencing critical requests usage. Please take remedial measures immediately" -- name: Response Time - rules: - - - alert: high_response_time - expr: storage_responseTime > 20 - for: 30s - labels: - severity: warning - annotations: - summary: "{{$labels.storage_id}} is experiencing high response times" - description: "{{$labels.storage_id}} of {{$labels.job}} is experiencing high response times." - - - alert: critical_response_time - expr: storage_responseTime > 60 - for: 30s - labels: - severity: critical - annotations: - summary: "{{$labels.storage_id}} is experiencing very high response times." - description: "{{$labels.storage_id}} of {{$labels.job}} is experiencing very high response times. Please take remedial measures immediately" diff --git a/installer/ansible/srm-toolchain/prometheus/prometheus.yml b/installer/ansible/srm-toolchain/prometheus/prometheus.yml deleted file mode 100644 index dd7328e20..000000000 --- a/installer/ansible/srm-toolchain/prometheus/prometheus.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Delfin Global config -global: - scrape_interval: 10s # By default, scrape targets every 15 seconds. - # evaluation_interval: 15s # By default, scrape targets every 15 seconds. - # scrape_timeout is set to the global default (10s). - - # Attach these labels to any time series or alerts when communicating with - # external systems (federation, remote storage, Alertmanager). - external_labels: - monitor: 'delfin-performance-monitor' - -# Load and evaluate rules in this file every 'evaluation_interval' seconds. -rule_files: - - alerts.rules - # - "first.rules" - # - "second.rules" - -# alert -alerting: - alertmanagers: - - scheme: http - static_configs: - - targets: - - "alertmanager:SODA_ALERTMANAGER_PORT" - -# A scrape configuration containing exactly one endpoint to scrape: -# Here it's Prometheus itself. -scrape_configs: - # The job name is added as a label `job=` to any timeseries scraped from this config. - - job_name: 'delfin' - - # Override the global default and scrape targets from this job every 5 seconds. - # scrape_interval: 5s - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: ['HOST_IP:8195'] - \ No newline at end of file