From f9425c8accb3e1fac5237377f7d5615c3eeb93e0 Mon Sep 17 00:00:00 2001 From: ramamani yeleswarapu Date: Mon, 19 Mar 2018 07:42:47 -0700 Subject: Fix Stor4nfv CI issues due to repo changes Applies the changes in stor4nfv repo and consolidates opensds and nbp inventories. This fixes the CI failure in stor4nfv scenarios. Change-Id: I91f291d52488771934e0e0e93da2c56715abc877 Signed-off-by: Ramamani Yeleswarapu --- .../roles/stor4nfv/files/configure_vars.sh | 12 ++++++++-- plugins/stor4nfv/roles/stor4nfv/tasks/main.yml | 1 - plugins/stor4nfv/roles/stor4nfv/tasks/nbp.yml | 27 ---------------------- plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml | 4 ++-- .../stor4nfv/roles/stor4nfv/templates/nbp.hosts.j2 | 4 ---- .../roles/stor4nfv/templates/opensds-nbp.hosts.j2 | 14 +++++++++++ .../roles/stor4nfv/templates/opensds.hosts.j2 | 9 -------- 7 files changed, 26 insertions(+), 45 deletions(-) delete mode 100644 plugins/stor4nfv/roles/stor4nfv/tasks/nbp.yml delete mode 100644 plugins/stor4nfv/roles/stor4nfv/templates/nbp.hosts.j2 create mode 100644 plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2 delete mode 100644 plugins/stor4nfv/roles/stor4nfv/templates/opensds.hosts.j2 diff --git a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh index 878f1542..a4fe44ea 100644 --- a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh +++ b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh @@ -10,12 +10,18 @@ cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible +sed -i 's/^opensds_release.*/opensds_release: v0.1.5/g' group_vars/common.yml + +sed -i 's/^nbp_release.*/nbp_release: v0.1.0/g' group_vars/common.yml + +sed -i 's/^container_enabled.*/container_enabled: false/g' group_vars/common.yml + +sed -i 's/^nbp_plugin_type.*/nbp_plugin_type: csi/g' group_vars/common.yml + sed -i 's/^workplace.*/workplace: \/root/g' group_vars/common.yml sed -i 's/^enabled_backend.*/enabled_backend: ceph/g' group_vars/osdsdock.yml -sed -i 's/^ceph_pool_name.*/ceph_pool_name: "rbd"/g' group_vars/osdsdock.yml - sed -i 's/^ceph_origin.*/ceph_origin: repository/g' group_vars/ceph/all.yml sed -i 's/^ceph_repository.*/ceph_repository: community/g' group_vars/ceph/all.yml @@ -34,6 +40,8 @@ sed -i 's/^osd_scenario.*/osd_scenario: collocated/g' group_vars/ceph/osds.yml sed -i 's/^db_endpoint.*/db_endpoint: localhost:62379,localhost:62380/g' group_vars/osdsdb.yml +sed -i 's/^etcd_host.*/etcd_host: 127.0.0.1/g' group_vars/osdsdb.yml + sed -i 's/^etcd_port.*/etcd_port: 62379/g' group_vars/osdsdb.yml sed -i 's/^etcd_peer_port.*/etcd_peer_port: 62380/g' group_vars/osdsdb.yml diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml index 89d13f41..353282f9 100644 --- a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml +++ b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml @@ -8,7 +8,6 @@ # ############################################################################# --- - include: opensds.yml -- include: nbp.yml when: - ansible_distribution == 'Ubuntu' - stor4nfv is defined and stor4nfv == "Enable" diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/nbp.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/nbp.yml deleted file mode 100644 index 5361f5cd..00000000 --- a/plugins/stor4nfv/roles/stor4nfv/tasks/nbp.yml +++ /dev/null @@ -1,27 +0,0 @@ -# ############################################################################# -# Copyright (c) 2018 Intel Corp. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -# ############################################################################# ---- - -- name: render nbp inventory - remote_user: root - template: - src: nbp.hosts.j2 - dest: $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/nbp-ansible/nbp.hosts - -- name: set nbp to csi - remote_user: root - shell: | - cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/nbp-ansible; - sed -i 's/^nbp_plugin_type.*/nbp_plugin_type: csi/g' group_vars/common.yml - -- name: run playbook - remote_user: root - shell: | - cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/nbp-ansible; - ansible-playbook site.yml -i nbp.hosts | tee /var/log/stor4nfv-nbp.log diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml index afd65bc7..7866e808 100644 --- a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml +++ b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml @@ -57,10 +57,10 @@ src: ceph.hosts.j2 dest: $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible/group_vars/ceph/ceph.hosts -- name: render opensds inventory +- name: render opensds, nbp inventory remote_user: root template: - src: opensds.hosts.j2 + src: opensds-nbp.hosts.j2 dest: $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible/local.hosts - name: force to run the second etcd cluster diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/nbp.hosts.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/nbp.hosts.j2 deleted file mode 100644 index 0e8fa4c9..00000000 --- a/plugins/stor4nfv/roles/stor4nfv/templates/nbp.hosts.j2 +++ /dev/null @@ -1,4 +0,0 @@ -[worker-nodes] -{% for worker in hostvars[inventory_hostname]['groups']['storage_master'] %} -{{ worker }} ansible_ssh_host={{ hostvars[worker]['ansible_ssh_host'] }} -{% endfor %} diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2 new file mode 100644 index 00000000..c93f2b77 --- /dev/null +++ b/plugins/stor4nfv/roles/stor4nfv/templates/opensds-nbp.hosts.j2 @@ -0,0 +1,14 @@ +[controllers] +{% for controller in hostvars[inventory_hostname]['groups']['storage_master'] %} +{{ controller }} ansible_ssh_host={{ hostvars[controller]['ansible_ssh_host'] }} +{% endfor %} + +[docks] +{% for dock in hostvars[inventory_hostname]['groups']['storage_master'] %} +{{ dock }} ansible_ssh_host={{ hostvars[dock]['ansible_ssh_host'] }} +{% endfor %} + +[worker-nodes] +{% for worker in hostvars[inventory_hostname]['groups']['storage_master'] %} +{{ worker }} ansible_ssh_host={{ hostvars[worker]['ansible_ssh_host'] }} +{% endfor %} diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/opensds.hosts.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/opensds.hosts.j2 deleted file mode 100644 index 97068b90..00000000 --- a/plugins/stor4nfv/roles/stor4nfv/templates/opensds.hosts.j2 +++ /dev/null @@ -1,9 +0,0 @@ -[controllers] -{% for controller in hostvars[inventory_hostname]['groups']['storage_master'] %} -{{ controller }} ansible_ssh_host={{ hostvars[controller]['ansible_ssh_host'] }} -{% endfor %} - -[docks] -{% for dock in hostvars[inventory_hostname]['groups']['storage_master'] %} -{{ dock }} ansible_ssh_host={{ hostvars[dock]['ansible_ssh_host'] }} -{% endfor %} -- cgit 1.2.3-korg