[OOM] Upgrade oom versions
[ci-management.git] / packer / provision / helm.yaml
1 ---
2 - import_playbook: ../common-packer/provision/docker.yaml
3
4 - hosts: all
5   become_user: root
6   become_method: sudo
7
8   vars:
9     kubectl_version: 1.23.7
10     helm3_6_version: 3.6.3
11     helm3_8_version: 3.8.2
12     chartmuseum_version: 0.12.0
13
14   tasks:
15     - name: 'Install kubectl {{kubectl_version}}'
16       get_url:
17         url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
18         dest: /usr/local/bin/kubectl
19         mode: 0775
20       become: yes
21
22     - name: 'Install Helm3.6 {{helm3_6_version}}'
23       block:
24         - name: 'Create directory /tmp/helm3.6'
25           file:
26             path: /tmp/helm3.6
27             state: directory
28         - name: 'Fetch tar.gz for Helm 3.6'
29           get_url:
30             url: "https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
31             dest: /tmp/helm3.6
32         - name: 'Unarchive Helm 3.6'
33           unarchive:
34             src: "/tmp/helm3.6/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
35             dest: /tmp/helm3.6
36             remote_src: true
37           become: yes
38         - name: 'Move Helm 3.6 bin to /usr/local/bin and set as executable'
39           command: 'mv /tmp/helm3.6/linux-amd64/helm /usr/local/bin/helm3.6'
40           become: yes
41         - name: 'Check Helm 3.6'
42           command: 'which helm3.6'
43         - name: 'Check kubectl {{kubectl_version}}'
44           command: 'which kubectl'
45
46         - name: 'Install Helm 3.6'
47           shell: |
48              echo "----> Installing helm3.6"
49              wget 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
50              tar -xvf 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
51              mv linux-amd64/helm /usr/local/bin/helm3.6
52              which helm3.6
53           become: true
54
55     - name: 'Install Helm3.8 {{helm3_8_version}}'
56       block:
57         - name: 'Create directory /tmp/helm3.8'
58           file:
59             path: /tmp/helm3.8
60             state: directory
61         - name: 'Fetch tar.gz for Helm 3.8'
62           get_url:
63             url: "https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz"
64             dest: /tmp/helm3.8
65         - name: 'Unarchive Helm 3.8'
66           unarchive:
67             src: "/tmp/helm3.8/helm-v{{helm3_8_version}}-linux-amd64.tar.gz"
68             dest: /tmp/helm3.8
69             remote_src: true
70           become: yes
71         - name: 'Move Helm 3.8 bin to /usr/local/bin and set as executable'
72           command: 'mv /tmp/helm3.8/linux-amd64/helm /usr/local/bin/helm3.8'
73           become: yes
74         - name: 'Check Helm 3.8'
75           command: 'which helm3.8'
76         - name: 'Check kubectl {{kubectl_version}}'
77           command: 'which kubectl'
78
79         - name: 'Install Helm 3.8'
80           shell: |
81              echo "----> Installing helm3.8"
82              wget 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz'
83              tar -xvf 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz'
84              mv linux-amd64/helm /usr/local/bin/helm3.8
85              which helm3.8
86           become: true
87
88
89     - name: 'Install ChartMuseum {{chartmuseum_version}}'
90       block:
91         - name: 'Fetch bin for ChartMuseum'
92           get_url:
93             url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum"
94             dest: /usr/local/bin/chartmuseum
95             mode: "0755"
96           become: yes
97         - name: 'Check ChartMuseum {{chartmuseum_version}}'
98           command: 'which chartmuseum'