diff options
author | mbeierl <mark.beierl@dell.com> | 2017-09-20 19:45:45 -0400 |
---|---|---|
committer | Taseer Ahmed <taseer94@gmail.com> | 2017-10-11 11:45:13 +0500 |
commit | 237664a32c2212953733f0f808810543c440d123 (patch) | |
tree | dabed9bdb900d9c352825beccbb13a7bab057566 | |
parent | d45e5a980fc4f75f0f9abed929705da32e9f2fcf (diff) |
Adding FUEL Support
Changes to Ubuntu 17.04 to overcome issue in 4.4
kernel on ARM for hotplug of cinder volumes.
Adds support for FUEL MCP certificate for SSL
communication with OpenStack.
Hard codes the target device to /dev/vdc for FUEL
as /dev/vdb is reserved for the OpenStack config
drive.
Change-Id: I17dae23f455448f632e0921dbdae45824bbeaa61
Signed-off-by: mbeierl <mark.beierl@dell.com>
-rwxr-xr-x | ci/create_glance_image.sh | 15 | ||||
-rwxr-xr-x | ci/daily.sh | 6 | ||||
-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 | ||||
-rw-r--r-- | docker-compose/create-compose.py | 13 | ||||
-rw-r--r-- | docker-compose/docker-compose.yaml | 3 |
7 files changed, 51 insertions, 22 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 3278e4a..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}" @@ -83,8 +85,6 @@ echo "========================================================================== echo "Starting run of ${WORKLOAD} ${BLOCK_SIZE} ${QUEUE_DEPTH}" echo "==========================================================================" -exit 0 - JOB=$("${WORKSPACE}/ci/start_job.sh" \ | awk '/job_id/ {print $2}' | sed 's/"//g') curl -s -X GET "http://127.0.0.1:5000/api/v1.0/jobs?id=${JOB}&type=status" \ 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}", diff --git a/docker-compose/create-compose.py b/docker-compose/create-compose.py index 1a63336..3e3b0c0 100644 --- a/docker-compose/create-compose.py +++ b/docker-compose/create-compose.py @@ -26,6 +26,8 @@ services: container_name: "storperf-master" image: "opnfv/storperf-master:{storperf_tag}" env_file: {ENV_FILE} + volumes: + - ./certs:/etc/ssl/certs/ links: - storperf-graphite @@ -54,19 +56,20 @@ services: - storperf-swaggerui - storperf-graphite ''' -storeperf_tag = input("Enter image TAG for storperf-master: ") or 'latest' +storeperf_tag = input("Enter image TAG for storperf-master: ") \ + or 'x86_64-latest' assert isinstance(storeperf_tag, str) -reporting_tag = input("Enter image TAG for reporting: ") or 'latest' +reporting_tag = input("Enter image TAG for reporting: ") or 'x86_64-latest' assert isinstance(reporting_tag, str) -frontend_tag = input("Enter image TAG for frontend: ") or 'latest' +frontend_tag = input("Enter image TAG for frontend: ") or 'x86_64-latest' assert isinstance(frontend_tag, str) -graphite_tag = input("Enter image TAG for graphite: ") or 'latest' +graphite_tag = input("Enter image TAG for graphite: ") or 'x86_64-latest' assert isinstance(graphite_tag, str) -swaggerui_tag = input("Enter image TAG for swaggerui: ") or 'latest' +swaggerui_tag = input("Enter image TAG for swaggerui: ") or 'x86_64-latest' assert isinstance(swaggerui_tag, str) env_file = input("Enter path to environment file: ") diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index 734fb5b..7280d90 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -13,6 +13,8 @@ services: container_name: "storperf-master" image: "opnfv/storperf-master:${TAG}" env_file: ${ENV_FILE} + volumes: + - ./certs:/etc/ssl/certs/ links: - storperf-graphite @@ -30,6 +32,7 @@ services: volumes: - ${CARBON_DIR}:/opt/graphite/storage/whisper + storperf-httpfrontend: container_name: "storperf-httpfrontend" image: "opnfv/storperf-httpfrontend:${TAG}" |