blob: 0b24b199e168a262aaded7181eddf19b384f39b4 [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:
Jessica Wagantallc292c952021-02-16 11:46:11 -080025 - name: 'Fetch tar.gz for {{helm_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050026 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"
Jessica Wagantallc292c952021-02-16 11:46:11 -080029 - name: 'Unarchive {{helm_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050030 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
Jessica Wagantallc292c952021-02-16 11:46:11 -080035 - name: 'Move {{helm_version}} bin to /usr/local/bin and set as executable'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050036 command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm'
37 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080038 - name: 'Check Helm {{helm_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050039 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:
Jessica Wagantallc292c952021-02-16 11:46:11 -080043 - name: 'Create directory /tmp/helm3_3'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010044 file:
Jessica Wagantall1d8523f2021-02-10 09:50:40 -080045 path: /tmp/helm3_3
Sylvain Desbureaux47840982021-02-09 08:21:21 +010046 state: directory
Jessica Wagantallc292c952021-02-16 11:46:11 -080047 - name: 'Fetch tar.gz for Helm 3.3'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010048 get_url:
49 url: "https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz"
50 dest: /tmp/helm3_3
Jessica Wagantallc292c952021-02-16 11:46:11 -080051 - name: 'Unarchive Helm 3.3'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010052 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
Jessica Wagantallc292c952021-02-16 11:46:11 -080057 - name: 'Move Helm 3.3 bin to /usr/local/bin and set as executable'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010058 command: 'mv /tmp/helm3_3/linux-amd64/helm /usr/local/bin/helm3.3'
59 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080060 - name: 'Check Helm 3.3'
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010061 command: 'which helm3.3'
Jessica Wagantallc292c952021-02-16 11:46:11 -080062 - name: 'Check kubectl {{kubectl_version}}'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010063 command: 'which kubectl'
64
Jessica Wagantallc292c952021-02-16 11:46:11 -080065 - name: 'Install Helm 3.3'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010066 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
Jessica Wagantallc292c952021-02-16 11:46:11 -080074 - name: 'Install Helm 3.5 {{helm3_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010075 block:
Jessica Wagantallc292c952021-02-16 11:46:11 -080076 - name: 'Create directory /tmp/helm3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010077 file:
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010078 path: /tmp/helm3.5
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010079 state: directory
Jessica Wagantallc292c952021-02-16 11:46:11 -080080 - name: 'Fetch tar.gz for Helm 3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010081 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
Jessica Wagantallc292c952021-02-16 11:46:11 -080084 - name: 'Unarchive Helm 3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010085 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
Jessica Wagantallc292c952021-02-16 11:46:11 -080090 - name: 'Move Helm 3.5 bin to /usr/local/bin and set as executable'
91 command: 'mv /tmp/helm3.5/linux-amd64/helm /usr/local/bin/helm3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010092 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080093 - name: 'Check Helm 3.5'
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010094 command: 'which helm3.5'
Jessica Wagantallc292c952021-02-16 11:46:11 -080095 - name: 'Check kubectl {{kubectl_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050096 command: 'which kubectl'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010097
Jessica Wagantallc292c952021-02-16 11:46:11 -080098 - name: 'Install Helm 3.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:
Jessica Wagantallc292c952021-02-16 11:46:11 -0800109 - name: 'Fetch bin for ChartMuseum'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +0100110 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
Jessica Wagantallc292c952021-02-16 11:46:11 -0800115 - name: 'Check ChartMuseum {{chartmuseum_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +0100116 command: 'which chartmuseum'