From ea2ed9bc8e399e35a0311798e8c7f9aa132ca467 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 29 Sep 2020 12:19:04 +0530 Subject: [PATCH] Adding Performance installtion to ansible --- ansible/roles/cleaner/scenarios/delfin.yml | 2 +- .../roles/delfin-installer/scenarios/source-code.yml | 10 ++++++++++ .../roles/delfin-installer/scenarios/start-delfin.yml | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ansible/roles/cleaner/scenarios/delfin.yml b/ansible/roles/cleaner/scenarios/delfin.yml index 479bd6647..5ddd627f7 100644 --- a/ansible/roles/cleaner/scenarios/delfin.yml +++ b/ansible/roles/cleaner/scenarios/delfin.yml @@ -14,7 +14,7 @@ --- - name: Get running delfin processes - shell: "ps -ef | grep -v grep | grep -i 'python3 /opt/delfin-linux-amd64/delfin/cmd/' | awk '{print $2}'" + shell: "ps -ef | grep -v grep | grep -i 'python3 /opt/delfin-linux-amd64/delfin/' | awk '{print $2}'" register: running_processes - name: Kill running delfin processes diff --git a/ansible/roles/delfin-installer/scenarios/source-code.yml b/ansible/roles/delfin-installer/scenarios/source-code.yml index 9005f5e9b..fb299c7e5 100644 --- a/ansible/roles/delfin-installer/scenarios/source-code.yml +++ b/ansible/roles/delfin-installer/scenarios/source-code.yml @@ -73,6 +73,16 @@ - delfin.conf - api-paste.ini + +- name: copy scheduler configs to host + copy: + src: "{{ delfin_work_dir }}/etc/{{ item }}" + dest: "{{ delfin_config_dir }}/{{ item }}" + mode: 0755 + become: yes + with_items: + - scheduler_config.json + - name: Update redis ip & port configuration ini_file: create: no diff --git a/ansible/roles/delfin-installer/scenarios/start-delfin.yml b/ansible/roles/delfin-installer/scenarios/start-delfin.yml index 037697803..6d5d155c4 100644 --- a/ansible/roles/delfin-installer/scenarios/start-delfin.yml +++ b/ansible/roles/delfin-installer/scenarios/start-delfin.yml @@ -58,5 +58,6 @@ - '{{ venv }}/exec {{ delfin_work_dir }}/delfin/cmd/api.py --config-file {{ delfin_config_dir }}/delfin.conf >/tmp/api.log 2>&1 &' - '{{ venv }}/exec {{ delfin_work_dir }}/delfin/cmd/task.py --config-file {{ delfin_config_dir }}/delfin.conf >/tmp/task.log 2>&1 &' - '{{ venv }}/exec {{ delfin_work_dir }}/delfin/cmd/alert.py --config-file {{ delfin_config_dir }}/delfin.conf >/tmp/alert.log 2>&1 &' + - '{{ venv }}/exec {{ delfin_work_dir }}/delfin/exporter/exporter_server.py --config-file {{ delfin_config_dir }}/delfin.conf >/tmp/exporter.log 2>&1 &' args: chdir: "{{ delfin_work_dir }}"