aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks
diff options
context:
space:
mode:
authorMaciej Wereski <m.wereski@partner.samsung.com>2022-02-03 16:22:00 +0100
committerMaciej Wereski <m.wereski@partner.samsung.com>2022-10-12 17:21:25 +0200
commitdf00edd68426419d789733699584c051e570a43c (patch)
treee0510d2463f97f8bec5f29305a4544aa6a1c1973 /deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks
parent5ea85531ec762930e6f34dc4240776e43e2b88e7 (diff)
noheat: Upgrades, refactor, deploy Devstack
* Revert "Enable VID" (this reverts commit 2223bfaffa8fe5fb90c578ec71a035f001b9ce22) * make sure ca-certificates is current * add ability to configure Docker daemon * upgrade Ubuntu to 20.04 * update tools, dependencies, Ansible Galaxy collections, Docker, RKE, k8s & charts * make Prometheus & MetalLB optional * deploy Istio * use copy instead of ansible.posix.synchronize * Allow to set IP address pools in OpenStack * fix ansible-lint issues * split big tasks files into smaller ones * migrate to ansible-core * add 'make onap' task * add Devstack deployment * fix NFS exports * add Strimzi * install Docker on operator * override Nexus only on hosts that need it * ability to set override file (sm-onap is default) * ability to set ONAP (OOM) branch * ability to set Devstack version * add playbook to deploy everything * describe how to run playbooks * save operator0 access information * install Galaxy deps with dedicated module Issue-ID: INT-1601 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com> Change-Id: I88cfeeaf281c175340b63909983251ecd62eeb00
Diffstat (limited to 'deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks')
-rw-r--r--deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/cm.yml45
-rw-r--r--deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/helm.yml35
-rw-r--r--deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/main.yml68
3 files changed, 85 insertions, 63 deletions
diff --git a/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/cm.yml b/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/cm.yml
new file mode 100644
index 000000000..71f43ad0a
--- /dev/null
+++ b/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/cm.yml
@@ -0,0 +1,45 @@
+---
+- name: Check if chartmuseum is installed
+ stat:
+ path: /usr/local/bin/chartmuseum
+ register: cm_bin
+
+- name: Check if chartmuseum is installed
+ stat:
+ path: /tmp/get-chartmuseum
+ register: cm_install
+
+- name: Download chartmuseum install script
+ get_url:
+ url: "https://raw.githubusercontent.com/helm/chartmuseum/v{{ chartmuseum_version }}/scripts/get-chartmuseum"
+ dest: "/tmp/"
+ mode: '700'
+ when: not cm_install.stat.exists
+
+- name: Install chartmuseum
+ become: yes
+ command:
+ cmd: "./get-chartmuseum -v v{{ chartmuseum_version }}"
+ chdir: "/tmp/"
+ when: not cm_bin.stat.exists
+
+- name: Create chartmuseum local storage
+ file:
+ name: "{{ chartmuseum_dir }}"
+ state: directory
+ mode: '0755'
+
+- name: Install chartmuseum service file
+ become: yes
+ template:
+ src: "chartmuseum.service.j2"
+ dest: "/etc/systemd/system/chartmuseum.service"
+ mode: '0444'
+ notify: Reload systemd
+
+- name: Start and enable chartmuseum
+ become: yes
+ service:
+ name: "chartmuseum"
+ state: started
+ enabled: yes
diff --git a/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/helm.yml b/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/helm.yml
new file mode 100644
index 000000000..88ba29f64
--- /dev/null
+++ b/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/helm.yml
@@ -0,0 +1,35 @@
+---
+- name: Download helm
+ get_url:
+ url: "https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz"
+ dest: "/tmp"
+
+- name: Unarchive helm
+ unarchive:
+ src: "/tmp/helm-v{{ helm_version }}-linux-amd64.tar.gz"
+ dest: "/tmp/"
+ remote_src: yes
+
+- name: Copy helm binary to $PATH
+ become: yes
+ copy:
+ src: "/tmp/linux-amd64/helm"
+ dest: "/usr/local/bin/"
+ remote_src: yes
+ mode: '0555'
+
+- name: Install Helm Push plugin
+ kubernetes.core.helm_plugin:
+ plugin_path: "https://github.com/chartmuseum/helm-push.git"
+ plugin_version: "{{ helm_cm_push_version }}"
+ state: present
+
+- name: Install Helm OOM Deploy plugin
+ kubernetes.core.helm_plugin:
+ plugin_path: "{{ oom_dir }}/kubernetes/helm/plugins/deploy"
+ state: present
+
+- name: Install Helm OOM Undeploy plugin
+ kubernetes.core.helm_plugin:
+ plugin_path: "{{ oom_dir }}/kubernetes/helm/plugins/undeploy"
+ state: present
diff --git a/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/main.yml b/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/main.yml
index 93787be5f..94abf6ea8 100644
--- a/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/main.yml
+++ b/deployment/noheat/cluster-rke/ansible/roles/setup_helm/tasks/main.yml
@@ -1,67 +1,9 @@
-- name: Download helm
- get_url:
- url: "https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz"
- dest: "/tmp"
+---
+- name: Setup helm
+ include_tasks: helm.yml
-- name: Unarchive helm
- unarchive:
- src: "/tmp/helm-v{{ helm_version }}-linux-amd64.tar.gz"
- dest: "/tmp/"
- remote_src: yes
-
-- name: Copy helm binary to $PATH
- become: yes
- copy:
- src: "/tmp/linux-amd64/helm"
- dest: "/usr/local/bin/"
- remote_src: yes
- mode: '0555'
-
-- name: Install Helm Push plugin
- command: helm plugin install --version 0.9.0 https://github.com/chartmuseum/helm-push.git
-
-- name: Install Helm OOM Deploy plugin
- kubernetes.core.helm_plugin:
- plugin_path: "{{ oom_dir }}/kubernetes/helm/plugins/deploy"
- state: present
-
-- name: Install Helm OOM Undeploy plugin
- kubernetes.core.helm_plugin:
- plugin_path: "{{ oom_dir }}/kubernetes/helm/plugins/undeploy"
- state: present
-
-- name: Download chartmuseum install script
- get_url:
- url: "https://raw.githubusercontent.com/helm/chartmuseum/v{{ chartmuseum_version }}/scripts/get-chartmuseum"
- dest: "/tmp/"
- mode: '700'
-
-- name: Install chartmuseum
- become: yes
- command:
- cmd: "./get-chartmuseum -v v{{ chartmuseum_version }}"
- chdir: "/tmp/"
-
-- name: Create chartmuseum local storage
- file:
- name: "{{ chartmuseum_dir }}"
- state: directory
- mode: '0755'
-
-- name: Install chartmuseum service file
- become: yes
- template:
- src: "chartmuseum.service.j2"
- dest: "/etc/systemd/system/chartmuseum.service"
- mode: '0444'
- notify: Reload systemd
-
-- name: Start and enable chartmuseum
- become: yes
- service:
- name: "chartmuseum"
- state: started
- enabled: yes
+- name: Setup chartmuseum
+ include_tasks: cm.yml
- name: Add local Helm repository
kubernetes.core.helm_repository: