summaryrefslogtreecommitdiffstats
path: root/ansible/test/play-rke
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-02-16 13:12:45 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-16 13:12:45 +0000
commit9880331a27a67063d802c67b2ecf95c677046406 (patch)
tree22eca98787a905c85e5cc842d2db40f1328d5b7b /ansible/test/play-rke
parent8ec40e9842c856ed4c14d91755cc26b7c81b8f01 (diff)
parentd6908ed39dd5e58c539c1c818f371849dd0271eb (diff)
Merge changes from topic "ansible-helm3"
* changes: Run chartmuseum as a docker container Update 'helm deploy' failure criteria Fix kubeconfig file permissions Ensure k8s namespace for ONAP exists Customize helm "--timeout" option format if running helm v3 Redirect chartmuseum stdout/stderr to /dev/null Drop DIND specific test env settings for 'rke' role/playbook Improve bin utils symlink creation logic Add test scenario for Helm v3 Refactor Helm role test setup Add helm-push Helm v3 plugin to downloaded utilities list Fix Helm v3 data dir setup Add tasks to setup Helm v3 on infra node Add Helm v3 test scenario to rke playbook tests Change 'rke' role testing strategy Workaround RKE binary download issue Play 'chartmuseum' role in rke playbook if running with Helm v3 Fix variable inclusion order in RKE playbook tests Add Helm v3.3.4 to the list of downloaded utilities Add 'chartmuseum' binary to downloaded utilities list Add Molecule test scenario to verify 'chartmuseum' role on Ubuntu Add 'chartmuseum' role Split Helm v2 setup to separate playbook Improve 'application' role test coverage
Diffstat (limited to 'ansible/test/play-rke')
-rw-r--r--ansible/test/play-rke/molecule/default/molecule.yml16
-rw-r--r--ansible/test/play-rke/molecule/default/prepare.yml5
-rw-r--r--ansible/test/play-rke/molecule/default/vars.yml1
-rw-r--r--ansible/test/play-rke/molecule/helm3/molecule.yml39
l---------ansible/test/play-rke/molecule/helm3/playbook.yml1
l---------ansible/test/play-rke/molecule/helm3/prepare.yml1
-rw-r--r--ansible/test/play-rke/molecule/helm3/vars.yml5
7 files changed, 49 insertions, 19 deletions
diff --git a/ansible/test/play-rke/molecule/default/molecule.yml b/ansible/test/play-rke/molecule/default/molecule.yml
index b7e71bf5..519679a5 100644
--- a/ansible/test/play-rke/molecule/default/molecule.yml
+++ b/ansible/test/play-rke/molecule/default/molecule.yml
@@ -11,35 +11,19 @@ platforms:
pre_build_image: true
privileged: true
override_command: false
- restart_policy: unless-stopped
- volumes:
- - /var/lib/docker
- - /var/lib/kubelet
groups:
- infrastructure
- kubernetes-etcd
- kubernetes-control-plane
- kubernetes
- networks:
- - name: rke
- purge_networks: true
-
- name: kubernetes-node-1
image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
pre_build_image: true
privileged: true
override_command: false
- restart_policy: unless-stopped
- volumes:
- - /var/lib/docker
- - /var/lib/kubelet
groups:
- kubernetes
- kubernetes-node
- networks:
- - name: rke
- purge_networks: true
-
provisioner:
name: ansible
env:
diff --git a/ansible/test/play-rke/molecule/default/prepare.yml b/ansible/test/play-rke/molecule/default/prepare.yml
index ad6f0495..6d810052 100644
--- a/ansible/test/play-rke/molecule/default/prepare.yml
+++ b/ansible/test/play-rke/molecule/default/prepare.yml
@@ -2,7 +2,6 @@
- name: Prepare for all
hosts: all
roles:
- - prepare-docker-dind
- role: prepare-rke
vars:
mode: all
@@ -12,11 +11,11 @@
pre_tasks:
- name: Include infrastructure group variables
include_vars: ../../../../group_vars/infrastructure.yml
+ - name: Include test setup variables
+ include_vars: vars.yml
roles:
- role: prepare-rke
vars:
mode: infra
- prepare-kubectl
- prepare-helm
- vars_files:
- vars.yml
diff --git a/ansible/test/play-rke/molecule/default/vars.yml b/ansible/test/play-rke/molecule/default/vars.yml
index fa5b60e3..739dc955 100644
--- a/ansible/test/play-rke/molecule/default/vars.yml
+++ b/ansible/test/play-rke/molecule/default/vars.yml
@@ -1,3 +1,4 @@
---
app_name: moleculeapp
app_data_path: "/opt/{{ app_name }}"
+cluster_config_dir: "/opt/{{ app_name }}/cluster"
diff --git a/ansible/test/play-rke/molecule/helm3/molecule.yml b/ansible/test/play-rke/molecule/helm3/molecule.yml
new file mode 100644
index 00000000..83a2fd20
--- /dev/null
+++ b/ansible/test/play-rke/molecule/helm3/molecule.yml
@@ -0,0 +1,39 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint:
+ name: yamllint
+platforms:
+ - name: infrastructure-server
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: true
+ privileged: true
+ override_command: false
+ groups:
+ - infrastructure
+ - kubernetes-etcd
+ - kubernetes-control-plane
+ - kubernetes
+ - name: kubernetes-node-1
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: true
+ privileged: true
+ override_command: false
+ groups:
+ - kubernetes
+ - kubernetes-node
+provisioner:
+ name: ansible
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+ ANSIBLE_LIBRARY: ../../../../library
+ lint:
+ name: ansible-lint
+scenario:
+ name: helm3
+verifier:
+ name: testinfra
+ lint:
+ name: flake8
diff --git a/ansible/test/play-rke/molecule/helm3/playbook.yml b/ansible/test/play-rke/molecule/helm3/playbook.yml
new file mode 120000
index 00000000..a3e26797
--- /dev/null
+++ b/ansible/test/play-rke/molecule/helm3/playbook.yml
@@ -0,0 +1 @@
+../default/playbook.yml \ No newline at end of file
diff --git a/ansible/test/play-rke/molecule/helm3/prepare.yml b/ansible/test/play-rke/molecule/helm3/prepare.yml
new file mode 120000
index 00000000..1c017d9a
--- /dev/null
+++ b/ansible/test/play-rke/molecule/helm3/prepare.yml
@@ -0,0 +1 @@
+../default/prepare.yml \ No newline at end of file
diff --git a/ansible/test/play-rke/molecule/helm3/vars.yml b/ansible/test/play-rke/molecule/helm3/vars.yml
new file mode 100644
index 00000000..e16e502f
--- /dev/null
+++ b/ansible/test/play-rke/molecule/helm3/vars.yml
@@ -0,0 +1,5 @@
+---
+app_name: moleculeapp
+app_data_path: "/opt/{{ app_name }}"
+cluster_config_dir: "/opt/{{ app_name }}/cluster"
+helm_version: v3.3.4