From 4ced57eae63a52ea517d4087662726d942da8441 Mon Sep 17 00:00:00 2001 From: leonwang Date: Thu, 16 Aug 2018 09:27:32 +0800 Subject: Fix some bugs about ansible deployment According to the feedback from Compass4NFV team, the goal of this patch is for: 1. Add notario package install step 2. Ignore the error of checking ceph osd and mon service 3. Move nbp-installer role to the last one to install Change-Id: Id6555cd9cd2877dc21ee5a92774c514b7c3fca34 Signed-off-by: leonwang --- ci/ansible/group_vars/common.yml | 4 ++-- ci/ansible/roles/common/tasks/main.yml | 5 ----- ci/ansible/roles/nbp-installer/tasks/main.yml | 6 ++++-- ci/ansible/roles/osdsdb/tasks/main.yml | 2 +- ci/ansible/roles/osdsdock/scenarios/ceph.yml | 10 ++++++++-- ci/ansible/site.yml | 1 + 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ci/ansible/group_vars/common.yml b/ci/ansible/group_vars/common.yml index dab13a7..71e946e 100644 --- a/ci/ansible/group_vars/common.yml +++ b/ci/ansible/group_vars/common.yml @@ -57,8 +57,8 @@ nbp_remote_url: https://github.com/opensds/nbp.git ########### # If user specifies intalling from release,then he can choose the specific version -opensds_release: v0.2.1 # The version should be at least v0.2.1 -nbp_release: v0.2.1 # The version should be at least v0.2.1 +opensds_release: v0.3.0 # The version should be at least v0.2.1 +nbp_release: v0.3.0 # The version should be at least v0.2.1 # These fields are NOT suggested to be modified opensds_download_url: https://github.com/opensds/opensds/releases/download/{{ opensds_release }}/opensds-hotpot-{{ opensds_release }}-linux-amd64.tar.gz diff --git a/ci/ansible/roles/common/tasks/main.yml b/ci/ansible/roles/common/tasks/main.yml index 14a28d3..4137812 100644 --- a/ci/ansible/roles/common/tasks/main.yml +++ b/ci/ansible/roles/common/tasks/main.yml @@ -110,8 +110,3 @@ args: chdir: "{{ opensds_config_dir }}" ignore_errors: yes - -- name: include nbp-installer role if nbp_plugin_type != hotpot_only - include_role: - name: nbp-installer - when: nbp_plugin_type != "hotpot_only" diff --git a/ci/ansible/roles/nbp-installer/tasks/main.yml b/ci/ansible/roles/nbp-installer/tasks/main.yml index dd13195..09764a5 100644 --- a/ci/ansible/roles/nbp-installer/tasks/main.yml +++ b/ci/ansible/roles/nbp-installer/tasks/main.yml @@ -19,6 +19,7 @@ state: present with_items: - open-iscsi + when: nbp_plugin_type != "hotpot_only" - name: create nbp work directory if it doesn't exist file: @@ -27,14 +28,15 @@ mode: 0755 with_items: - "{{ nbp_work_dir }}" + when: nbp_plugin_type != "hotpot_only" - name: include scenarios/repository.yml when installing from repository include: scenarios/repository.yml - when: install_from == "repository" + when: install_from == "repository" and nbp_plugin_type != "hotpot_only" - name: include scenarios/release.yml when installing from release include: scenarios/release.yml - when: install_from == "release" + when: install_from == "release" and nbp_plugin_type != "hotpot_only" - name: include scenarios/flexvolume.yml when nbp plugin type is flexvolume include: scenarios/flexvolume.yml diff --git a/ci/ansible/roles/osdsdb/tasks/main.yml b/ci/ansible/roles/osdsdb/tasks/main.yml index 396fd9a..f8fa944 100644 --- a/ci/ansible/roles/osdsdb/tasks/main.yml +++ b/ci/ansible/roles/osdsdb/tasks/main.yml @@ -18,7 +18,7 @@ with_first_found: - "scenarios/etcd_{{ ansible_architecture }}.yml" - "scenarios/etcd.yml" - when: db_driver == "etcd" and container_enabled == false + when: db_driver == "etcd" and etcd_container_enabled == false - name: include scenarios/container.yml include: scenarios/container.yml diff --git a/ci/ansible/roles/osdsdock/scenarios/ceph.yml b/ci/ansible/roles/osdsdock/scenarios/ceph.yml index f5ea8ef..16aca67 100644 --- a/ci/ansible/roles/osdsdock/scenarios/ceph.yml +++ b/ci/ansible/roles/osdsdock/scenarios/ceph.yml @@ -20,6 +20,12 @@ with_items: - ceph-common +- name: install notario package with pip when ceph backend enabled + pip: + name: "{{ item }}" + with_items: + - notario + - name: configure ceph section in opensds global info if specify ceph backend shell: | cat >> opensds.conf <