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

Download helm with official installer

We got an `Error: unsupported format` with an auto-updated Helm `2.15.0`
installed from snap.
Now we pin it to a specific working version and use the official install script.
parent 0c11c012
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,13 @@ git_local_storage_version: 'HEAD' ...@@ -32,7 +32,13 @@ git_local_storage_version: 'HEAD'
git_nextcloud_version: '569aedb4e8831fb81c84f4087c142b739b9e6521' git_nextcloud_version: '569aedb4e8831fb81c84f4087c142b739b9e6521'
# Application versions # Application versions
# https://github.com/kubernetes-sigs/krew/releases 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'
helmfile: helmfile:
# At the moment, helmfile doesn't provide sha256 sums, # At the moment, helmfile doesn't provide sha256 sums,
# see https://github.com/roboll/helmfile/issues/654 # see https://github.com/roboll/helmfile/issues/654
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
shell: | shell: |
set -e -x -o pipefail set -e -x -o pipefail
/usr/local/bin/helmfile \ /usr/local/bin/helmfile \
-b /snap/bin/helm \ -b /usr/local/bin/helm \
-e oas \ -e oas \
-f {{ data_directory }}/source/helmfiles/helmfile.d/05-cert-manager.yaml \ -f {{ data_directory }}/source/helmfiles/helmfile.d/05-cert-manager.yaml \
apply \ apply \
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
- GRAFANA_ADMIN_PASSWORD: "{{ grafana_admin_password }}" - GRAFANA_ADMIN_PASSWORD: "{{ grafana_admin_password }}"
shell: | shell: |
set -e -x -o pipefail set -e -x -o pipefail
/usr/local/bin/helmfile -b /snap/bin/helm -e oas \ /usr/local/bin/helmfile -b /usr/local/bin/helm -e oas \
-f {{ data_directory }}/source/helmfiles/helmfile.d/{{ item }}.yaml \ -f {{ data_directory }}/source/helmfiles/helmfile.d/{{ item }}.yaml \
apply --suppress-secrets \ apply --suppress-secrets \
| sed 's/\x1B\[[0-9;]*[JKmsu]//g' \ | sed 's/\x1B\[[0-9;]*[JKmsu]//g' \
......
...@@ -49,31 +49,63 @@ ...@@ -49,31 +49,63 @@
set_fact: set_fact:
configuration_directory: "{{ configuration_directory }}" configuration_directory: "{{ configuration_directory }}"
- name: Install helm snap - name: Remove old helm snap installation
# helm needs to get installed as "classic" snap tags:
command: snap install --classic helm - helm
command: snap remove helm
args: args:
creates: /snap/bin/helm removes: /snap/bin/helm
- name: Create kubectl symlink to /usr/local/bin - name: Get current helm version
file: tags:
state: link - helm
src: /snap/bin/helm shell: helm version | grep 'Client' | cut -d'"' -f 2 | tr -d 'v'
dest: /usr/local/bin/helm 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
- name: Install helm
tags:
- helm
command: /usr/local/bin/get-helm --version v{{ helm.version }}
when: helm_version.stdout != helm.version
- name: Create helm plugins config directory - name: Create helm plugins config directory
tags:
- helm
file: file:
state: directory state: directory
path: /root/.helm/plugins path: /root/.helm/plugins
- name: Install helm diff plugin - name: Install helm diff plugin
command: /snap/bin/helm plugin install https://github.com/databus23/helm-diff tags:
- helm
command: /usr/local/bin/helm plugin install https://github.com/databus23/helm-diff
args: args:
creates: /root/.helm/plugins/helm-diff creates: /root/.helm/plugins/helm-diff
- name: Install helm git plugin - name: Install helm git plugin
tags:
- helm
# Use GH version until https://github.com/aslafy-z/helm-git/pull/11 is merged # Use GH version until https://github.com/aslafy-z/helm-git/pull/11 is merged
command: /snap/bin/helm plugin install https://github.com/greenhost/helm-git --version bash-support command: /usr/local/bin/helm plugin install https://github.com/greenhost/helm-git --version bash-support
args: args:
creates: /root/.helm/plugins/helm-git creates: /root/.helm/plugins/helm-git
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
tags: tags:
- helm - helm
- tiller - tiller
command: /snap/bin/helm ls command: /usr/local/bin/helm ls
failed_when: false failed_when: false
register: helm_ls register: helm_ls
changed_when: false changed_when: false
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
tags: tags:
- tiller - tiller
- helm - helm
command: /snap/bin/helm init --upgrade --service-account=tiller command: /usr/local/bin/helm init --upgrade --service-account=tiller
when: helm_ls.stderr.find('Error') != -1 when: helm_ls.stderr.find('Error') != -1
- name: Wait for tiller to become available - 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