Skip to content
Snippets Groups Projects
Verified Commit f6af2b9e authored by Varac's avatar Varac
Browse files

Revert "Download helm with official installer"

Now that helm is working again for our usecase (see details in
https://open.greenhost.net/openappstack/openappstack/issues/339)
we can install helm as snap again.

Closes: #339

This reverts commit 52910021.
parent 0d9b1dda
No related branches found
No related tags found
No related merge requests found
......@@ -32,13 +32,7 @@ git_local_storage_version: 'HEAD'
git_nextcloud_version: 'd882b6952c32b5cce03e6ad9a534035ce6f01230'
# Application versions
helm:
# helm snap 2.15 broke for us
# (https://open.greenhost.net/openappstack/openappstack/issues/338), so we
# use a pinned version for now.
# We use the official helm install script for now which has no checksum.
version: '2.14.3'
# https://github.com/kubernetes-sigs/krew/releases
helmfile:
# At the moment, helmfile doesn't provide sha256 sums,
# see https://github.com/roboll/helmfile/issues/654
......
......@@ -47,7 +47,7 @@
shell: |
set -e -x -o pipefail
/usr/local/bin/helmfile \
-b /usr/local/bin/helm \
-b /snap/bin/helm \
-e oas \
-f {{ data_directory }}/source/helmfiles/helmfile.d/05-cert-manager.yaml \
apply \
......
......@@ -96,7 +96,7 @@
- ONLYOFFICE_RABBITMQ_PASSWORD: "{{ onlyoffice_rabbitmq_password }}"
shell: |
set -e -x -o pipefail
/usr/local/bin/helmfile -b /usr/local/bin/helm -e oas \
/usr/local/bin/helmfile -b /snap/bin/helm -e oas \
-f {{ data_directory }}/source/helmfiles/helmfile.d/20-nextcloud.yaml \
apply --suppress-secrets \
| sed 's/\x1B\[[0-9;]*[JKmsu]//g' \
......
......@@ -49,63 +49,31 @@
set_fact:
configuration_directory: "{{ configuration_directory }}"
- name: Remove old helm snap installation
tags:
- helm
command: snap remove helm
- name: Install helm snap
# helm needs to get installed as "classic" snap
command: snap install --classic helm
args:
removes: /snap/bin/helm
- name: Get current helm version
tags:
- helm
shell: helm version | grep 'Client' | cut -d'"' -f 2 | tr -d 'v'
failed_when: false
register: helm_version
changed_when: false
- name: Show current helm version
tags:
- helm
- debug
debug:
msg: 'Current helm version is: {{ helm_version.stdout }}'
- name: Download helm install script
tags:
- helm
get_url:
url: https://raw.githubusercontent.com/helm/helm/master/scripts/get
dest: /usr/local/bin/get-helm
force: yes
mode: '0755'
become: true
creates: /snap/bin/helm
- name: Install helm
tags:
- helm
command: /usr/local/bin/get-helm --version v{{ helm.version }}
when: helm_version.stdout != helm.version
- name: Create kubectl symlink to /usr/local/bin
file:
state: link
src: /snap/bin/helm
dest: /usr/local/bin/helm
- name: Create helm plugins config directory
tags:
- helm
file:
state: directory
path: /root/.helm/plugins
- name: Install helm diff plugin
tags:
- helm
command: /usr/local/bin/helm plugin install https://github.com/databus23/helm-diff
command: /snap/bin/helm plugin install https://github.com/databus23/helm-diff
args:
creates: /root/.helm/plugins/helm-diff
- name: Install helm git plugin
tags:
- helm
# Use GH version until https://github.com/aslafy-z/helm-git/pull/11 is merged
command: /usr/local/bin/helm plugin install https://github.com/greenhost/helm-git --version bash-support
command: /snap/bin/helm plugin install https://github.com/greenhost/helm-git --version bash-support
args:
creates: /root/.helm/plugins/helm-git
......
......@@ -32,7 +32,7 @@
tags:
- helm
- tiller
command: /usr/local/bin/helm ls
command: /snap/bin/helm ls
failed_when: false
register: helm_ls
changed_when: false
......@@ -41,7 +41,7 @@
tags:
- tiller
- helm
command: /usr/local/bin/helm init --upgrade --service-account=tiller
command: /snap/bin/helm init --upgrade --service-account=tiller
when: helm_ls.stderr.find('Error') != -1
- name: Wait for tiller to become available
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment