X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fdovetail%2Fdovetail-run.sh;h=e914ae1a2d78547a25291e5c03ecca5fc738db2f;hb=824a278e82c9bc5217d6f7c3d99511eb23334f70;hp=04b11fdd1366af345511ef4945b1cb21f71ece52;hpb=871235891d792631dc0d2d4c2af89141fa5928e4;p=releng.git diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 04b11fdd1..e914ae1a2 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -35,6 +35,8 @@ ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" sshkey="" +TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results + check_file_exists() { if [[ -f $1 ]]; then echo 0 @@ -77,10 +79,6 @@ get_apex_cred_file() { get_cred_file_with_scripts } -get_compass_cred_file() { - get_cred_file_with_scripts -} - get_fuel_cred_file() { get_cred_file_with_scripts } @@ -99,9 +97,7 @@ change_cred_file_cacert_path() { exists=`check_file_exists ${CACERT}` if [[ $exists == 0 ]]; then echo "INFO: set ${INSTALLER_TYPE} openstack cacert file to be ${CACERT}" - if [[ ${INSTALLER_TYPE} == "compass" ]]; then - echo "export OS_CACERT=${CACERT}" >> ${OPENRC} - elif [[ ${INSTALLER_TYPE} == "fuel" ]]; then + if [[ ${INSTALLER_TYPE} == "fuel" ]]; then sed -i "s#/etc/ssl/certs/mcp_os_cacert#${CACERT}#g" ${OPENRC} fi else @@ -125,8 +121,6 @@ change_cred_file_ext_net() { get_cred_file() { if [[ ${INSTALLER_TYPE} == 'apex' ]]; then get_apex_cred_file - elif [[ ${INSTALLER_TYPE} == 'compass' ]]; then - get_compass_cred_file elif [[ ${INSTALLER_TYPE} == 'fuel' ]]; then get_fuel_cred_file elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then @@ -150,30 +144,6 @@ get_cred_file() { fi } -get_compass_pod_file() { - compass_repo=${WORKSPACE}/compass4nfv/ - echo "INFO: clone compass repo..." - git clone https://github.com/opnfv/compass4nfv.git ${compass_repo} >/dev/null - 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) - ipmiUser=root - jumpserver_ip=$(ifconfig | grep -A 5 docker0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1) - - cat << EOF >${POD} -nodes: -- {ip: ${jumpserver_ip}, name: node0, password: root, role: Jumpserver, user: root} -- {ip: 10.1.0.50, name: node1, password: root, role: controller, user: root, - ipmi_ip: ${ipmiIp}, ipmi_user: ${ipmiUser}, ipmi_password: ${ipmiPass}} -- {ip: 10.1.0.51, name: node2, password: root, role: controller, user: root} -- {ip: 10.1.0.52, name: node3, password: root, role: controller, user: root} -- {ip: 10.1.0.53, name: node4, password: root, role: compute, user: root} -- {ip: 10.1.0.54, name: node5, password: root, role: compute, user: root} - -EOF - -} - get_fuel_baremetal_pod_file() { fuel_ctl_ssh_options="${ssh_options} -i ${SSH_KEY}" ssh_user="ubuntu" @@ -204,13 +174,13 @@ get_fuel_baremetal_pod_file() { cat << EOF >${POD} nodes: -- {ip: ${INSTALLER_IP}, name: node0, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, +- {ip: ${INSTALLER_IP}, name: node0, key_filename: ${DOVETAIL_CONFIG}/id_rsa, role: Jumpserver, user: ${ssh_user}} -- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, +- {ip: ${fuel_ctl_ip}, name: node1, key_filename: ${DOVETAIL_CONFIG}/id_rsa, role: controller, user: ${ssh_user}, ipmi_ip: ${ipmiIp}, ipmi_user: ${ipmiUser}, ipmi_password: ${ipmiPass}} -- {ip: ${fuel_msg_ip}, name: msg01, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, role: controller, user: ${ssh_user}} -- {ip: ${fuel_cmp_ip}, name: cmp01, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, role: controller, user: ${ssh_user}} -- {ip: ${fuel_dbs_ip}, name: dbs01, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, role: controller, user: ${ssh_user}} +- {ip: ${fuel_msg_ip}, name: msg01, key_filename: ${DOVETAIL_CONFIG}/id_rsa, role: controller, user: ${ssh_user}} +- {ip: ${fuel_cmp_ip}, name: cmp01, key_filename: ${DOVETAIL_CONFIG}/id_rsa, role: controller, user: ${ssh_user}} +- {ip: ${fuel_dbs_ip}, name: dbs01, key_filename: ${DOVETAIL_CONFIG}/id_rsa, role: controller, user: ${ssh_user}} EOF } @@ -224,9 +194,7 @@ get_pod_file_with_scripts() { sudo pip install -e ./ >/dev/null sudo pip install netaddr - if [[ ${INSTALLER_TYPE} == compass ]]; then - options="-u root -p root" - elif [[ ${INSTALLER_TYPE} == fuel ]]; then + if [[ ${INSTALLER_TYPE} == fuel ]]; then options="-u ubuntu -k /root/.ssh/id_rsa" elif [[ ${INSTALLER_TYPE} == apex ]]; then options="-u stack -k /root/.ssh/id_rsa" @@ -239,7 +207,7 @@ get_pod_file_with_scripts() { cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ -i ${INSTALLER_IP} ${options} -f ${POD} \ - -s /home/opnfv/userconfig/pre_config/id_rsa" + -s ${DOVETAIL_CONFIG}/id_rsa" echo "INFO: cmd is ${cmd}" ${cmd} @@ -266,13 +234,6 @@ process_info: EOF } -change_compass_pod_file_process_info() { - cat << EOF >> ${POD} -process_info: -- {testcase_name: yardstick.ha.rabbitmq, attack_process: rabbitmq} -EOF -} - change_pod_file_process_info() { sudo chmod 666 ${POD} echo "INFO: adapt process info for $INSTALLER_TYPE ..." @@ -280,8 +241,6 @@ change_pod_file_process_info() { change_apex_pod_file_process_info elif [ "$INSTALLER_TYPE" == "fuel" ]; then change_fuel_pod_file_process_info - elif [ "$INSTALLER_TYPE" == "compass" ]; then - change_compass_pod_file_process_info fi } @@ -290,9 +249,7 @@ get_pod_file() { sudo pip install shyaml sudo yum install -y rubygems || sudo apt-get install -y ruby sudo gem install hiera-eyaml - if [[ ${INSTALLER_TYPE} == 'compass' ]]; then - get_compass_pod_file - elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then + if [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then get_fuel_baremetal_pod_file fi @@ -402,7 +359,10 @@ fi echo "Dovetail: Pulling image ${DOCKER_REPO}:${DOCKER_TAG}" docker pull ${DOCKER_REPO}:$DOCKER_TAG >$redirect -cmd="docker run ${opts} -e DOVETAIL_HOME=${DOVETAIL_HOME} ${docker_volume} ${dovetail_home_volume} \ +cmd="docker run ${opts} -e DOVETAIL_HOME=${DOVETAIL_HOME} -e INSTALLER_TYPE=${INSTALLER_TYPE} \ + -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} -e NODE_NAME=${NODE_NAME} -e BUILD_TAG=${BUILD_TAG} \ + -e TEST_DB_URL=${TEST_DB_URL} -e VERSION=${SUT_BRANCH} \ + ${docker_volume} ${dovetail_home_volume} \ ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} /bin/bash" echo "Dovetail: running docker run command: ${cmd}" ${cmd} >${redirect} @@ -425,7 +385,7 @@ fi # Modify tempest_conf.yaml file tempest_conf_file=${DOVETAIL_CONFIG}/tempest_conf.yaml -if [[ ${INSTALLER_TYPE} == 'compass' || ${INSTALLER_TYPE} == 'apex' ]]; then +if [[ ${INSTALLER_TYPE} == 'apex' ]]; then volume_device='vdb' else volume_device='vdc' @@ -462,7 +422,7 @@ else testarea="--testarea ${TESTAREA}" fi -run_cmd="dovetail run ${testsuite} ${testarea} --deploy-scenario ${DEPLOY_SCENARIO} -d -r" +run_cmd="dovetail run ${testsuite} ${testarea} --deploy-scenario ${DEPLOY_SCENARIO} -d -r --opnfv-ci" echo "Container exec command: ${run_cmd}" docker exec $container_id ${run_cmd}