3 # installs dpdk and pktgen packages on modified image
6 # modified image (yardstick-wily-server) must be uploaded to OpenStack
7 # heat must be installed: apt-get install python-heatclient, python-glanceclient, python-nova
8 # must have a public yardstick-key uploaded in openstack
9 # must have a proper flavor for the image (i.e. m1.small)
12 stackname="yardstick-modify-stack"
13 template=dpdk_install.yml
14 new_image_name="yardstick-image-pktgen-ready"
16 openstack stack create $stackname -f yaml -t $template
19 while [ "$progress" != "CREATE_COMPLETE" ]
22 echo "check stack status......."
23 show_output=$(openstack stack show $stackname)
24 progress=$(echo $show_output | sed 's/^.*stack_status . \([^ ]*\).*$/\1/')
26 if [ "$progress" == "CREATE_FAILED" ];then
27 echo "create $stackname failed"
32 # workaround: Without wait time, the file size of pktgen is zero in the snapshot.
35 status=$(nova image-create --poll $stackname $new_image_name)
36 if [[ "$status" =~ "Finished" ]];then
37 echo "$new_image_name finished"
40 nova delete $stackname
42 openstack stack delete --yes $stackname