Update Rally gates to support VM scenarios

Add "extra" directory for rally scenarios in gates. All files
from this directory will be copy pasted so we will be able to use
them in gates, because the path will be determined.

Also, print information about test environnement like available
services, flavors, images, networks, security groups and keypairs.

Change-Id: I19dd861beb11fb7ffdcf353f69759d841e7e8a01
This commit is contained in:
Bruno Semperlotti 2014-06-17 14:12:13 +00:00 committed by Boris Pavlovic
parent 4c77a8748d
commit fcfb66d468
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#!/bin/sh
time_seconds(){ (time -p $1 ) 2>&1 |awk '/real/{print $2}'; }
file=/tmp/test.img
c=1000 #1GB
write_seq_1gb=$(time_seconds "dd if=/dev/zero of=$file bs=1M count=$c")
read_seq_1gb=$(time_seconds "dd if=$file of=/dev/null bs=1M")
[ -f $file ] && rm $file
echo "{
\"write_seq_1gb\": $write_seq_1gb,
\"read_seq_1gb\": $read_seq_1gb
}"

View File

@ -17,13 +17,25 @@
PROJECT=`echo $ZUUL_PROJECT | cut -d \/ -f 2`
SCENARIO=$BASE/new/$PROJECT/rally-scenarios/${RALLY_SCENARIO}.yaml
PLUGINS_DIR=$BASE/new/$PROJECT/rally-scenarios/plugins
EXTRA_DIR=$BASE/new/$PROJECT/rally-scenarios/extra
if [ -d $PLUGINS_DIR ]; then
mkdir -p ~/.rally/plugins/scenarios
cp $PLUGINS_DIR/*.py ~/.rally/plugins/scenarios/
cp -r $PLUGINS_DIR/*.py ~/.rally/plugins/scenarios/
fi
if [ -d $EXTRA_DIR ]; then
mkdir -p ~/.rally/extra
cp -r $EXTRA_DIR/* ~/.rally/extra/
fi
rally use deployment --name devstack
rally deployment check
rally show flavors
rally show images
rally show networks
rally show secgroups
rally show keypairs
rally -v task start --task $SCENARIO
mkdir rally-plot
rally task plot2html --out rally-plot/results.html