Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 1 | --- |
Bengt Thuree | 092ee88 | 2018-11-29 16:16:24 +1100 | [diff] [blame] | 2 | - import_playbook: ../common-packer/provision/docker.yaml |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 3 | |
| 4 | - hosts: all |
| 5 | become_user: root |
| 6 | become_method: sudo |
| 7 | |
| 8 | vars: |
Anil Belur | b570b51 | 2020-05-07 09:06:25 +1000 | [diff] [blame] | 9 | kubectl_version: 1.15.11 |
Anil Belur | 1a87cf5 | 2020-05-06 10:22:21 +1000 | [diff] [blame] | 10 | helm_version: 2.16.6 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 11 | helm3_3_version: 3.3.4 |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame^] | 12 | helm3_5_version: 3.5.1 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 13 | chartmuseum_version: 0.12.0 |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 14 | |
| 15 | tasks: |
| 16 | - name: 'Install kubectl {{kubectl_version}}' |
| 17 | get_url: |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 18 | url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 19 | dest: /usr/local/bin/kubectl |
| 20 | mode: 0775 |
| 21 | become: yes |
| 22 | |
| 23 | - name: 'Install Helm {{helm_version}}' |
| 24 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 25 | - name: 'Fetch tar.gz for {{helm_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 26 | get_url: |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 27 | url: "http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 28 | dest: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz" |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 29 | - name: 'Unarchive {{helm_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 30 | unarchive: |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 31 | src: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 32 | dest: /tmp |
| 33 | remote_src: true |
| 34 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 35 | - name: 'Move {{helm_version}} bin to /usr/local/bin and set as executable' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 36 | command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm' |
| 37 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 38 | - name: 'Check Helm {{helm_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 39 | command: 'which helm' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 40 | |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 41 | - name: 'Install Helm 3.3 {{helm3_3_version}}' |
| 42 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 43 | - name: 'Create directory /tmp/helm3_3' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 44 | file: |
Jessica Wagantall | 1d8523f | 2021-02-10 09:50:40 -0800 | [diff] [blame] | 45 | path: /tmp/helm3_3 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 46 | state: directory |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 47 | - name: 'Fetch tar.gz for Helm 3.3' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 48 | get_url: |
| 49 | url: "https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz" |
| 50 | dest: /tmp/helm3_3 |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 51 | - name: 'Unarchive Helm 3.3' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 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 |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 57 | - name: 'Move Helm 3.3 bin to /usr/local/bin and set as executable' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 58 | command: 'mv /tmp/helm3_3/linux-amd64/helm /usr/local/bin/helm3.3' |
| 59 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 60 | - name: 'Check Helm 3.3' |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 61 | command: 'which helm3.3' |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 62 | - name: 'Check kubectl {{kubectl_version}}' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 63 | command: 'which kubectl' |
| 64 | |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 65 | - name: 'Install Helm 3.3' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 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 Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame^] | 74 | - name: 'Install Helm3.5 {{helm3_5_version}}' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 75 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 76 | - name: 'Create directory /tmp/helm3.5' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 77 | file: |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 78 | path: /tmp/helm3.5 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 79 | state: directory |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 80 | - name: 'Fetch tar.gz for Helm 3.5' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 81 | get_url: |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame^] | 82 | url: "https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 83 | dest: /tmp/helm3.5 |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 84 | - name: 'Unarchive Helm 3.5' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 85 | unarchive: |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame^] | 86 | src: "/tmp/helm3.5/helm-v{{helm3_5_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 87 | dest: /tmp/helm3.5 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 88 | remote_src: true |
| 89 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 90 | - 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 Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 92 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 93 | - name: 'Check Helm 3.5' |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 94 | command: 'which helm3.5' |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 95 | - name: 'Check kubectl {{kubectl_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 96 | command: 'which kubectl' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 97 | |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 98 | - name: 'Install Helm 3.5' |
Jessica Wagantall | 9eaf79a | 2020-12-11 15:54:40 -0800 | [diff] [blame] | 99 | shell: | |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 100 | echo "----> Installing helm3.5" |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame^] | 101 | wget 'https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz' |
| 102 | tar -xvf 'https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz' |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 103 | mv linux-amd64/helm /usr/local/bin/helm3.5 |
| 104 | which helm3.5 |
Jessica Wagantall | 9eaf79a | 2020-12-11 15:54:40 -0800 | [diff] [blame] | 105 | become: true |
| 106 | |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 107 | - name: 'Install ChartMuseum {{chartmuseum_version}}' |
| 108 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 109 | - name: 'Fetch bin for ChartMuseum' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 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 |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 115 | - name: 'Check ChartMuseum {{chartmuseum_version}}' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 116 | command: 'which chartmuseum' |