aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/vars/Debian.yml13
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml13
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch6454
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml9
-rwxr-xr-xdeploy/adapters/ansible/roles/post-osa/files/sfc.conf2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/main.yml1
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml7
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml64
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j220
11 files changed, 162 insertions, 25 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml
index 4f8ca005..af234415 100644
--- a/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml
@@ -25,5 +25,5 @@
pkg: "{{ item }}"
state: "present"
update_cache: 'yes'
- with_items: "{{ packages }}"
+ with_items: "{{ vars['packages_' + ansible_architecture] }}"
when: ansible_os_family == 'Debian'
diff --git a/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/vars/Debian.yml b/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/vars/Debian.yml
index 0453dc44..6be9e06f 100644
--- a/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/vars/Debian.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/vars/Debian.yml
@@ -1,5 +1,5 @@
---
-packages:
+packages_x86_64:
- ubuntu-cloud-keyring
- python-dev
- python-pip
@@ -11,6 +11,17 @@ packages:
- python-crypto
- git
+packages_aarch64:
+ - ubuntu-cloud-keyring
+ - python-dev
+ - python-pip
+ - openvswitch-switch
+ - python-memcache
+ - python-iniparse
+ - python-lxml
+ - python-crypto
+ - git
+
pip_packages:
- crudini
- python-keyczar
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml
index 26e3fa75..c1357bf4 100644
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml
@@ -18,16 +18,3 @@ cluster-proportional-autoscaler-arm64"
# inventory/group_vars/k8s-cluster.yml
kube_network_plugin: flannel
helm_enabled: false
-docker_options: "--insecure-registry={{ kube_service_addresses }} \
---graph={{ docker_daemon_graph }} {{ docker_log_opts }} \
---add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
---default-runtime=docker-runc \
---exec-opt native.cgroupdriver=systemd \
---userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
---signature-verification=false"
-
-# roles/docker/vars/redhat.yml
-docker_package_info:
- pkg_mgr: yum
- pkgs:
- - name: docker
diff --git a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch64 b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch64
new file mode 100644
index 00000000..f4a3f5e9
--- /dev/null
+++ b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch64
@@ -0,0 +1,54 @@
+# deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial main restricted
+
+# deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
+# deb http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted
+
+# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
+# newer versions of the distribution.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial main restricted
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial main restricted
+
+## Major bug fix updates produced after the final release of the
+## distribution.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team. Also, please note that software in universe WILL NOT receive any
+## review or updates from the Ubuntu security team.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial universe
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial universe
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team, and may not be under a free licence. Please satisfy yourself as to
+## your rights to use the software. Also, please note that software in
+## multiverse WILL NOT receive any review or updates from the Ubuntu
+## security team.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial multiverse
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial multiverse
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse
+
+## N.B. software from this repository may not have been tested as
+## extensively as that contained in the main release, although it includes
+## newer versions of some applications which may provide useful features.
+## Also, please note that software in backports WILL NOT receive any review
+## or updates from the Ubuntu security team.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse
+
+## Uncomment the following two lines to add software from Canonical's
+## 'partner' repository.
+## This software is not part of Ubuntu, but is offered by Canonical and the
+## respective vendors as a service to Ubuntu users.
+# deb http://archive.canonical.com/ubuntu xenial partner
+# deb-src http://archive.canonical.com/ubuntu xenial partner
+
+deb http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted
+deb http://ports.ubuntu.com/ubuntu-ports xenial-security universe
+deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security universe
+deb http://ports.ubuntu.com/ubuntu-ports xenial-security multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security multiverse
diff --git a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml
index 44e3b1f6..b4ef9278 100644
--- a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml
@@ -62,10 +62,17 @@
- name: remove the space end of the line in the resolv.conf
shell: "sed -i 's/ *$//' /etc/resolv.conf"
+- name: remove estuary overlay and update apt cache
+ shell: rm -f /etc/apt/sources.list.d/estuary.list && apt-get update
+ when: ansible_architecture == "aarch64"
+
- name: change sources list
copy:
- src: sources.list.official
+ src: "{{ item }}"
dest: /etc/apt/sources.list
+ with_first_found:
+ - sources.list.official.{{ ansible_architecture }}
+ - sources.list.official
- name: restart ntp service
shell: "service ntp restart"
diff --git a/deploy/adapters/ansible/roles/post-osa/files/sfc.conf b/deploy/adapters/ansible/roles/post-osa/files/sfc.conf
index ce42c9e1..b200f254 100755
--- a/deploy/adapters/ansible/roles/post-osa/files/sfc.conf
+++ b/deploy/adapters/ansible/roles/post-osa/files/sfc.conf
@@ -1,6 +1,6 @@
[DEFAULT]
-service_plugins = router,metering,flow_classifier,sfc
+service_plugins = router,metering,flow_classifier,sfc,trunk
[sfc]
drivers = ovs
diff --git a/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh b/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
index b4a3a30a..d921d4e2 100644
--- a/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
+++ b/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
@@ -8,7 +8,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
# #############################################################################
-add-apt-repository ppa:ansible/ansible
+add-apt-repository ppa:ansible/ansible-2.4
apt-get update
apt-get install -y ansible
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
index 353282f9..060c9cf1 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
@@ -8,6 +8,7 @@
# #############################################################################
---
- include: opensds.yml
+- include: post-install.yml
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 7866e808..a095ceb0 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
@@ -75,10 +75,3 @@
shell: |
cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible;
ansible-playbook site.yml -i local.hosts | tee /var/log/stor4nfv.log
- register: stor4nfv_result
-
-- name: export opensds endpoint
- remote_user: root
- shell: |
- export OPENSDS_ENDPOINT=http://127.0.0.1:50040
- when: stor4nfv_result|succeeded
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
new file mode 100644
index 00000000..55d26d69
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
@@ -0,0 +1,64 @@
+# #############################################################################
+# 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 ceph-ansible dir exists
+ stat:
+ path: /opt/ceph-ansible
+ ignore_errors: "true"
+ register: ceph_ansible_exists
+
+- name: copy post-install.yml to /opt/ceph-ansible
+ remote_user: root
+ template:
+ src: post-install.yml.j2
+ dest: /opt/ceph-ansible/post-install.yml
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: run post-install playbook
+ shell: ansible-playbook post-install.yml -i ceph.hosts
+ become: true
+ args:
+ chdir: /opt/ceph-ansible
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: remove post-install.yml
+ file:
+ path: /opt/ceph-ansible/post-install.yml
+ state: absent
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: ensure osdsctl exists
+ stat:
+ path: /opt/opensds-v0.1.5-linux-amd64/bin/osdsctl
+ ignore_errors: "true"
+ register: osdsctl_exists
+
+- name: ensure opensds csi directory exists
+ stat:
+ path: /opt/opensds-k8s-v0.1.0-linux-amd64
+ ignore_errors: "true"
+ register: csi_dir_exists
+
+- name: create opensds default profile, csi pods
+ remote_user: root
+ shell: |
+ cp /opt/opensds-v0.1.5-linux-amd64/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-amd64;
+ 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/templates/post-install.yml.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2
new file mode 100644
index 00000000..662abc34
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2
@@ -0,0 +1,20 @@
+# #############################################################################
+# 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
+# #############################################################################
+---
+
+- hosts:
+ - mons
+ - osds
+ - mgrs
+
+ tasks:
+ - name: run modprobe rbd
+ remote_user: root
+ command: modprobe rbd
+ ignore_errors: "true"