blob: 59d0de2e472a8fe33912942369ec18ca25ebc9c9 [file] [log] [blame]
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05001---
Bengt Thuree092ee882018-11-29 16:16:24 +11002- import_playbook: ../common-packer/provision/docker.yaml
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05003
4- hosts: all
5 become_user: root
6 become_method: sudo
7
8 vars:
Anil Belurb570b512020-05-07 09:06:25 +10009 kubectl_version: 1.15.11
Anil Belur1a87cf52020-05-06 10:22:21 +100010 helm_version: 2.16.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010011 helm3_3_version: 3.3.4
12 helm3_version: 3.5.1
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010013 chartmuseum_version: 0.12.0
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050014
15 tasks:
16 - name: 'Install kubectl {{kubectl_version}}'
17 get_url:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010018 url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050019 dest: /usr/local/bin/kubectl
20 mode: 0775
21 become: yes
22
23 - name: 'Install Helm {{helm_version}}'
24 block:
25 - name: 'Fetch tar.gz'
26 get_url:
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010027 url: "http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010028 dest: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050029 - name: 'Unarchive'
30 unarchive:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010031 src: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050032 dest: /tmp
33 remote_src: true
34 become: yes
35 - name: 'Move helm to /usr/local/bin and set as executable'
36 command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm'
37 become: yes
38 - name: 'Check helm.'
39 command: 'which helm'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010040
Sylvain Desbureaux47840982021-02-09 08:21:21 +010041 - name: 'Install Helm 3.3 {{helm3_3_version}}'
42 block:
43 - name: create directory
44 file:
Jessica Wagantall1d8523f2021-02-10 09:50:40 -080045 path: /tmp/helm3_3
Sylvain Desbureaux47840982021-02-09 08:21:21 +010046 state: directory
47 - name: 'Fetch tar.gz'
48 get_url:
49 url: "https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz"
50 dest: /tmp/helm3_3
51 - name: 'Unarchive'
52 unarchive:
53 src: "/tmp/helm3_3/helm-v{{helm3_3_version}}-linux-amd64.tar.gz"
54 dest: /tmp/helm3_3
55 remote_src: true
56 become: yes
57 - name: 'Move helm to /usr/local/bin and set as executable'
58 command: 'mv /tmp/helm3_3/linux-amd64/helm /usr/local/bin/helm3.3'
59 become: yes
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010060 - name: 'Check helm3.3'
61 command: 'which helm3.3'
62 - name: 'Check kubectl'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010063 command: 'which kubectl'
64
65 - name: Install helm 3.3
66 shell: |
67 echo "----> Installing helm 3.3"
68 wget 'https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz'
69 tar -xvf 'https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz'
70 mv linux-amd64/helm /usr/local/bin/helm3.3
71 which helm3.3
72 become: true
73
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010074 - name: 'Install Helm3.5 {{helm3_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010075 block:
76 - name: create directory
77 file:
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010078 path: /tmp/helm3.5
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010079 state: directory
80 - name: 'Fetch tar.gz'
81 get_url:
Jessica Wagantall3942f382020-12-11 13:47:32 -080082 url: "https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010083 dest: /tmp/helm3.5
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010084 - name: 'Unarchive'
85 unarchive:
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010086 src: "/tmp/helm3.5/helm-v{{helm3_version}}-linux-amd64.tar.gz"
87 dest: /tmp/helm3.5
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010088 remote_src: true
89 become: yes
90 - name: 'Move helm to /usr/local/bin and set as executable'
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010091 command: 'mv /tmp/helm3/linux-amd64/helm /usr/local/bin/helm3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010092 become: yes
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010093 - name: 'Check helm3.5'
94 command: 'which helm3.5'
95 - name: 'Check kubectl'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050096 command: 'which kubectl'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010097
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010098 - name: Install helm3.5
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -080099 shell: |
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +0100100 echo "----> Installing helm3.5"
Sylvain Desbureaux47840982021-02-09 08:21:21 +0100101 wget 'https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz'
102 tar -xvf 'https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz'
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +0100103 mv linux-amd64/helm /usr/local/bin/helm3.5
104 which helm3.5
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -0800105 become: true
106
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +0100107 - name: 'Install ChartMuseum {{chartmuseum_version}}'
108 block:
109 - name: 'Fetch bin'
110 get_url:
111 url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum"
112 dest: /usr/local/bin/chartmuseum
113 mode: "0755"
114 become: yes
115 - name: 'Check chartmuseum.'
116 command: 'which chartmuseum'