From 2aed4ae42bc3b9c4d2736dc4b21d53b544c36112 Mon Sep 17 00:00:00 2001 From: Joseph Vazhappilly Date: Sun, 27 Sep 2020 01:20:41 -0400 Subject: [PATCH 1/2] After redis config change restart service --- ansible/roles/delfin-installer/scenarios/redis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ansible/roles/delfin-installer/scenarios/redis.yml b/ansible/roles/delfin-installer/scenarios/redis.yml index f324c5240..3d474978a 100644 --- a/ansible/roles/delfin-installer/scenarios/redis.yml +++ b/ansible/roles/delfin-installer/scenarios/redis.yml @@ -33,9 +33,8 @@ replace: "port {{ delfin_redis_port }}" become: yes -- name: Ensure Redis is started +- name: Ensure Redis is restarted service: - name: redis-server - state: started - enabled: yes + name: redis-server + state: restarted become: yes From 3d163f9a6a291ef1b95651529e06c06da2461fca Mon Sep 17 00:00:00 2001 From: Joseph Vazhappilly Date: Sun, 27 Sep 2020 11:48:38 -0400 Subject: [PATCH 2/2] Update ulimit for redis install --- ansible/roles/cleaner/scenarios/delfin.yml | 2 ++ .../delfin-installer/scenarios/redis.yml | 8 ++--- ansible/site.yml | 29 ++++++++++--------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ansible/roles/cleaner/scenarios/delfin.yml b/ansible/roles/cleaner/scenarios/delfin.yml index 0487a2bf8..479bd6647 100644 --- a/ansible/roles/cleaner/scenarios/delfin.yml +++ b/ansible/roles/cleaner/scenarios/delfin.yml @@ -20,6 +20,7 @@ - name: Kill running delfin processes shell: "kill {{ item }}" with_items: "{{ running_processes.stdout_lines }}" + ignore_errors: yes - wait_for: path: "/proc/{{ item }}/status" @@ -40,6 +41,7 @@ - rabbitmq-server - redis-server become: yes + ignore_errors: yes - name: clean up all delfin directories file: diff --git a/ansible/roles/delfin-installer/scenarios/redis.yml b/ansible/roles/delfin-installer/scenarios/redis.yml index 3d474978a..d0855dbd4 100644 --- a/ansible/roles/delfin-installer/scenarios/redis.yml +++ b/ansible/roles/delfin-installer/scenarios/redis.yml @@ -19,10 +19,10 @@ register: redisservice - name: Ensure Redis is present - apt: - name: redis-server - state: latest - become: yes + shell: "{{ item }}" + with_items: + - ulimit -n 65536 + - apt-get install -y redis-server when: - redisservice.stat.exists is undefined or redisservice.stat.exists == false diff --git a/ansible/site.yml b/ansible/site.yml index 95555b443..62759f8c8 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -83,6 +83,21 @@ - deploy_project != "gelato" tags: dock +- name: Install delfin + hosts: controllers + remote_user: root + vars_files: + - group_vars/common.yml + - group_vars/delfin.yml + gather_facts: false + become: True + tasks: + - import_role: + name: delfin-installer + when: + - enable_delfin == true + tags: delfin + - name: Install Gelato hosts: controllers remote_user: root @@ -167,17 +182,3 @@ - enable_orchestration == true tags: orchestration -- name: Install delfin - hosts: controllers - remote_user: root - vars_files: - - group_vars/common.yml - - group_vars/delfin.yml - gather_facts: false - become: True - tasks: - - import_role: - name: delfin-installer - when: - - enable_delfin == true - tags: delfin