diff options
Diffstat (limited to 'etc/conf/bottlenecks_config.yml')
-rw-r--r-- | etc/conf/bottlenecks_config.yml | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/etc/conf/bottlenecks_config.yml b/etc/conf/bottlenecks_config.yml index 005a04e3..c23ad9cc 100644 --- a/etc/conf/bottlenecks_config.yml +++ b/etc/conf/bottlenecks_config.yml @@ -1,33 +1,62 @@ +############################################################################## +# Copyright (c) 2019 opnfv. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + --- + +{% set validate_testcase = validate_testcase or '' %} +{% set testcase = testcase or '' %} +{% set deploy_scenario = deploy_scenario or 'unknown' %} +{% set dovetail_home = dovetail_home or '' %} +{% set debug = debug or 'false' %} +{% set build_tag = build_tag or '' %} +{% set cacert_volume = '' %} +{% if cacert %} + {% set cacert_volume = 'source=' + cacert + ',target=' + cacert %} +{% endif %} +{% set openrc_file = '/tmp/admin_rc.sh' %} +{% set result_dir = '/home/opnfv/bottlenecks/results' %} +{% set images_dir = '/home/opnfv/images' %} +{% set config_dir = '/home/opnfv/userconfig' %} +{% set image_file = '/tmp/yardstick.img' %} + bottlenecks: image_name: opnfv/bottlenecks - docker_tag: stable - opts: '-id --privileged=true' - config: - dir: '/home/opnfv/userconfig' + docker_tag: 8.0.1-latest + opts: + detach: true + stdin_open: true + privileged: true + shell: '/bin/bash' + envs: + - 'DEPLOY_SCENARIO={{deploy_scenario}}' + - 'Yardstick_TAG=opnfv-8.0.0' + - 'OUTPUT_FILE={{testcase}}.out' + - 'CI_DEBUG={{debug}}' + - 'BUILD_TAG={{build_tag}}-{{testcase}}' + volumes: + - '{{dovetail_home}}/results/bottlenecks:/tmp' + - '{{dovetail_home}}/images:{{images_dir}}' + - '{{dovetail_home}}/results:{{result_dir}}' + mounts: + - 'source=/var/run/docker.sock,target=/var/run/docker.sock' + - 'source={{dovetail_home}}/pre_config/env_config.sh,target={{openrc_file}}' + - {{cacert_volume}} pre_condition: - - 'source /tmp/admin_rc.sh && - (openstack --insecure image list | grep cirros-0.3.5 || - openstack --insecure image create cirros-0.3.5 - --disk-format qcow2 --container-format bare - --file /home/opnfv/userconfig/images/cirros-0.3.5-x86_64-disk.img)' - - 'source /tmp/admin_rc.sh && - (openstack --insecure flavor list | grep yardstick-flavor || - openstack --insecure flavor create --id 100 - --ram 1024 --disk 3 --vcpus 1 yardstick-flavor)' + - 'cp {{images_dir}}/ubuntu-16.04-server-cloudimg-amd64-disk1.img {{image_file}}' cmds: - - 'python /home/opnfv/bottlenecks/testsuites/run_testsuite.py testcase {{validate_testcase}} True' + - 'python /home/opnfv/bottlenecks/testsuites/run_testsuite.py testcase {{validate_testcase}} False' post_condition: - - 'source /tmp/admin_rc.sh && - (! openstack --insecure image list | grep cirros-0.3.5 || - openstack --insecure image delete cirros-0.3.5)' - - 'source /tmp/admin_rc.sh && - (! openstack --insecure flavor list | grep yardstick-flavor || - openstack --insecure flavor delete yardstick-flavor)' - result: - dir: '/tmp' - file_path: 'bottlenecks.log' - openrc: '/tmp/admin_rc.sh' + - 'mkdir -p {{result_dir}}' + - 'cp /tmp/bottlenecks.log {{result_dir}}' + - 'cp /tmp/bottlenecks.stress.ping.out {{result_dir}}' + - 'rm {{image_file}}' + openrc: {{openrc_file}} extra_container: - 'Bottlenecks-Yardstick' - 'Bottlenecks-ELK' |