[stor4nfv] Update k8s scenarios 77/61877/1
authorramamani yeleswarapu <ramamani.yeleswarapu@intel.com>
Thu, 6 Sep 2018 07:20:30 +0000 (00:20 -0700)
committerramamani yeleswarapu <ramamani.yeleswarapu@intel.com>
Thu, 6 Sep 2018 07:23:26 +0000 (00:23 -0700)
Makes a few changes to 'stor4nfv' role to create csi pods.

Change-Id: I179b82ddb524738a42ff1f7dcd36424d50a5c502
Signed-off-by: ramamani yeleswarapu <ramamani.yeleswarapu@intel.com>
plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml

index 112d9c8..8943213 100644 (file)
@@ -49,3 +49,12 @@ sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/a
 sed -i  '/check_ansible_version/a \  ignore_errors: yes\' roles/common/tasks/main.yml
 
 sed -i '/- dashboard-installer/s/^/#/g' site.yml
+
+# comment csi create pods in Stor4nfv
+sed -i '/kubectl create/s/^/#/g' roles/nbp-installer/scenarios/csi.yml
+
+sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
+
+sed -i '/and service_ceph_osd_status.rc == 0/s/^/#/g' roles/osdsdock/scenarios/ceph.yml
+sed -i  '/and service_ceph_osd_status.rc == 0/a \  when: service_ceph_mon_status.rc == 0\' \
+       roles/osdsdock/scenarios/ceph.yml
index 7bc8ec0..dbaa8d6 100644 (file)
@@ -7,7 +7,7 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 # #############################################################################
 ---
-- include: stor4nfv
+- include: stor4nfv.yml
   when:
     - ansible_distribution == 'Ubuntu'
     - stor4nfv is defined and stor4nfv == "Enable"
index 017f377..501d3ba 100644 (file)
   ignore_errors: "true"
   register: osdsctl_exists
 
-- name: create opensds default profile
+- name: ensure opensds csi directory exists
+  stat:
+    path: /opt/opensds-sushi-linux-{{ imgarch }}
+  ignore_errors: "true"
+  register: csi_dir_exists
+
+- name: create opensds default profile, create csi pods
   remote_user: root
   shell: |
     cp /opt/opensds-hotpot-linux-{{ imgarch }}/bin/osdsctl /usr/local/bin;
     export OPENSDS_ENDPOINT=http://{{ public_vip.ip }}:50040;
     export OPENSDS_AUTH_STRATEGY=noauth;
-    osdsctl profile create '{"name": "default", "description": "default policy"}'
+    osdsctl profile create '{"name": "default", "description": "default policy"}';
+    cd /opt/opensds-sushi-linux-{{ imgarch }};
+    kubectl create -f csi/deploy/kubernetes
   ignore_errors: "true"
   when:
     - osdsctl_exists.stat.exists is defined and osdsctl_exists.stat.exists
+    - csi_dir_exists.stat.exists is defined and csi_dir_exists.stat.exists