sshkey=""
+TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results
+
check_file_exists() {
if [[ -f $1 ]]; then
echo 0
get_cred_file_with_scripts
}
-get_compass_cred_file() {
- get_cred_file_with_scripts
-}
-
get_fuel_cred_file() {
get_cred_file_with_scripts
}
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
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
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"
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
}
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"
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}
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 ..."
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
}
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
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}
# 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'
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}