Add binaries preparation to installation steps 58/89858/5
authorTomáš Levora <t.levora@partner.samsung.com>
Fri, 14 Jun 2019 08:54:39 +0000 (10:54 +0200)
committerTomáš Levora <t.levora@partner.samsung.com>
Fri, 14 Jun 2019 12:02:06 +0000 (14:02 +0200)
Adding binaries preparation into installation steps as rke binary need
to be renamed and helm binary need to be unarchived. Removing those
previously manual steps from BuilGuide

Issue-ID: OOM-1925

Change-Id: I504320fb82e1c8f6db2f99c5dfd4518192eae895
Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
ansible/group_vars/infrastructure.yml
ansible/roles/helm/tasks/main.yml
ansible/roles/rke/defaults/main.yml
ansible/test/roles/prepare-helm/tasks/main.yml
ansible/test/roles/prepare-rke/tasks/infra.yml
docs/BuildGuide.rst

index 08a2591..a6e2d77 100755 (executable)
@@ -28,6 +28,7 @@ all_simulated_hosts:
     "{{ simulated_hosts.git + simulated_hosts.http + simulated_hosts.nexus }}"
 populate_nexus: false
 helm_bin_dir: /usr/local/bin
+helm_version: v2.12.3
 rancher_server_image: rancher/server:v1.6.22
 vnc_server_image: consol/ubuntu-icewm-vnc:1.4.0
 nexus3_image: sonatype/nexus3:3.15.2
index 2521ad2..c1b4710 100644 (file)
@@ -1,7 +1,11 @@
 ---
 - name: Install Helm
-  copy:
-    src: "{{ app_data_path }}/downloads/helm"
+  unarchive:
+    src: "{{ app_data_path }}/downloads/helm-{{ helm_version }}-linux-amd64.tar.gz"
     dest: "{{ helm_bin_dir }}"
+    extra_opts:
+      - --strip=1
+      - --wildcards
+      - '*/helm'
     remote_src: true
     mode: 0755
index 8821685..2f160fc 100644 (file)
@@ -1,5 +1,5 @@
 ---
-rke_binary: rke
+rke_binary: rke_linux-amd64
 rke_username: rke
 rke_bin_dir: /usr/local/bin
 kube_config_dir: "{{ ansible_env.HOME }}/.kube"
index aa01e28..d6fabae 100644 (file)
@@ -5,14 +5,8 @@
     recurse: true
     state: directory
 
-- name: "Download and unarchive helm-{{ helm_version }}"
-  unarchive:
-    src: "https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz"
-    dest: "/tmp"
-    remote_src: true
-
-- name: "Copy helm binary"
-  copy:
-    src: /tmp/linux-amd64/helm
-    dest: "{{ app_data_path }}/downloads/helm"
+- name: "Download helm-{{ helm_version }}"
+  get_url:
+    url: "https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz"
+    dest: "{{ app_data_path }}/downloads"
     remote_src: true
index 55ab7f1..e9971f7 100644 (file)
@@ -7,7 +7,7 @@
 - name: "Install rke-{{ rke_version }}"
   get_url:
     url: "https://github.com/rancher/rke/releases/download/v{{ rke_version }}/rke_linux-amd64"
-    dest: "{{ app_data_path }}/downloads/rke"
+    dest: "{{ app_data_path }}/downloads/rke_linux-amd64"
 
 - name: "Install kubectl-{{ kubectl_version }}"
   get_url:
index cfddcc9..5487862 100644 (file)
@@ -122,20 +122,7 @@ Following steps are still required and are not supported by current version of d
 
 ToDo: complete and verified list of http files will come just during/after vFWCL testcase
 
-
-**Step 4 - Binaries**
-
-::
-
-       # Binaries are downloaded in step one but some post processing is still needed.
-       # This will be improved in future in installer itself
-
-       tar -xf ../resources/downloads/helm-v2.12.3-linux-amd64.tar.gz linux-amd64/helm -O > ../resources/downloads/helm
-       rm -f ../resources/downloads/helm-v2.12.3-linux-amd64.tar.gz
-       mv ../resources/downloads/rke_linux-amd64 rke
-
-
-**Step 5 - Create repo**
+**Step 4 - Create repo**
 
 ::
 
@@ -304,11 +291,8 @@ ToDo: complete and verified list of http files will come just during/after vFWCL
 
 ::
 
-       # Following step will download and prepare rke, kubectl and helm binaries
+       # Following step will download rke, kubectl and helm binaries
        ./build/download/download.py --http ./build/data_lists/infra_bin_utils.sh ../resources/downloads
-       tar -xf ../resources/downloads/helm-v2.12.3-linux-amd64.tar.gz linux-amd64/helm -O > ../resources/downloads/helm
-       rm -f ../resources/downloads/helm-v2.12.3-linux-amd64.tar.gz
-       mv ../resources/downloads/rke_linux-amd64 rke
 
 **Step 7 - rpms**