bugfix: fix prepare_env.sh shell quote
[yardstick.git] / tests / ci / load_images.sh
index e73d7e8..caaba9e 100755 (executable)
@@ -63,11 +63,11 @@ 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_property="normal" \
+                     -vvv -i inventory.ini build_yardstick_image.yml
 
             if [ ! -f "${QCOW_IMAGE}" ]; then
                 echo "Failed building QCOW image"
@@ -133,7 +133,7 @@ load_cirros_image()
         CIRROS_IMAGE_PATH="/home/opnfv/images/cirros-d161201-aarch64-disk.img"
         EXTRA_PARAMS="--property hw_video_model=vga --property short_id=ubuntu16.04"
     else
-        CIRROS_IMAGE_VERSION="Cirros-0.3.5"
+        CIRROS_IMAGE_VERSION="cirros-0.3.5"
         CIRROS_IMAGE_PATH="/home/opnfv/images/cirros-0.3.5-x86_64-disk.img"
     fi
 
@@ -209,7 +209,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