diff options
author | QiLiang <liangqi1@huawei.com> | 2016-01-08 01:27:55 +0000 |
---|---|---|
committer | QiLiang <liangqi1@huawei.com> | 2016-01-09 02:44:43 +0000 |
commit | 6e490df0346e26f9e6cc5dc79029a03e1d17a454 (patch) | |
tree | 04333ceadab525e1b89497f88f7919ecb9865dc0 | |
parent | 27a84e7905e66c005b02706ea3489576b5873c32 (diff) |
Rubbos test case pipline minor update
- Add timestamp
- Fix code pull bug
- Shoten test run time
JIRA: BOTTLENECK-24
Change-Id: Ie83fcf0e4a4ad2da715a694118f1f9e916a5f704
Signed-off-by: QiLiang <liangqi1@huawei.com>
4 files changed, 36 insertions, 23 deletions
diff --git a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh index 62c3c6cb..58b4ebe5 100644 --- a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh +++ b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos-servletsBO.sh @@ -47,8 +47,8 @@ done #ssh $CLIENT3_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client #ssh $CLIENT4_HOST "$RUBBOS_HOME/bench/flush_cache 490000" # remote client -RAMPUP=480000 -MI=720000 +RAMPUP=48000 +MI=72000 current_seconds=`date +%s` start_seconds=`echo \( $RAMPUP / 1000 \) + $current_seconds - 60 | bc` SMI=`date -d "1970-01-01 $start_seconds secs UTC" +%Y%m%d%H%M%S` @@ -61,7 +61,9 @@ do ssh $scp_options $host "sudo nice -n -1 $RUBBOS_APP/cpu_mem.sh $SMI $EMI" & done +echo "Rubbos emulator start $(date)" make emulator +echo "Rubbos emulator end $(date)" set -x diff --git a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos.properties_template b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos.properties_template index 5da71987..0e8a4b43 100644 --- a/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos.properties_template +++ b/rubbos/rubbos_scripts/1-1-1/rubbos_conf/rubbos.properties_template @@ -43,11 +43,11 @@ workload_maximum_number_of_transitions = 1000 workload_use_tpcw_think_time = yes workload_number_of_stories_per_page = 20 -workload_up_ramp_time_in_ms = 480000 +workload_up_ramp_time_in_ms = 48000 workload_up_ramp_slowdown_factor = 2 -workload_session_run_time_in_ms = 720000 -workload_down_ramp_time_in_ms = 30000 +workload_session_run_time_in_ms = 72000 +workload_down_ramp_time_in_ms = 3000 workload_down_ramp_slowdown_factor = 3 workload_percentage_of_author = 10 diff --git a/utils/infra_setup/heat_template/HOT_create_instance.sh b/utils/infra_setup/heat_template/HOT_create_instance.sh index 8266229b..eadaac2b 100755 --- a/utils/infra_setup/heat_template/HOT_create_instance.sh +++ b/utils/infra_setup/heat_template/HOT_create_instance.sh @@ -6,6 +6,8 @@ GERRIT_REFSPEC_DEBUG=$1 bottlenecks_env_prepare() { + echo "Bottlenecks env prepare start $(date)" + if [ -d $BOTTLENECKS_REPO_DIR ]; then rm -rf ${BOTTLENECKS_REPO_DIR} fi @@ -21,6 +23,8 @@ bottlenecks_env_prepare() source $BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts/env_preparation.sh chmod 600 $KEY_PATH/bottlenecks_key + + echo "Bottlenecks env prepare end $(date)" } wait_heat_stack_complete() { @@ -39,7 +43,8 @@ wait_heat_stack_complete() { exit 1 fi - if [ $BOTTLENECKS_DEBUG = True ]; then + #if [ $BOTTLENECKS_DEBUG = True ]; then + if false; then heat stack-show bottlenecks nova list | grep rubbos_ for i in $(nova list | grep rubbos_ | grep ERROR | awk '{print $2}') @@ -75,7 +80,7 @@ wait_rubbos_control_ok() { bottlenecks_check_instance_ok() { - echo "check instance" + echo "Bottlenecks check instance ok start $(date)" wait_heat_stack_complete 120 wait_rubbos_control_ok 300 @@ -101,11 +106,13 @@ bottlenecks_check_instance_ok() sleep 10 done fi + + echo "Bottlenecks check instance ok end $(date)" } bottlenecks_create_instance() { - echo "create bottlenecks instance using heat template" + echo "Bottlenecks create instance using heat template start $(date)" echo "upload keypair" nova keypair-add --pub_key $KEY_PATH/bottlenecks_key.pub $KEY_NAME @@ -117,6 +124,8 @@ bottlenecks_create_instance() cd $HOT_PATH heat stack-create bottlenecks -f ${TEMPLATE_NAME} \ -P "image=$IMAGE_NAME;key_name=$KEY_NAME;public_net=$PUBLIC_NET_NAME;flavor=$FLAVOR_NAME" + + echo "Bottlenecks create instance using heat template end $(date)" } bottlenecks_rubbos_wait_finish() @@ -125,14 +134,7 @@ bottlenecks_rubbos_wait_finish() retry=0 while true do - ssh $ssh_args ec2-user@$control_ip " - FILE=/tmp/rubbos_finished - if [ -f \$FILE ]; then - exit 0 - else - exit 1 - fi - " + ssh $ssh_args ec2-user@$control_ip "FILE=/tmp/rubbos_finished; if [ -f \$FILE ]; then exit 0; else exit 1; fi" if [ $? = 0 ]; then echo "Rubbos test case successfully finished :)" return 0 @@ -171,14 +173,14 @@ bottlenecks_rubbos_run() ssh $ssh_args \ ec2-user@$control_ip "bash /tmp/vm_dev_setup/setup_env.sh" & - bottlenecks_rubbos_wait_finish 240 + bottlenecks_rubbos_wait_finish 80 rm -rf $BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup/hosts.conf } bottlenecks_cleanup() { - echo "clean up bottlenecks images and keys" + echo "Bottlenecks cleanup start $(date)" if heat stack-list; then for stack in $(heat stack-list | grep -e bottlenecks | awk '{print $2}'); do @@ -208,11 +210,13 @@ bottlenecks_cleanup() nova flavor-delete $flavor || true done fi + + echo "Bottlenecks cleanup end $(date)" } bottlenecks_load_bottlenecks_image() { - echo "load bottlenecks image" + echo "Bottlenecks load image start $(date)" curl --connect-timeout 10 -o /tmp/bottlenecks-trusty-server.img $IMAGE_URL -v @@ -231,12 +235,12 @@ bottlenecks_load_bottlenecks_image() exit 1 fi - echo "bottlenecks image id: $IMAGE_ID_BOTTLENECKS" + echo "bottlenecks image end id: $IMAGE_ID_BOTTLENECKS $(date)" } main() { - echo "create instances with heat template" + echo "main start $(date)" BOTTLENECKS_DEBUG=True BOTTLENECKS_REPO=https://gerrit.opnfv.org/gerrit/bottlenecks @@ -253,12 +257,14 @@ main() ssh_args="-o StrictHostKeyChecking=no -o BatchMode=yes -i $KEY_PATH/bottlenecks_key" bottlenecks_env_prepare + set -x bottlenecks_cleanup bottlenecks_load_bottlenecks_image bottlenecks_create_instance bottlenecks_check_instance_ok bottlenecks_rubbos_run bottlenecks_cleanup + echo "main end $(date)" } main diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh index f1572e05..795a0a6a 100755 --- a/utils/infra_setup/vm_dev_setup/setup_env.sh +++ b/utils/infra_setup/vm_dev_setup/setup_env.sh @@ -55,18 +55,22 @@ bottlenecks_download_repo() { echo "Bottlenecks: download bottlenecks repo" + sudo git config --global http.sslVerify false if [ -d $BOTTLENECKS_REPO_DIR/.git ]; then cd $BOTTLENECKS_REPO_DIR sudo git pull origin master if [ x"$GERRIT_REFSPEC_DEBUG" != x ]; then - sudo git fetch $BOTTLENECKS_REPO $GERRIT_REFSPEC_DEBUG && git checkout FETCH_HEAD + sudo git fetch $BOTTLENECKS_REPO $GERRIT_REFSPEC_DEBUG && sudo git checkout FETCH_HEAD fi cd - else sudo rm -rf $BOTTLENECKS_REPO_DIR sudo git clone $BOTTLENECKS_REPO $BOTTLENECKS_REPO_DIR if [ x"$GERRIT_REFSPEC_DEBUG" != x ]; then - sudo git fetch $BOTTLENECKS_REPO $GERRIT_REFSPEC_DEBUG && git checkout FETCH_HEAD + cd $BOTTLENECKS_REPO_DIR + echo "fetch $GERRIT_REFSPEC_DEBUG" + sudo git fetch $BOTTLENECKS_REPO $GERRIT_REFSPEC_DEBUG && sudo git checkout FETCH_HEAD + cd - fi fi @@ -116,6 +120,7 @@ main() source $SCRIPT_DIR/common.sh bottlenecks_prepare_env + set -x bottlenecks_download_repo bottlenecks_config_hosts_ip bottlenecks_download_packages |