summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md8
-rwxr-xr-xbuild.sh2
-rw-r--r--build/build.yaml12
-rw-r--r--build/parser.py35
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh9
-rwxr-xr-xdeploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py9
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml13
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml1
-rw-r--r--deploy/adapters/ansible/openstack_pike/README.md9
-rw-r--r--deploy/adapters/ansible/openstack_queens/README.md9
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh9
-rw-r--r--deploy/adapters/cobbler/snippets/kickstart_client.rb9
-rw-r--r--deploy/adapters/cobbler/snippets/kickstart_knife.rb9
-rw-r--r--deploy/adapters/cobbler/snippets/preseed_knife.rb9
-rw-r--r--deploy/ansible_plugins/lookup/yamlfile.py9
-rw-r--r--deploy/bonding.py9
-rw-r--r--docs/release/installation/configure-network.rst3
-rw-r--r--docs/release/installation/featureTable.rst3
-rw-r--r--docs/release/installation/k8s-deploy-arm.rst44
-rw-r--r--docs/release/installation/offline-deploy.rst2
-rwxr-xr-xplugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh9
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh9
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh3
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml2
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml88
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh9
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/main.yml2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml13
-rwxr-xr-xquickstart.sh7
-rwxr-xr-xquickstart_k8s.sh9
-rwxr-xr-xutil/docker-compose/roles/compass/files/prepare_ansible.sh9
-rwxr-xr-xutil/docker-compose/roles/compass/files/up_containers.sh9
33 files changed, 329 insertions, 55 deletions
diff --git a/README.md b/README.md
index 77a3005b..ce08bebd 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,11 @@
+##############################################################################
+# 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
+##############################################################################
# Compass4nfv Build Guide
diff --git a/build.sh b/build.sh
index a6276621..d7118432 100755
--- a/build.sh
+++ b/build.sh
@@ -22,7 +22,7 @@ echo $COMPASS_PATH
REDHAT_REL=${REDHAT_REL:-"false"}
-PACKAGES="curl python-pip"
+PACKAGES="curl python-pip aria2"
mkdir -p $WORK_DIR $CACHE_DIR
diff --git a/build/build.yaml b/build/build.yaml
index 50602dbe..ef42ba9c 100644
--- a/build/build.yaml
+++ b/build/build.yaml
@@ -3,17 +3,23 @@ packages:
- name: CentOS-7-x86_64-Minimal-1708.iso
description: "Centos ISO of each host for provisioning"
get_method: cached
- url: http://artifacts.opnfv.org/compass4nfv/package/master/CentOS-7-x86_64-Minimal-1708.iso
+ url:
+ - http://192.168.137.222/download/CentOS-7-x86_64-Minimal-1708.iso
+ - http://artifacts.opnfv.org/compass4nfv/package/master/CentOS-7-x86_64-Minimal-1708.iso
- name: ubuntu-16.04.3-server-amd64.iso
description: "Ubuntu ISO of each host for provisioning"
get_method: cached
- url: http://artifacts.opnfv.org/compass4nfv/package/master/ubuntu-16.04.3-server-amd64.iso
+ url:
+ - http://192.168.137.222/download/ubuntu-16.04.3-server-amd64.iso
+ - http://artifacts.opnfv.org/compass4nfv/package/master/ubuntu-16.04.3-server-amd64.iso
- name: harbor-offline-installer-v1.5.0.tgz
description: "The package of harbor v1.5.5"
get_method: cached
- url: http://artifacts.opnfv.org/compass4nfv/package/master/harbor-offline-installer-v1.5.0.tgz
+ url:
+ - http://192.168.137.222/download/harbor-offline-installer-v1.5.0.tgz
+ - http://artifacts.opnfv.org/compass4nfv/package/master/harbor-offline-installer-v1.5.0.tgz
- name: compass-deck
description: "RESTful API and DB Handlers for Compass"
diff --git a/build/parser.py b/build/parser.py
index b80709cb..b0a87f93 100644
--- a/build/parser.py
+++ b/build/parser.py
@@ -20,28 +20,33 @@ def load_env():
def get_from_cache(cache, package):
filename = package.get("name")
- remotefile = package.get("url")
+ remotefile = list(package.get("url"))
localfile = cache + "/" + filename
localmd5file = localfile + ".md5"
- remotemd5file = remotefile + ".md5"
print "removing local md5 file...."
cmd = "rm -f " + localmd5file
os.system(cmd)
print "downloading remote md5 file to local...."
- cmd = "curl --connect-timeout 10 -o " + localmd5file + " " + remotemd5file
- os.system(cmd)
- if os.path.exists(localmd5file):
- print "calculate md5sum of local file"
- cmd = "md5sum " + localfile + "|cut -d ' ' -f 1"
- localmd5sum = os.popen(cmd).readlines()
- cmd = "cat " + localmd5file + "|cut -d ' ' -f 1"
- remotemd5sum = os.popen(cmd).readlines()
- print "md5 local %s remote %s" % (localmd5sum, remotemd5sum)
- if (remotemd5sum == localmd5sum):
- print "Same with remote, no need to download...."
- return
+ for file in remotefile:
+ remotemd5file = file + ".md5"
+ cmd = "curl --connect-timeout 10 -o {0} {1}".format(
+ localmd5file, remotemd5file)
+ rc = os.system(cmd)
+ if os.path.exists(localfile):
+ print "calculate md5sum of local file"
+ cmd = "md5sum " + localfile + "|cut -d ' ' -f 1"
+ localmd5sum = os.popen(cmd).readlines()
+ cmd = "cat " + localmd5file + "|cut -d ' ' -f 1"
+ remotemd5sum = os.popen(cmd).readlines()
+ print "md5 local %s remote %s" % (localmd5sum, remotemd5sum)
+ if (remotemd5sum == localmd5sum):
+ print "Same with remote, no need to download...."
+ return
+ if rc == 0:
+ break
print "downloading remote file to local...."
- cmd = "curl --connect-timeout 10 -o " + localfile + " " + remotefile
+ cmd = "aria2c --max-connection-per-server=4 --allow-overwrite=true --dir={0} \
+ --out={1} {2}".format(cache, filename, " ".join(remotefile))
print cmd
rc = os.system(cmd)
if rc != 0:
diff --git a/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh b/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh
index 62e79b3b..db44246a 100644
--- a/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh
+++ b/deploy/adapters/ansible/kubernetes/roles/ha/files/chk_k8s_master.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2016-2018 compass4nfv 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
+##############################################################################
+
#!/bin/bash
count=`ss -tnl | grep 6443 | wc -l`
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py b/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py
index 2ffb4cae..8f836011 100755
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/generate_inventories.py
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2016-2018 compass4nfv 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
+##############################################################################
+
import yaml
import sys
import os
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
index 0e253129..338f2574 100644
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
@@ -282,3 +282,16 @@ kube-controller-manager.manifest.j2",
-e "@extra-vars.yml" -b -v 2>&1 | tee kargo.log
tags:
- ansible
+
+- name: read the ansible log file
+ shell: "cat /opt/kargo_k8s/kargo.log | tail -n 1000"
+ register: setup_kargo_result
+
+- fail:
+ msg: "some task failed when setup kargo."
+ when: setup_kargo_result.stdout.find('failed=1') != -1
+
+- fail:
+ msg: "some host are unreachable."
+ when: setup_kargo_result.stdout.find('unreachable=1') != -1
+ run_once: true
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index 1d4ec9ef..874fcfb5 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -123,6 +123,7 @@
- hosts:
- ceph_adm
+ - ceph-mon
remote_user: root
roles:
- os-stor4nfv
diff --git a/deploy/adapters/ansible/openstack_pike/README.md b/deploy/adapters/ansible/openstack_pike/README.md
index 7682d325..8a5b5765 100644
--- a/deploy/adapters/ansible/openstack_pike/README.md
+++ b/deploy/adapters/ansible/openstack_pike/README.md
@@ -1 +1,10 @@
+##############################################################################
+# 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
+##############################################################################
+
# keep for openstack pike
diff --git a/deploy/adapters/ansible/openstack_queens/README.md b/deploy/adapters/ansible/openstack_queens/README.md
index d6945e07..bea43534 100644
--- a/deploy/adapters/ansible/openstack_queens/README.md
+++ b/deploy/adapters/ansible/openstack_queens/README.md
@@ -1 +1,10 @@
+##############################################################################
+# 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
+##############################################################################
+
# keep for openstack queens
diff --git a/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh b/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh
index fb197555..3fcab155 100644
--- a/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh
+++ b/deploy/adapters/ansible/roles/config-osa/files/op-venv-script.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
#!/usr/local/env bash
set -ev
diff --git a/deploy/adapters/cobbler/snippets/kickstart_client.rb b/deploy/adapters/cobbler/snippets/kickstart_client.rb
index 568ba46a..a890272a 100644
--- a/deploy/adapters/cobbler/snippets/kickstart_client.rb
+++ b/deploy/adapters/cobbler/snippets/kickstart_client.rb
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
mkdir -p /etc/chef
cat << EOL > /etc/chef/client.rb
log_level :info
diff --git a/deploy/adapters/cobbler/snippets/kickstart_knife.rb b/deploy/adapters/cobbler/snippets/kickstart_knife.rb
index e4ab081b..aca3d5c0 100644
--- a/deploy/adapters/cobbler/snippets/kickstart_knife.rb
+++ b/deploy/adapters/cobbler/snippets/kickstart_knife.rb
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
mkdir -p /root/.chef
cat << EOL > /root/.chef/knife.rb
log_level :info
diff --git a/deploy/adapters/cobbler/snippets/preseed_knife.rb b/deploy/adapters/cobbler/snippets/preseed_knife.rb
index 32047bbc..fa9a808d 100644
--- a/deploy/adapters/cobbler/snippets/preseed_knife.rb
+++ b/deploy/adapters/cobbler/snippets/preseed_knife.rb
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
mkdir -p /root/.chef
cat << EOL > /root/.chef/knife.rb
log_level :info
diff --git a/deploy/ansible_plugins/lookup/yamlfile.py b/deploy/ansible_plugins/lookup/yamlfile.py
index c915adc7..489dccce 100644
--- a/deploy/ansible_plugins/lookup/yamlfile.py
+++ b/deploy/ansible_plugins/lookup/yamlfile.py
@@ -1,4 +1,13 @@
#!/bin/venv python
+##############################################################################
+# Copyright (c) 2018 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
+##############################################################################
+
import yaml
import sys
diff --git a/deploy/bonding.py b/deploy/bonding.py
index 17b5b205..9116c53b 100644
--- a/deploy/bonding.py
+++ b/deploy/bonding.py
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
import os
import sys
import yaml
diff --git a/docs/release/installation/configure-network.rst b/docs/release/installation/configure-network.rst
index 2303be45..25dfb76d 100644
--- a/docs/release/installation/configure-network.rst
+++ b/docs/release/installation/configure-network.rst
@@ -1,3 +1,6 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International Licence.
+.. http://creativecommons.org/licenses/by/4.0
+
Configure network
=================
network_cfg.yaml file describes networks configuration for openstack on hosts. It
diff --git a/docs/release/installation/featureTable.rst b/docs/release/installation/featureTable.rst
index 1239aa4d..c810a072 100644
--- a/docs/release/installation/featureTable.rst
+++ b/docs/release/installation/featureTable.rst
@@ -1,3 +1,6 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International Licence.
+.. http://creativecommons.org/licenses/by/4.0
+
Features
========
diff --git a/docs/release/installation/k8s-deploy-arm.rst b/docs/release/installation/k8s-deploy-arm.rst
index b5b54c20..8c809bf6 100644
--- a/docs/release/installation/k8s-deploy-arm.rst
+++ b/docs/release/installation/k8s-deploy-arm.rst
@@ -5,19 +5,15 @@
Validated platform
==================
-================ ========= ================ ========
- Jump server Node
---------------------------- --------------------------
-distro libvirt distro k8s
-================ ========= ================ ========
-ubuntu 16.04.3 1.3.1 centos7 1708 1.7.5
-================ ========= ================ ========
+Jump server: Baremetal, Ubuntu 16.04
+
+Node: VM / Baremetal, CentOS 7 / Ubuntu 16.04, K8s 1.9.1
Prepare jump server
===================
-This document assumes you are using a baremetal Arm server as Compass4NFV jump server. It's possible to deploy jump server inside a virtual machine, this case is not covered here.
+A baremetal Arm server is required as Compass4NFV jump server.
-#. Install Ubuntu 16.04.3 aarch64 on jump server.
+#. Install Ubuntu 16.04 aarch64 on jump server.
#. Install required packages.
@@ -65,14 +61,14 @@ Clone Compass4NFV code. Run below command to build deployment tarball for Arm.
.. code-block:: bash
- $ COMPASS_ISO_REPO='http://people.linaro.org/~yibo.cai/compass' ./build.sh
+ $ ./build.sh
It downloads and archives Ubuntu/CentOS installation ISO and Compass core docker images for later deployment.
-Deploy K8s in VM
-================
-This section introduces the steps to deploy K8s cluster in virtual machines running on jump server. Two VM nodes will be created, one master and one minion, with flannel networking.
+Deploy K8s
+==========
+This section introduces the steps to deploy K8s cluster in VM and baremetal nodes.
Clear old Compass core
----------------------
@@ -93,14 +89,28 @@ Run below command to remove running Compass containers for a clean deployment.
Deploy OS and K8s
-----------------
-To deploy OS and K8s on two virtual nodes, run:
+To deploy CentOS and K8s on two virtual nodes, run:
.. code-block:: bash
$ ADAPTER_OS_PATTERN='(?i)CentOS-7.*arm.*' \
OS_VERSION=centos7 \
- KUBERNETES_VERSION=v1.7.5 \
- DHA=${PWD}/deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml \
- NETWORK=${PWD}/deploy/conf/vm_environment/network.yml \
+ KUBERNETES_VERSION=v1.9.1 \
+ DHA=deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml \
+ NETWORK=deploy/conf/vm_environment/network.yml \
VIRT_NUMBER=2 VIRT_CPUS=4 VIRT_MEM=8192 VIRT_DISK=50G \
./deploy.sh
+
+To deploy on baremetal nodes, reference below DHA and NETWORK files:
+
+.. code-block:: bash
+
+ DHA="deploy/conf/hardware_environment/huawei-pod8/k8-nosdn-nofeature-noha.yml"
+ NETWORK="deploy/conf/hardware_environment/huawei-pod8/network.yml"
+
+To deploy Ubuntu, set:
+
+.. code-block:: bash
+
+ ADAPTER_OS_PATTERN='(?i)ubuntu-16.*arm.*'
+ OS_VERSION=xenial
diff --git a/docs/release/installation/offline-deploy.rst b/docs/release/installation/offline-deploy.rst
index d35d7e1b..a3a33a09 100644
--- a/docs/release/installation/offline-deploy.rst
+++ b/docs/release/installation/offline-deploy.rst
@@ -1,3 +1,5 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International Licence.
+.. http://creativecommons.org/licenses/by/4.0
.. two dots create a comment. please leave this logo at the top of each of your rst files.
Offline Deploy
diff --git a/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh b/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh
index 55639907..a99b1af5 100755
--- a/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh
+++ b/plugins/odl_cluster/roles/setup-odl/files/odl_pkg.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
#!/bin/bash
rm -rf /home/networking
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh b/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh
index d93da3fd..69f5cd63 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/files/odl_pkg.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
#!/bin/bash
rm -rf /home/networking
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
index 7d497598..a081c0bd 100644
--- a/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
@@ -23,3 +23,6 @@ sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/a
# opensds_endpoint
sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
+
+# etcd_host
+sed -i 's/^etcd_host.*/etcd_host: '"$2"'/g' group_vars/osdsdb.yml
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
index 2d0f05cc..fd9756a4 100644
--- a/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
@@ -63,7 +63,7 @@
remote_user: root
shell: |
cd /opt;
- ./os_configure_vars.sh {{ public_vip.ip }}
+ ./os_configure_vars.sh {{ public_vip.ip }} {{ internal_vip.ip }}
- name: run playbook
remote_user: root
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
index c549566a..d14c0c68 100644
--- a/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
@@ -11,17 +11,16 @@
- name: ensure opensds.conf exists
stat:
path: /etc/opensds/opensds.conf
- ignore_errors: "true"
register: opensds_exists
+ when:
+ - inventory_hostname in groups['ceph_adm']
- 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]
@@ -31,36 +30,96 @@
config_path = /etc/opensds/driver/ceph.yaml
OPENSDS_GLOABL_CONFIG_DOC
when:
- - opensds_exists.stat.exists
+ - inventory_hostname in groups['ceph_adm']
+
+- name: modify osdsdock endpoint
+ remote_user: root
+ shell:
+ _raw_params: |
+ function _modify_osdsdock_endpoint {
+ local ip_addr=(lxc-info -n $(lxc-ls --line | grep ceph-mon) -iH)|grep "10.1"
+ if [ ! -z "${ip_addr}" ]; then
+ sed -i 's/^50050.*/api_endpoint = $ip_addr:50050/g' /etc/opensds/opensds.conf
+ fi
+ }
+ _modify_osdsdock_endpoint
+ args:
+ executable: /bin/bash
+ become: true
+ when:
+ - inventory_hostname in groups['ceph_adm']
- name: copy ceph.conf from ceph-mon container
remote_user: root
shell: |
- mkdir -p /etc/ceph
+ 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
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy osdsdock executable to ceph-mon container
+ remote_user: root
+ shell: |
+ cd /opt;
+ tar -C opensds-hotpot-linux-amd64 -c . | lxc-attach -n \
+ $(lxc-ls --line | grep ceph-mon) -- /bin/sh -c "tar -C /opt/ -vx; chmod 1777 /opt;"
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy opensds conf files to ceph-mon container
+ remote_user: root
+ shell: |
+ cd /etc;
+ tar -C opensds -c . | lxc-attach -n \
+ $(lxc-ls --line | grep ceph-mon) -- /bin/sh -c "tar -C /tmp/ -vx; chmod 1777 /tmp;"
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: ensure opensds driver exists
+ stat:
+ path: /tmp/driver
+ register: opensds_driver_exists
+ when:
+ - inventory_hostname in groups['ceph-mon']
+
+- name: copy opensds conf
+ remote_user: root
+ shell: |
+ mkdir -p /etc/opensds;
+ cp /tmp/opensds.conf /etc/opensds;
+ cp /tmp/policy.json /etc/opensds;
+ cp -r /tmp/driver /etc/opensds;
+ when:
+ - inventory_hostname in groups['ceph-mon']
+
+- name: create ceph pool
+ remote_user: root
+ shell: |
+ ceph osd pool create rbd 24 && ceph osd pool set rbd size 1
+ when:
+ - inventory_hostname in groups['ceph-mon']
- name: ensure osdsdock exists
stat:
- path: /opt/opensds-hotpot-linux-amd64/bin/osdsdock
- ignore_errors: "true"
- register: osdsdock_exists
+ path: /opt/bin/osdsdock
+ register: opensds_exists
+ when:
+ - inventory_hostname in groups['ceph-mon']
- name: start osdsdock daemon
remote_user: root
shell: |
- /opt/opensds-hotpot-linux-amd64/bin/osdsdock -daemon
- ignore_errors: "true"
+ cd /opt && ./bin/osdsdock -daemon
when:
- - osdsdock_exists.stat.exists
+ - inventory_hostname in groups['ceph-mon']
- name: ensure osdsctl exists
stat:
path: /opt/opensds-hotpot-linux-amd64/bin/osdsctl
- ignore_errors: "true"
register: osdsctl_exists
+ when:
+ - inventory_hostname in groups['ceph_adm']
- name: run cinder-compatible-api, create opensds default profile
remote_user: root
@@ -73,6 +132,5 @@
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
+ - inventory_hostname in groups['ceph_adm']
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
index 57bae793..05ada67a 100644
--- a/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
@@ -8,5 +8,7 @@
# #############################################################################
---
- include: opensds.yml
+ when:
+ - inventory_hostname in groups['ceph_adm']
- 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 112d9c84..89432135 100644
--- a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
+++ b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
@@ -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
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
index 7bc8ec06..dbaa8d6b 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
@@ -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"
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
index 017f377e..501d3baa 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
@@ -48,13 +48,22 @@
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
diff --git a/quickstart.sh b/quickstart.sh
index db56ee2f..f872abfd 100755
--- a/quickstart.sh
+++ b/quickstart.sh
@@ -7,6 +7,13 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+COMPASS_ARCH=$(uname -m)
+if [ "$COMPASS_ARCH" = "aarch64" ]; then
+ echo "Not support aarch64, please try quickstart_k8s.sh instead"
+ exit 1
+fi
+
sudo apt-get update
sudo apt-get install -y git
diff --git a/quickstart_k8s.sh b/quickstart_k8s.sh
index 2745cdb9..49a8432c 100755
--- a/quickstart_k8s.sh
+++ b/quickstart_k8s.sh
@@ -7,6 +7,15 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+COMPASS_ARCH=$(uname -m)
+if [ "$COMPASS_ARCH" = "aarch64" ]; then
+ echo "Running on aarch64 host, make sure your jump host is configured okay"
+ echo "Please reference docs/release/installation/k8s-deploy-arm.rst"
+ export ADAPTER_OS_PATTERN='(?i)CentOS-7.*arm.*'
+ SCENARIO=${SCENARIO:-k8-nosdn-nofeature-noha.yml}
+fi
+
sudo apt-get update
sudo apt-get install -y git
diff --git a/util/docker-compose/roles/compass/files/prepare_ansible.sh b/util/docker-compose/roles/compass/files/prepare_ansible.sh
index 031333c8..22b7e905 100755
--- a/util/docker-compose/roles/compass/files/prepare_ansible.sh
+++ b/util/docker-compose/roles/compass/files/prepare_ansible.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
#!/bin/bash
for i in `ls /root/compass4nfv/deploy/adapters/ansible | grep "openstack_"`; do
diff --git a/util/docker-compose/roles/compass/files/up_containers.sh b/util/docker-compose/roles/compass/files/up_containers.sh
index 9aca591a..6a57282e 100755
--- a/util/docker-compose/roles/compass/files/up_containers.sh
+++ b/util/docker-compose/roles/compass/files/up_containers.sh
@@ -1,3 +1,12 @@
+##############################################################################
+# 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
+##############################################################################
+
#!/bin/bash
cd /root/docker_compose
docker-compose up