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
- 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 }}"
- stress
- sysstat
- unzip
+ - netperf
+ - bonnie++
+ - lmbench
# for Trex
- libpython2.7-dev
# for IxLoad
# 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
RUN easy_install -U setuptools==30.0.0
python-pip \
vim \
libxft-dev \
- libxss-dev
+ libxss-dev \
+ sudo \
+ iputils-ping
if [[ "${DOCKER_ARCH}" != "aarch64" ]]; then
apt-get install -y libc6:arm64
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"
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