Merge "update docker version to 16.04"
authorRoss Brattain <ross.b.brattain@intel.com>
Mon, 20 Nov 2017 08:57:01 +0000 (08:57 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 20 Nov 2017 08:57:01 +0000 (08:57 +0000)
ansible/build_yardstick_image.yml
ansible/roles/install_image_dependencies/defaults/main.yml
docker/Dockerfile
install.sh
tests/ci/load_images.sh

index 35d9da4..d7ac866 100644 (file)
@@ -29,7 +29,6 @@
     sha256sums_url: "{{ lookup('env', 'SHA256SUMS_URL')|default('https://' ~ host ~ '/' ~ sha256sums_path, true) }}"
 
     workspace: "{{ lookup('env', 'workspace')|default('/tmp/workspace/yardstick', true) }}"
-    imgfile: "{{ workspace }}/yardstick-image.img"
     raw_imgfile_basename: "yardstick-{{ release }}-server.raw"
   environment:
     PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
@@ -40,6 +39,9 @@
 
     - package: name=parted state=present
 
+    - set_fact:
+        imgfile: "{{ workspace }}/yardstick-image.img"
+
     - set_fact:
         mountdir: "{{ lookup('env', 'mountdir')|default('/mnt/yardstick', true) }}"
 
 - name: include {{ img_modify_playbook }}
   include: "{{ img_modify_playbook }}"
 
+- hosts: localhost
+  tasks:
+    - name: convert image to image file
+      command: "qemu-img convert -c -o compat=0.10 -O qcow2 {{ raw_imgfile }} {{ imgfile }}"
+
 - name: run post build tasks
   include: post_build_yardstick_image.yml
 
 
   tasks:
     - debug:
-        msg: "yardstick image = {{ raw_imgfile }}"
+        msg: "yardstick image = {{ imgfile }}"
index 362fa35..f0b5321 100644 (file)
@@ -20,6 +20,9 @@ install_dependencies:
     - stress
     - sysstat
     - unzip
+    - netperf
+    - bonnie++
+    - lmbench
     # for Trex
     - libpython2.7-dev
     # for IxLoad
index a58bbbc..4ec6791 100644 (file)
@@ -7,22 +7,22 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-FROM ubuntu:14.04
+FROM ubuntu:16.04
 
 LABEL image=opnfv/yardstick
 
 ARG BRANCH=master
 
 # GIT repo directory
-ENV REPOS_DIR /home/opnfv/repos
-ENV IMAGE_DIR /home/opnfv/images/
+ENV REPOS_DIR="/home/opnfv/repos" \
+    IMAGE_DIR="/home/opnfv/images/"
 
 # Set work directory
 
 # Yardstick repo
-ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick
-ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
-ENV STORPERF_REPO_DIR ${REPOS_DIR}/storperf
+ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick" \
+    RELENG_REPO_DIR="${REPOS_DIR}/releng" \
+    STORPERF_REPO_DIR="${REPOS_DIR}/storperf"
 
 RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean
 RUN easy_install -U setuptools==30.0.0
index dfad3a5..db0bff4 100755 (executable)
@@ -81,7 +81,9 @@ apt-get update && apt-get install -y \
     python-pip \
     vim \
     libxft-dev \
-    libxss-dev
+    libxss-dev \
+    sudo \
+    iputils-ping
 
 if [[ "${DOCKER_ARCH}" != "aarch64" ]]; then
     apt-get install -y libc6:arm64
index e73d7e8..666a78b 100755 (executable)
@@ -63,11 +63,14 @@ build_yardstick_image()
         fi
     else
         if [ ! -f "${QCOW_IMAGE}" ];then
-            local cmd
-            cmd="sudo $(which yardstick-img-modify) $(pwd)/tools/ubuntu-server-cloudimg-modify.sh"
-
-            # Build the image. Retry once if the build fails
-            $cmd || $cmd
+            ANSIBLE_SCRIPTS="${0%/*}/../../ansible"
+            cd ${ANSIBLE_SCRIPTS} &&\
+            ansible-playbook \
+                     -e img_modify_playbook='ubuntu_server_cloudimg_modify.yml' \
+                     -e target_os='Ubuntu' \
+                     -e YARD_IMG_ARCH='amd64' \
+                     -e ubuntu_img_file="${QCOW_IMAGE}" \
+                     -vvv -i inventory.ini build_yardstick_image.yml
 
             if [ ! -f "${QCOW_IMAGE}" ]; then
                 echo "Failed building QCOW image"
@@ -209,7 +212,7 @@ create_nova_flavor()
         echo
         echo "========== Creating yardstick-flavor =========="
         # Create the nova flavor used by some sample test cases
-        openstack ${SECURE} flavor create --id 100 --ram 1024 --disk 3 --vcpus 1 yardstick-flavor
+        openstack ${SECURE} flavor create --id 100 --ram 1024 --disk 10 --vcpus 1 yardstick-flavor
         # DPDK-enabled OVS requires guest memory to be backed by large pages
         if [[ $DEPLOY_SCENARIO == *[_-]ovs[_-]* ]]; then
             openstack ${SECURE} flavor set --property hw:mem_page_size=large yardstick-flavor