X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fdovetail%2Fdovetail-run.sh;h=df681dd5999adefdcaf1e9cbb5b1dfb87789ba6b;hb=554f2b6b58f720960dadea8de57260b8944fba2c;hp=1c53dbee440d138878f89654d89a27a88b0db25f;hpb=14b5f30468a96c5e400d2139caac7c52a1542b26;p=releng.git diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 1c53dbee4..df681dd59 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -81,6 +81,7 @@ if [[ -f $OPENRC ]]; then exit 1 fi fi + echo "export EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" >> ${OPENRC} else echo "ERROR: cannot find file $OPENRC. Please check if it is existing." sudo ls -al ${DOVETAIL_CONFIG} @@ -95,7 +96,7 @@ cat $OPENRC if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "compass" ]]; then compass_repo=${WORKSPACE}/compass4nfv/ git clone https://github.com/opnfv/compass4nfv.git ${compass_repo} >/dev/null - pip install shyaml + sudo pip install shyaml scenario_file=${compass_repo}/deploy/conf/hardware_environment/$NODE_NAME/os-nosdn-nofeature-ha.yml ipmiIp=$(cat ${scenario_file} | shyaml get-value hosts.0.ipmiIp) ipmiPass=$(cat ${scenario_file} | shyaml get-value hosts.0.ipmiPass) @@ -123,7 +124,7 @@ if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_T awk '{print \$2; exit}'") &> /dev/null cat << EOF >${DOVETAIL_CONFIG}/pod.yaml nodes: -- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /root/.ssh/id_rsa, role: controller, user: ${ssh_user}} +- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, role: controller, user: ${ssh_user}} EOF fi @@ -153,7 +154,8 @@ if [[ ! -f ${DOVETAIL_CONFIG}/pod.yaml ]]; then fi cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ - -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml" + -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml \ + -s /home/opnfv/userconfig/pre_config/id_rsa" echo ${cmd} ${cmd} @@ -165,7 +167,7 @@ if [[ ! -f ${DOVETAIL_CONFIG}/pod.yaml ]]; then fi if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then - sudo chown jenkins:jenkins ${DOVETAIL_CONFIG}/pod.yaml + sudo chmod 666 ${DOVETAIL_CONFIG}/pod.yaml echo "Adapt process info for $INSTALLER_TYPE ..." attack_process='rabbitmq' cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml @@ -213,7 +215,7 @@ if [[ ! -f ${ubuntu_image} ]]; then fi sudo cp ${ubuntu_image} ${DOVETAIL_IMAGES} -# functest needs to download this image first before running +# yardstick and bottlenecks need to download this image first before running cirros_image=${image_path}/cirros-0.3.5-x86_64-disk.img if [[ ! -f ${cirros_image} ]]; then echo "Download image cirros-0.3.5-x86_64-disk.img ..." @@ -221,6 +223,14 @@ if [[ ! -f ${cirros_image} ]]; then fi sudo cp ${cirros_image} ${DOVETAIL_IMAGES} +# functest needs to download this image first before running +cirros_image=${image_path}/cirros-0.4.0-x86_64-disk.img +if [[ ! -f ${cirros_image} ]]; then + echo "Download image cirros-0.4.0-x86_64-disk.img ..." + wget -q -nc http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img -P ${image_path} +fi +sudo cp ${cirros_image} ${DOVETAIL_IMAGES} + # snaps_smoke test case needs to download this image first before running ubuntu14_image=${image_path}/ubuntu-14.04-server-cloudimg-amd64-disk1.img if [[ ! -f ${ubuntu14_image} ]]; then @@ -314,14 +324,16 @@ docker exec $container_id ${run_cmd} sudo cp -r ${DOVETAIL_HOME}/results ./ # To make sure the file owner is the current user, for the copied results files in the above line -# if not, there will be error when next time to wipe workspace -# CURRENT_USER=${SUDO_USER:-$USER} -# PRIMARY_GROUP=$(id -gn $CURRENT_USER) -# sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results +echo "Change owner of result files ..." +CURRENT_USER=${SUDO_USER:-$USER} +PRIMARY_GROUP=$(id -gn $CURRENT_USER) +echo "Current user is ${CURRENT_USER}, group is ${PRIMARY_GROUP}" +sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ./results #remove useless files to save disk space sudo rm -rf ./results/workspace sudo rm -f ./results/yardstick.img +sudo rm -f ./results/tmp* echo "Dovetail: done!"