diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/create_glance_image.sh | 15 | ||||
-rwxr-xr-x | ci/daily.sh | 4 | ||||
-rwxr-xr-x | ci/generate-admin-rc.sh | 25 | ||||
-rwxr-xr-x | ci/generate-environment.sh | 10 | ||||
-rwxr-xr-x | ci/start_job.sh | 1 |
5 files changed, 40 insertions, 15 deletions
diff --git a/ci/create_glance_image.sh b/ci/create_glance_image.sh index e99de8c..9181a05 100755 --- a/ci/create_glance_image.sh +++ b/ci/create_glance_image.sh @@ -8,9 +8,12 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +cd "$(dirname "$0")" || exit +mkdir -p job + ARCH="${ARCH:-$(uname -m)}" -IMAGE_NAME="Ubuntu 16.04 ${ARCH}" +IMAGE_NAME="Ubuntu 17.04 ${ARCH}" echo "Checking for ${IMAGE_NAME} in Glance" @@ -21,14 +24,14 @@ then case "${ARCH}" in aarch64) - FILE=ubuntu-16.04-server-cloudimg-arm64-uefi1.img + FILE=ubuntu-17.04-server-cloudimg-arm64.img PROPERTIES="--property hw_firmware_type=uefi --property hw_video_model=vga" ;; armhf) - FILE=ubuntu-16.04-server-cloudimg-armhf-disk1.img + FILE=ubuntu-17.04-server-cloudimg-armhf.img ;; x86_64) - FILE=ubuntu-16.04-server-cloudimg-amd64-disk1.img + FILE=ubuntu-17.04-server-cloudimg-amd64.img ;; *) echo "Unsupported architecture: ${ARCH}" @@ -36,10 +39,12 @@ then ;; esac - wget --continue -q "https://cloud-images.ubuntu.com/releases/16.04/release/${FILE}" + wget --continue -q "https://cloud-images.ubuntu.com/releases/17.04/release/${FILE}" openstack image create "${IMAGE_NAME}" --disk-format qcow2 --public \ ${PROPERTIES} \ --container-format bare --file "${FILE}" fi openstack image show "${IMAGE_NAME}" + +echo "${IMAGE_NAME}" > job/glance_image_name diff --git a/ci/daily.sh b/ci/daily.sh index 0170b41..0957e09 100755 --- a/ci/daily.sh +++ b/ci/daily.sh @@ -36,9 +36,11 @@ pip install python-openstackclient==3.7.0 pip install python-heatclient==1.7.0 "${WORKSPACE}/ci/generate-admin-rc.sh" + echo "TEST_DB_URL=http://testresults.opnfv.org/test/api/v1" >> "${WORKSPACE}/ci/job/admin.rc" "${WORKSPACE}/ci/generate-environment.sh" + # shellcheck source=/dev/null source "${WORKSPACE}/ci/job/environment.rc" @@ -61,7 +63,6 @@ export VOLUME_SIZE=${VOLUME_SIZE:-2} export WORKLOADS=${WORKLOADS:-ws,rs,rw} ARCH="${ARCH:-$(uname -m)}" -IMAGE_NAME="Ubuntu 16.04 ${ARCH}" echo ========================================================================== echo Environment @@ -71,6 +72,7 @@ echo ========================================================================== "$WORKSPACE/ci/remove_docker_container.sh" "$WORKSPACE/ci/delete_stack.sh" "$WORKSPACE/ci/create_glance_image.sh" +IMAGE_NAME=$(cat $WORKSPACE/ci/job/glance_image_name) "$WORKSPACE/ci/create_storperf_flavor.sh" "$WORKSPACE/ci/launch_docker_container.sh" "$WORKSPACE/ci/create_stack.sh" "${AGENT_COUNT}" "${VOLUME_SIZE}" "${IMAGE_NAME}" "${NETWORK}" diff --git a/ci/generate-admin-rc.sh b/ci/generate-admin-rc.sh index e1e6bc9..6767fab 100755 --- a/ci/generate-admin-rc.sh +++ b/ci/generate-admin-rc.sh @@ -10,16 +10,14 @@ cd $(dirname "$0") -if [ ! -d job ] -then - mkdir job -fi +mkdir -p job SSH_KEY="" +CA_CERT="" INSTALLER="$(./detect_installer.sh)" case $INSTALLER in joid) - OS_AUTH_URL=http://`juju status keystone | grep public | awk '{print $2}'`:5000/v2.0 + OS_AUTH_URL=http://$(juju status keystone | grep public | awk '{print $2}'):5000/v2.0 OS_USERNAME=admin OS_PASSWORD=openstack cat << EOF > job/openstack.rc @@ -31,12 +29,23 @@ export OS_PROJECT_NAME=admin EOF ;; fuel) - INSTALLER_IP=$(sudo virsh domifaddr cfg01 | grep ipv4 | awk '{print $4}' | cut -d/ -f1) + INSTALLER_IP=$(sudo virsh net-dumpxml mcpcontrol | grep 'cfg01' | cut -d"'" -f6) + if [ -z "${INSTALLER_IP}" ] ; then + echo "Could not find FUEL installer IP" + exit 1 + fi export BRANCH="${BRANCH:-master}" + export BUILD_TAG="${BUILD_TAG:-baremetal}" SSH_KEY="-s /var/lib/opnfv/mcp.rsa" + mkdir -p ../docker-compose/certs + CA_CERT="-o ../docker-compose/certs/mcp_os_cacert" ;; apex) INSTALLER_IP=$(sudo virsh domifaddr undercloud | grep ipv4 | awk '{print $4}' | cut -d/ -f1) + if [ -z "${INSTALLER_IP}" ] ; then + echo "Could not find Apex installer IP" + exit 1 + fi ;; *) echo "Unknown installer ${INSTALLER}" @@ -45,12 +54,12 @@ esac if [ ! -z "${INSTALLER_IP}" ] then - CMD="./job/releng/utils/fetch_os_creds.sh -i $INSTALLER -a $INSTALLER_IP $SSH_KEY -d job/openstack.rc" + CMD="./job/releng/utils/fetch_os_creds.sh -i $INSTALLER -a $INSTALLER_IP $CA_CERT $SSH_KEY -d job/openstack.rc" echo $CMD $CMD echo export OS_PROJECT_NAME=admin >> job/openstack.rc fi -grep "export" job/openstack.rc | sed "s/export //" > job/admin.rc +awk '/export / { gsub(/"/, x); print $2}' job/openstack.rc > job/admin.rc echo "INSTALLER_TYPE=${INSTALLER}" >> job/admin.rc diff --git a/ci/generate-environment.sh b/ci/generate-environment.sh index c65dc17..79bd20f 100755 --- a/ci/generate-environment.sh +++ b/ci/generate-environment.sh @@ -16,6 +16,7 @@ fi ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" export INSTALLER=`./detect_installer.sh` +TARGET="/dev/vdb" case $INSTALLER in joid) @@ -36,6 +37,12 @@ case $INSTALLER in # juju status | grep hardware: | grep tags | grep -v virtual NETWORK=ext-net ;; + fuel) + CINDER_BACKEND=LVM + CINDER_NODES=4 + NETWORK=floating_net + TARGET="/dev/vdc" + ;; apex) INSTALLER_IP=`sudo virsh domifaddr undercloud | grep ipv4 | awk '{print $4}' | cut -d/ -f1` CINDER_BACKEND=ceph @@ -54,4 +61,5 @@ export CINDER_BACKEND=$CINDER_BACKEND export CINDER_NODES=$CINDER_NODES export INSTALLER=$INSTALLER export NETWORK=$NETWORK -EOF
\ No newline at end of file +export TARGET=$TARGET +EOF diff --git a/ci/start_job.sh b/ci/start_job.sh index 715d40a..6991a0c 100755 --- a/ci/start_job.sh +++ b/ci/start_job.sh @@ -15,6 +15,7 @@ cat << EOF > body.json "steady_state_samples": ${STEADY_STATE_SAMPLES}, "queue_depths": "${QUEUE_DEPTH}", "workload": "${WORKLOAD}", + "target": "${TARGET}", "metadata": { "disk_type": "${DISK_TYPE}", "pod_name": "${POD_NAME}", |