Fix some bugs about ansible deployment 85/60985/1
authorleonwang <wanghui71@huawei.com>
Thu, 16 Aug 2018 01:27:32 +0000 (09:27 +0800)
committerleonwang <wanghui71@huawei.com>
Thu, 16 Aug 2018 01:27:52 +0000 (09:27 +0800)
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 <wanghui71@huawei.com>
ci/ansible/group_vars/common.yml
ci/ansible/roles/common/tasks/main.yml
ci/ansible/roles/nbp-installer/tasks/main.yml
ci/ansible/roles/osdsdb/tasks/main.yml
ci/ansible/roles/osdsdock/scenarios/ceph.yml
ci/ansible/site.yml

index dab13a7..71e946e 100644 (file)
@@ -57,8 +57,8 @@ nbp_remote_url: https://github.com/opensds/nbp.git
 ###########\r
 \r
 # If user specifies intalling from release,then he can choose the specific version\r
-opensds_release: v0.2.1 # The version should be at least v0.2.1\r
-nbp_release: v0.2.1 # The version should be at least v0.2.1\r
+opensds_release: v0.3.0 # The version should be at least v0.2.1\r
+nbp_release: v0.3.0 # The version should be at least v0.2.1\r
 \r
 # These fields are NOT suggested to be modified\r
 opensds_download_url: https://github.com/opensds/opensds/releases/download/{{ opensds_release }}/opensds-hotpot-{{ opensds_release }}-linux-amd64.tar.gz\r
index 14a28d3..4137812 100644 (file)
   args:\r
     chdir: "{{ opensds_config_dir }}"\r
   ignore_errors: yes\r
-\r
-- name: include nbp-installer role if nbp_plugin_type != hotpot_only\r
-  include_role:\r
-    name: nbp-installer\r
-  when: nbp_plugin_type != "hotpot_only"\r
index dd13195..09764a5 100644 (file)
@@ -19,6 +19,7 @@
     state: present\r
   with_items:\r
     - open-iscsi\r
+  when: nbp_plugin_type != "hotpot_only"\r
 \r
 - name: create nbp work directory if it doesn't exist\r
   file:\r
     mode: 0755\r
   with_items:\r
     - "{{ nbp_work_dir }}"\r
+  when: nbp_plugin_type != "hotpot_only"\r
 \r
 - name: include scenarios/repository.yml when installing from repository\r
   include: scenarios/repository.yml\r
-  when: install_from == "repository"\r
+  when: install_from == "repository" and nbp_plugin_type != "hotpot_only"\r
 \r
 - name: include scenarios/release.yml when installing from release\r
   include: scenarios/release.yml\r
-  when: install_from == "release"\r
+  when: install_from == "release" and nbp_plugin_type != "hotpot_only"\r
 \r
 - name: include scenarios/flexvolume.yml when nbp plugin type is flexvolume\r
   include: scenarios/flexvolume.yml\r
index 396fd9a..f8fa944 100644 (file)
@@ -18,7 +18,7 @@
   with_first_found:\r
     - "scenarios/etcd_{{ ansible_architecture }}.yml"\r
     - "scenarios/etcd.yml"\r
-  when: db_driver == "etcd" and container_enabled == false\r
+  when: db_driver == "etcd" and etcd_container_enabled == false\r
 \r
 - name: include scenarios/container.yml\r
   include: scenarios/container.yml\r
index f5ea8ef..16aca67 100644 (file)
   with_items:\r
     - ceph-common\r
 \r
+- name: install notario package with pip when ceph backend enabled\r
+  pip:\r
+    name: "{{ item }}"\r
+  with_items:\r
+    - notario\r
+\r
 - name: configure ceph section in opensds global info if specify ceph backend\r
   shell: |\r
     cat >> opensds.conf <<OPENSDS_GLOABL_CONFIG_DOC\r
 \r
 - name: check if ceph osd is running\r
   shell: ps aux | grep ceph-osd | grep -v grep\r
-  ignore_errors: false\r
+  ignore_errors: true\r
   changed_when: false\r
   register: service_ceph_osd_status\r
 \r
 - name: check if ceph mon is running\r
   shell: ps aux | grep ceph-mon | grep -v grep\r
-  ignore_errors: false\r
+  ignore_errors: true\r
   changed_when: false\r
   register: service_ceph_mon_status\r
 \r
index 31ebaee..f2dc07c 100644 (file)
@@ -34,3 +34,4 @@
     - osdslet\r
     - osdsdock\r
     - dashboard-installer\r
+    - nbp-installer\r