summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorAce Lee <liyin11@huawei.com>2017-11-03 06:39:00 +0000
committerAce Lee <liyin11@huawei.com>2017-11-17 02:17:29 +0000
commit7f0f1eaf717f7016d2f9ec5328cf9a0d02104222 (patch)
treefab051cf9b321b2c95694643d0a846791c7779dd /ansible
parent8291c3d11227de42599be920605f3f884dfa755b (diff)
update docker version to 16.04
JIRA: YARDSTICK-690 This patch is for Yardstick Docker base image upgrade to 16.04 This patch will enable ansible build image in yardstick env prepare. Add qemu-img convert to ansible build image. Change-Id: I43127b6020bd20bd9f4aac4fca0df75353b24346 Signed-off-by: Ace Lee <liyin11@huawei.com>
Diffstat (limited to 'ansible')
-rw-r--r--ansible/build_yardstick_image.yml11
-rw-r--r--ansible/roles/install_image_dependencies/defaults/main.yml3
2 files changed, 12 insertions, 2 deletions
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml
index 35d9da45e..d7ac866c2 100644
--- a/ansible/build_yardstick_image.yml
+++ b/ansible/build_yardstick_image.yml
@@ -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
@@ -41,6 +40,9 @@
- package: name=parted state=present
- set_fact:
+ imgfile: "{{ workspace }}/yardstick-image.img"
+
+ - set_fact:
mountdir: "{{ lookup('env', 'mountdir')|default('/mnt/yardstick', true) }}"
- set_fact:
@@ -205,6 +207,11 @@
- 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
@@ -212,4 +219,4 @@
tasks:
- debug:
- msg: "yardstick image = {{ raw_imgfile }}"
+ msg: "yardstick image = {{ imgfile }}"
diff --git a/ansible/roles/install_image_dependencies/defaults/main.yml b/ansible/roles/install_image_dependencies/defaults/main.yml
index 362fa351b..f0b53215a 100644
--- a/ansible/roles/install_image_dependencies/defaults/main.yml
+++ b/ansible/roles/install_image_dependencies/defaults/main.yml
@@ -20,6 +20,9 @@ install_dependencies:
- stress
- sysstat
- unzip
+ - netperf
+ - bonnie++
+ - lmbench
# for Trex
- libpython2.7-dev
# for IxLoad