aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml6
-rwxr-xr-xdeploy/adapters/ansible/roles/config-osa/tasks/main.yml1
-rw-r--r--deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/setup-openvswitch/templates/controller.j22
-rw-r--r--deploy/conf/hardware_environment/huawei-pod1/os-nosdn-stor4nfv-ha.yml74
-rw-r--r--deploy/conf/hardware_environment/huawei-pod2/os-nosdn-stor4nfv-ha.yml79
-rw-r--r--deploy/conf/vm_environment/os-nosdn-stor4nfv-ha.yml45
-rw-r--r--deploy/conf/vm_environment/os-nosdn-stor4nfv-noha.yml28
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml6
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml6
-rw-r--r--plugins/stor4nfv/plugin.desc4
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh18
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh25
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml13
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml72
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml78
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml12
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh14
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/main.yml3
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml8
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml16
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml12
22 files changed, 484 insertions, 40 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index c14f958e..1d4ec9ef 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -120,3 +120,9 @@
remote_user: root
roles:
- moon
+
+- hosts:
+ - ceph_adm
+ remote_user: root
+ roles:
+ - os-stor4nfv
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
index be7fbbcb..6bb60f92 100755
--- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
@@ -385,6 +385,7 @@
when:
- checkresult.rc == 0
- offline_deployment is defined and offline_deployment == "Disable"
+ ignore_errors: "true"
- name: add cache refresh
blockinfile:
diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml b/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml
index d5a04e78..684d05cb 100644
--- a/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml
+++ b/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml
@@ -2,7 +2,7 @@
- name: install networking-sfc
pip:
- name: networking-sfc
+ name: networking-sfc==6.0.0.0rc1
virtualenv: /openstack/venvs/neutron-{{ os_ver }}
when:
- inventory_hostname in groups['neutron_server']
diff --git a/deploy/adapters/ansible/roles/setup-openvswitch/templates/controller.j2 b/deploy/adapters/ansible/roles/setup-openvswitch/templates/controller.j2
index f7b9756b..315e9fb9 100755
--- a/deploy/adapters/ansible/roles/setup-openvswitch/templates/controller.j2
+++ b/deploy/adapters/ansible/roles/setup-openvswitch/templates/controller.j2
@@ -26,7 +26,7 @@ iface {{ intf_external }} inet manual
{% set intf_tenant = intf_tenant + '.' + contr_sys_mappings["tenant"]["vlan_tag"]|string %}
{% endif %}
auto {{ intf_tenant }}
-iface {{ intf_tenant }} inet static
+iface {{ intf_tenant }} inet manual
{% if contr_sys_mappings["tenant"]["vlan_tag"] | int %}
vlan-raw-device {{ intf_tenant }}
{% endif %}
diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-stor4nfv-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-stor4nfv-ha.yml
new file mode 100644
index 00000000..5045975f
--- /dev/null
+++ b/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-stor4nfv-ha.yml
@@ -0,0 +1,74 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# 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
+##############################################################################
+
+---
+TYPE: baremetal
+FLAVOR: cluster
+POWER_TOOL: ipmitool
+
+ipmiUser: root
+ipmiVer: '2.0'
+
+plugins:
+ - stor4nfv: "Enable"
+
+hosts:
+ - name: host1
+ mac: 'F8:4A:BF:55:A2:8D'
+ interfaces:
+ - eth1: 'F8:4A:BF:55:A2:8E'
+ ipmiIp: 172.16.130.26
+ ipmiPass: Opnfv@pod1
+ roles:
+ - controller
+ - ha
+ - ceph-adm
+ - ceph-mon
+
+ - name: host2
+ mac: 'D8:49:0B:DA:5A:B7'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5A:B8'
+ ipmiIp: 172.16.130.27
+ ipmiPass: Opnfv@pod1
+ roles:
+ - controller
+ - ha
+ - ceph-mon
+
+ - name: host3
+ mac: '78:D7:52:A0:B1:99'
+ interfaces:
+ - eth1: '78:D7:52:A0:B1:9A'
+ ipmiIp: 172.16.130.29
+ ipmiPass: Opnfv@pod1
+ roles:
+ - controller
+ - ha
+ - ceph-mon
+
+ - name: host4
+ mac: 'D8:49:0B:DA:5B:5D'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:5B:5E'
+ ipmiIp: 172.16.130.30
+ ipmiPass: Opnfv@pod1
+ roles:
+ - compute
+ - ceph-osd
+
+ - name: host5
+ mac: 'D8:49:0B:DA:56:85'
+ interfaces:
+ - eth1: 'D8:49:0B:DA:56:86'
+ ipmiIp: 172.16.130.31
+ ipmiPass: Opnfv@pod1
+ roles:
+ - compute
+ - ceph-osd
diff --git a/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-stor4nfv-ha.yml b/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-stor4nfv-ha.yml
new file mode 100644
index 00000000..f60c08e5
--- /dev/null
+++ b/deploy/conf/hardware_environment/huawei-pod2/os-nosdn-stor4nfv-ha.yml
@@ -0,0 +1,79 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# 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
+##############################################################################
+
+---
+
+TYPE: baremetal
+FLAVOR: cluster
+POWER_TOOL: ipmitool
+
+ipmiVer: '2.0'
+
+plugins:
+ - stor4nfv: "Enable"
+
+hosts:
+ - name: host1
+ mac: 'EC:38:8F:79:0C:2C'
+ ipmiUser: root
+ ipmiPass: Opnfv@pod2
+ ipmiIp: 172.16.130.20
+ interfaces:
+ - eth1: 'EC:38:8F:79:0C:2D'
+ roles:
+ - controller
+ - ha
+ - ceph-adm
+ - ceph-mon
+
+ - name: host2
+ mac: 'EC:38:8F:79:0C:48'
+ ipmiIp: 172.16.130.19
+ ipmiUser: root
+ ipmiPass: Opnfv@pod2
+ interfaces:
+ - eth1: 'EC:38:8F:79:0C:49'
+ roles:
+ - controller
+ - ha
+ - ceph-mon
+
+ - name: host3
+ mac: 'EC:38:8F:79:10:CC'
+ ipmiIp: 172.16.130.18
+ ipmiUser: root
+ ipmiPass: Opnfv@pod2
+ interfaces:
+ - eth1: 'EC:38:8F:79:10:CD'
+ roles:
+ - controller
+ - ha
+ - ceph-mon
+
+ - name: host4
+ mac: 'EC:38:8F:79:0C:6C'
+ ipmiIp: 172.16.130.17
+ ipmiUser: root
+ ipmiPass: Opnfv@pod2
+ interfaces:
+ - eth1: 'EC:38:8F:79:0C:6D'
+ roles:
+ - compute
+ - ceph-osd
+
+ - name: host5
+ mac: 'EC:38:8F:7A:E6:ED'
+ ipmiIp: 172.16.130.16
+ ipmiUser: root
+ ipmiPass: Opnfv@pod2
+ interfaces:
+ - eth1: 'EC:38:8F:7A:E6:EE'
+ roles:
+ - compute
+ - ceph-osd
diff --git a/deploy/conf/vm_environment/os-nosdn-stor4nfv-ha.yml b/deploy/conf/vm_environment/os-nosdn-stor4nfv-ha.yml
new file mode 100644
index 00000000..1ef4bdd9
--- /dev/null
+++ b/deploy/conf/vm_environment/os-nosdn-stor4nfv-ha.yml
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# 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
+##############################################################################
+
+---
+TYPE: virtual
+FLAVOR: cluster
+
+plugins:
+ - stor4nfv: "Enable"
+
+hosts:
+ - name: host1
+ roles:
+ - controller
+ - ha
+ - ceph-adm
+ - ceph-mon
+
+ - name: host2
+ roles:
+ - controller
+ - ha
+ - ceph-mon
+
+ - name: host3
+ roles:
+ - controller
+ - ha
+ - ceph-mon
+
+ - name: host4
+ roles:
+ - compute
+ - ceph-osd
+
+ - name: host5
+ roles:
+ - compute
+ - ceph-osd
diff --git a/deploy/conf/vm_environment/os-nosdn-stor4nfv-noha.yml b/deploy/conf/vm_environment/os-nosdn-stor4nfv-noha.yml
new file mode 100644
index 00000000..e03a4d4d
--- /dev/null
+++ b/deploy/conf/vm_environment/os-nosdn-stor4nfv-noha.yml
@@ -0,0 +1,28 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# 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
+##############################################################################
+
+---
+TYPE: virtual
+FLAVOR: cluster
+
+plugins:
+ - stor4nfv: "Enable"
+
+hosts:
+ - name: host1
+ roles:
+ - controller
+ - ha
+ - ceph-adm
+ - ceph-mon
+
+ - name: host2
+ roles:
+ - compute
+ - ceph-osd
diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml
index 91ca514c..ecc67d29 100755
--- a/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml
+++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-agents-1.yml
@@ -10,12 +10,6 @@
name: networking-odl
virtualenv: /openstack/venvs/neutron-{{ os_ver }}
-- name: install neutron-lib
- pip:
- name: neutron-lib
- version: 1.14.0
- virtualenv: /openstack/venvs/neutron-{{ os_ver }}
-
- name: configure vsctl for dhcp agent
shell: |
crudini --set /etc/neutron/dhcp_agent.ini OVS \
diff --git a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml
index 7f80a36b..060abfc6 100755
--- a/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml
+++ b/plugins/odl_cluster/roles/setup-odl/tasks/control-servers-1.yml
@@ -10,11 +10,5 @@
name: networking-odl
virtualenv: /openstack/venvs/neutron-{{ os_ver }}
-- name: install neutron-lib
- pip:
- name: neutron-lib
- version: 1.14.0
- virtualenv: /openstack/venvs/neutron-{{ os_ver }}
-
- name: turn off neutron-server on control node
service: name=neutron-server state=stopped
diff --git a/plugins/stor4nfv/plugin.desc b/plugins/stor4nfv/plugin.desc
index ae589a60..e0a1e690 100644
--- a/plugins/stor4nfv/plugin.desc
+++ b/plugins/stor4nfv/plugin.desc
@@ -43,3 +43,7 @@ plugin:
phrase: post_k8s
inventory:
- localhost
+ - role: os-stor4nfv
+ phrase: post_openstack
+ inventory:
+ - localhost
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh
new file mode 100644
index 00000000..d921d4e2
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# #############################################################################
+# 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
+# #############################################################################
+
+add-apt-repository ppa:ansible/ansible-2.4
+
+apt-get update
+apt-get install -y ansible
+sleep 5
+
+ansible --version
+
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
new file mode 100644
index 00000000..7d497598
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# #############################################################################
+# 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
+# #############################################################################
+
+cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible
+
+sed -i '/- osdsdock/s/^/#/g' site.yml
+
+sed -i '/- dashboard-installer/s/^/#/g' site.yml
+
+sed -i '/- nbp-installer/s/^/#/g' site.yml
+
+sed -i '/check_ansible_version/a \ ignore_errors: yes\' roles/common/tasks/main.yml
+
+# auth
+sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml
+
+# opensds_endpoint
+sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml
new file mode 100644
index 00000000..dbaa8d6b
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml
@@ -0,0 +1,13 @@
+# #############################################################################
+# 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
+# #############################################################################
+---
+- include: stor4nfv.yml
+ when:
+ - ansible_distribution == 'Ubuntu'
+ - stor4nfv is defined and stor4nfv == "Enable"
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
new file mode 100644
index 00000000..2d0f05cc
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
@@ -0,0 +1,72 @@
+# #############################################################################
+# 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: install prerequisites package
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - git
+ - gawk
+ - curl
+ - wget
+ - software-properties-common
+
+- name: copy install_ansible script
+ remote_user: root
+ copy:
+ src: install_ansible.sh
+ dest: /opt/install_ansible.sh
+ mode: 0777
+
+- name: install ansible
+ command: su -s /bin/sh -c "/opt/install_ansible.sh"
+ ignore_errors: "true"
+
+- name: disable cinder
+ remote_user: root
+ shell: |
+ lxc-stop -n $(lxc-ls --line | grep cinder_api)
+ lxc-stop -n $(lxc-ls --line | grep cinder_scheduler)
+ ignore_errors: "true"
+
+- name: modify haproxy.cfg and restart haproxy
+ remote_user: root
+ shell: |
+ sed -i \
+ '/frontend cinder_api-front/,/host1_cinder_api_container/ s/^/#/' /etc/haproxy/haproxy.cfg
+ systemctl restart haproxy
+ ignore_errors: "true"
+
+- name: fetch stor4nfv source code
+ remote_user: root
+ shell: |
+ mkdir -p $HOME/gopath/src/github.com/os-stor4nfv && cd $HOME/gopath/src/github.com/os-stor4nfv;
+ rm -rf stor4nfv;
+ git clone https://gerrit.opnfv.org/gerrit/stor4nfv.git
+
+- name: copy os_configure_vars script
+ remote_user: root
+ copy:
+ src: os_configure_vars.sh
+ dest: /opt/os_configure_vars.sh
+ mode: 0777
+
+- name: configure variables for opensds
+ remote_user: root
+ shell: |
+ cd /opt;
+ ./os_configure_vars.sh {{ public_vip.ip }}
+
+- name: run playbook
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible;
+ ansible-playbook site.yml -i local.hosts | tee /var/log/os-stor4nfv.log
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
new file mode 100644
index 00000000..c549566a
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
@@ -0,0 +1,78 @@
+# #############################################################################
+# 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: ensure opensds.conf exists
+ stat:
+ path: /etc/opensds/opensds.conf
+ ignore_errors: "true"
+ register: opensds_exists
+
+- name: configure ceph.yaml, opensds.conf
+ remote_user: root
+ shell: |
+ cd /root/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible
+ cp group_vars/ceph/ceph.yaml /etc/opensds/driver/
+
+ sed -i 's/^ enabled_backends.*/ enabled_backends: ceph/g' /etc/opensds/opensds.conf
+
+ sudo cat >> /etc/opensds/opensds.conf << OPENSDS_GLOABL_CONFIG_DOC
+
+ [ceph]
+ name = ceph
+ description = Ceph Test
+ driver_name = ceph
+ config_path = /etc/opensds/driver/ceph.yaml
+ OPENSDS_GLOABL_CONFIG_DOC
+ when:
+ - opensds_exists.stat.exists
+
+- name: copy ceph.conf from ceph-mon container
+ remote_user: root
+ shell: |
+ mkdir -p /etc/ceph
+ cp /proc/$(lxc-info -n $(lxc-ls --line | grep ceph-mon) -p -H)/root/etc/ceph/ceph.conf \
+ /etc/ceph/ceph.conf
+ when:
+ - opensds_exists.stat.exists
+
+- name: ensure osdsdock exists
+ stat:
+ path: /opt/opensds-hotpot-linux-amd64/bin/osdsdock
+ ignore_errors: "true"
+ register: osdsdock_exists
+
+- name: start osdsdock daemon
+ remote_user: root
+ shell: |
+ /opt/opensds-hotpot-linux-amd64/bin/osdsdock -daemon
+ ignore_errors: "true"
+ when:
+ - osdsdock_exists.stat.exists
+
+- name: ensure osdsctl exists
+ stat:
+ path: /opt/opensds-hotpot-linux-amd64/bin/osdsctl
+ ignore_errors: "true"
+ register: osdsctl_exists
+
+- name: run cinder-compatible-api, create opensds default profile
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible;
+ export OPENSDS_ENDPOINT=http://{{ public_vip.ip }}:50040;
+ export CINDER_ENDPOINT=http://{{ internal_vip.ip }}:8776/v3;
+ chmod +x ../bin/cindercompatibleapi;
+ ( ( nohup ../bin/cindercompatibleapi > /var/log/cindercompatibleapi.log 2>&1 ) & );
+ cp /opt/opensds-hotpot-linux-amd64/bin/osdsctl /usr/local/bin;
+ export OPENSDS_AUTH_STRATEGY=noauth;
+ osdsctl profile create '{"name": "default", "description": "default policy"}'
+ ignore_errors: "true"
+ when:
+ - osdsctl_exists.stat.exists
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
new file mode 100644
index 00000000..57bae793
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
@@ -0,0 +1,12 @@
+# #############################################################################
+# 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
+# #############################################################################
+---
+- include: opensds.yml
+
+- include: post-install.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
index a4fe44ea..112d9c84 100644
--- a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
+++ b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
@@ -10,10 +10,6 @@
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
@@ -34,7 +30,9 @@ sed -i 's|^cluster_network.*|cluster_network: '"$2"'|g' group_vars/ceph/all.yml
sed -i 's/^monitor_interface.*/monitor_interface: eth0/g' group_vars/ceph/all.yml
-sed -i 's/^devices:.*/devices: [\/dev\/loop0, \/dev\/loop1, \/dev\/loop2]/g' group_vars/ceph/osds.yml
+sed -i 's/^devices:.*/devices: [\/dev\/loop0, \/dev\/loop1, \/dev\/loop2]/g' group_vars/ceph/all.yml
+
+sed -i '/dev\/sda/s/^/#/g' group_vars/ceph/all.yml
sed -i 's/^osd_scenario.*/osd_scenario: collocated/g' group_vars/ceph/osds.yml
@@ -45,3 +43,9 @@ 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
+
+sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml
+
+sed -i '/check_ansible_version/a \ ignore_errors: yes\' roles/common/tasks/main.yml
+
+sed -i '/- dashboard-installer/s/^/#/g' site.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
index 060c9cf1..7bc8ec06 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
@@ -7,8 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
# #############################################################################
---
-- include: opensds.yml
-- include: post-install.yml
+- include: stor4nfv
when:
- ansible_distribution == 'Ubuntu'
- stor4nfv is defined and stor4nfv == "Enable"
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
index 3252fefb..e84ce0aa 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
@@ -15,6 +15,7 @@
with_items:
- make
- gcc
+ - gawk
- name: copy install_ansible script
remote_user: root
@@ -26,13 +27,6 @@
- name: install ansible
command: su -s /bin/sh -c "/opt/install_ansible.sh"
-- name: install ceph-ansible code
- remote_user: root
- shell: |
- cd /opt;
- git clone https://github.com/ceph/ceph-ansible.git;
- [ -f ceph-ansible/requirements.txt ] && pip install -r ceph-ansible/requirements.txt
-
- name: fetch stor4nfv source code
remote_user: root
shell: |
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
index 182c0a68..017f377e 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
@@ -31,6 +31,7 @@
become: true
args:
chdir: /opt/ceph-ansible
+ ignore_errors: "true"
when:
- ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
@@ -43,26 +44,17 @@
- name: ensure osdsctl exists
stat:
- path: /opt/opensds-v0.1.5-linux-{{ imgarch }}/bin/osdsctl
+ path: /opt/opensds-hotpot-linux-{{ imgarch }}/bin/osdsctl
ignore_errors: "true"
register: osdsctl_exists
-- name: ensure opensds csi directory exists
- stat:
- path: /opt/opensds-k8s-v0.1.0-linux-{{ imgarch }}
- ignore_errors: "true"
- register: csi_dir_exists
-
-- name: create opensds default profile, csi pods
+- name: create opensds default profile
remote_user: root
shell: |
- cp /opt/opensds-v0.1.5-linux-{{ imgarch }}/bin/osdsctl /usr/local/bin;
+ 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"}'
- cd /opt/opensds-k8s-v0.1.0-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
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml
new file mode 100644
index 00000000..57bae793
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml
@@ -0,0 +1,12 @@
+# #############################################################################
+# 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
+# #############################################################################
+---
+- include: opensds.yml
+
+- include: post-install.yml