Ubuntu 18 support for nsb_setup.yml flow 45/65745/3
authorStepan Andrushko <stepanx.andrushko@intel.com>
Tue, 11 Dec 2018 17:41:55 +0000 (19:41 +0200)
committerStepan Andrushko <stepanx.andrushko@intel.com>
Wed, 12 Dec 2018 16:31:31 +0000 (16:31 +0000)
Added Ubuntu 18 support to nsb_setup.yml flow: playbook
build_yardstick_image.yml.
Resolved dependencies between sample VNF and npm installation.

JIRA: YARDSTICK-1567

Change-Id: Ie4012687af7cf1fc374c226325f2c71cd6017275
Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
ansible/build_yardstick_image.yml
ansible/roles/install_dependencies_jumphost/tasks/Debian.yml
ansible/roles/install_dpdk/tasks/Debian.yml

index 072c12c..495a547 100644 (file)
       'amd64': disk1
       'arm64': uefi1
     boot_mode: "{{ boot_modes[YARD_IMG_ARCH] }}"
-    image_filename: "{{ release }}-server-cloudimg-{{ YARD_IMG_ARCH }}-{{ boot_mode }}.img"
-    image_path: "{{ release }}/current/{{ image_filename }}"
+    image_filename:
+      'xenial': "{{ release }}-server-cloudimg-{{ YARD_IMG_ARCH }}-{{ boot_mode }}.img"
+      'bionic': "{{ release }}-server-cloudimg-{{ YARD_IMG_ARCH }}.img"
+    image_path: "{{ release }}/current/{{ image_filename[release] }}"
     host: "{{ lookup('env', 'HOST')|default('cloud-images.ubuntu.com', true)}}"
     image_url: "{{ lookup('env', 'IMAGE_URL')|default('https://' ~ host ~ '/' ~ image_path, true) }}"
-    image_dest: "{{ workspace }}/{{ image_filename }}"
+    image_dest: "{{ workspace }}/{{ image_filename[release] }}"
     sha256sums_path: "{{ release }}/current/SHA256SUMS"
     sha256sums_filename: "{{ sha256sums_path|basename }}"
     sha256sums_url: "{{ lookup('env', 'SHA256SUMS_URL')|default('https://' ~ host ~ '/' ~ sha256sums_path, true) }}"
index 419f81b..6c3900d 100755 (executable)
   apt:
     update_cache: yes
 
+- name: Install dependency for Ubuntu 18
+  action: "{{ ansible_pkg_mgr }} name=libssl1.0-dev state=present"
+  when:
+    - ansible_distribution == 'Ubuntu'
+    - ansible_distribution_major_version|int >= 17
+
 - name: Install core packages
   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
   with_items:
index 4f0c3c8..b76a0fb 100755 (executable)
@@ -17,6 +17,7 @@
   with_items:
     - libpcap-dev
     - pciutils
+    - libelf-dev
 
 - name: Install kernel headers
   action: "{{ ansible_pkg_mgr }} name=linux-headers-{{ dpdk_kernel }} state=present"