From 0acb4fcc133056f9fb401b6e23d70f6ec895302a Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Mon, 2 Oct 2017 12:09:24 -0400 Subject: Update deliveries for portal deployment Use onap (not openecomp) in Nexus tag. Revise environment variables suitable for Rackspace via HEAT. Use registry nexus.onap.org:10001 instead of port 1003. Drop portal_vm_init.sh; moved back to ONAP demo repo. Issue: PORTAL-90 Change-Id: Ib51668eceff851db0271cd6acb2bdecf08cafa06 Signed-off-by: Christopher Lott (cl778h) --- deliveries/.env | 23 +++++++++++-------- deliveries/.gitignore | 1 + deliveries/docker-compose.yml | 2 +- deliveries/os_docker_base.sh | 15 ++++++------ deliveries/portal_vm_init.sh | 53 ------------------------------------------- 5 files changed, 23 insertions(+), 71 deletions(-) delete mode 100755 deliveries/portal_vm_init.sh (limited to 'deliveries') diff --git a/deliveries/.env b/deliveries/.env index c67f43f4..1e713aec 100644 --- a/deliveries/.env +++ b/deliveries/.env @@ -1,19 +1,22 @@ # Environment settings # used by docker-compose AND by other shell scripts -# Host directories; must be writable -LOGS_DIR=/PROJECT/OpenSource/UbuntuEP/logs -PROPS_DIR=/PROJECT/OpenSource/UbuntuEP/properties - -# Directory within containers (not host) -WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps +# Source of images +NEXUS_REPO=nexus3.onap.org:10001 # Following are ALSO used in demo/boot/portal_vm_init.sh -EP_IMG_NAME=portal-apps -DB_IMG_NAME=portal-db -WMS_IMG_NAME=portal-wms +EP_IMG_NAME=onap/portal-apps +DB_IMG_NAME=onap/portal-db +WMS_IMG_NAME=onap/portal-wms +# Deployed with portal; built elsewhere +CLI_IMG_NAME=onap/cli # Tag all images with this PORTAL_TAG=1.3.0 -NEXUS_REPO=nexus3.onap.org:10003 +# Name of directory in apps container (NOT host) +WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps + +# Expected environment variables (NOT defined here): +# LOGS_DIR +# PROPS_DIR diff --git a/deliveries/.gitignore b/deliveries/.gitignore index 796b96d1..f8dca6fb 100644 --- a/deliveries/.gitignore +++ b/deliveries/.gitignore @@ -1 +1,2 @@ /build +/logs diff --git a/deliveries/docker-compose.yml b/deliveries/docker-compose.yml index 054ce0a4..9fa1dd59 100644 --- a/deliveries/docker-compose.yml +++ b/deliveries/docker-compose.yml @@ -10,7 +10,7 @@ version: '2.0' services: cli: - image: onap/cli:${PORTAL_TAG} + image: ${CLI_IMG_NAME}:${PORTAL_TAG} environment: CLI_MODE: 'daemon' expose: diff --git a/deliveries/os_docker_base.sh b/deliveries/os_docker_base.sh index 2bdfea68..70ed1b8b 100755 --- a/deliveries/os_docker_base.sh +++ b/deliveries/os_docker_base.sh @@ -20,13 +20,14 @@ source $(dirname $0)/.env # Build the containers ./build_portalapps_dockers.sh -APPS_VERSION="${NEXUS_REPO}/openecomp/${EP_IMG_NAME}:${VERSION}" -DB_VERSION="${NEXUS_REPO}/openecomp/${DB_IMG_NAME}:${VERSION}" -WMS_VERSION="${NEXUS_REPO}/openecomp/${WMS_IMG_NAME}:${VERSION}" +PREFIX=onap +APPS_VERSION="${NEXUS_REPO}/${PREFIX}/${EP_IMG_NAME}:${VERSION}" +DB_VERSION="${NEXUS_REPO}/${PREFIX}/${DB_IMG_NAME}:${VERSION}" +WMS_VERSION="${NEXUS_REPO}/${PREFIX}/${WMS_IMG_NAME}:${VERSION}" -APPS_LATEST="${NEXUS_REPO}/openecomp/${EP_IMG_NAME}:${LATEST}" -DB_LATEST="${NEXUS_REPO}/openecomp/${DB_IMG_NAME}:${LATEST}" -WMS_LATEST="${NEXUS_REPO}/openecomp/${WMS_IMG_NAME}:${LATEST}" +APPS_LATEST="${NEXUS_REPO}/${PREFIX}/${EP_IMG_NAME}:${LATEST}" +DB_LATEST="${NEXUS_REPO}/${PREFIX}/${DB_IMG_NAME}:${LATEST}" +WMS_LATEST="${NEXUS_REPO}/${PREFIX}/${WMS_IMG_NAME}:${LATEST}" # tag versions docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APPS_VERSION} @@ -38,7 +39,7 @@ docker tag ${DB_IMG_NAME}:${PORTAL_TAG} ${DB_LATEST} docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_VERSION} docker tag ${WMS_IMG_NAME}:${PORTAL_TAG} ${WMS_LATEST} -# push +# push to registry docker push ${APPS_VERSION} docker push ${APPS_LATEST} diff --git a/deliveries/portal_vm_init.sh b/deliveries/portal_vm_init.sh deleted file mode 100755 index 8fb971a8..00000000 --- a/deliveries/portal_vm_init.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Starts docker containers for ONAP Portal -# This version for Amsterdam/R1 of Portal, uses docker-compose. -# Temporarily maintained in portal/deliveries area; -# replicated from the ONAP demo/boot area due to release concerns. - -# be verbose -set -x - -# Establish environment variables -NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) -NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) -NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) -DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) -# Can use this version instead to use snapshot versions: -# DOCKER_IMAGE_VERSION=latest -# CLI has a different version than Portal -CLI_IMAGE_VERSION=1.1-STAGING-latest - -# Refresh configuration and scripts -cd /opt/portal -git pull -cd deliveries - -# Get variables from docker-compose environment file -source .env - -# Copy property files to new directory -mkdir -p $PROPS_DIR -cp -r properties_rackspace/* $PROPS_DIR -# Also create logs directory -mkdir -p $LOGS_DIR - -# Refresh images -docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO -docker pull $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION -docker pull $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION -docker pull $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION - -# CLI is not built locally -docker pull $NEXUS_DOCKER_REPO/onap/cli:${CLI_IMAGE_VERSION} - -# Tag them as expected by docker-compose file -docker tag $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG -docker tag $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG -docker tag $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG - -# Tag CLI also -docker tag $NEXUS_DOCKER_REPO/onap/cli:${CLI_IMAGE_VERSION} onap/cli:$PORTAL_TAG - -# compose is not in /usr/bin -/opt/docker/docker-compose down -/opt/docker/docker-compose up -d -- cgit 1.2.3-korg