Update deliveries for portal deployment 83/16883/4
authorChristopher Lott (cl778h) <clott@research.att.com>
Mon, 2 Oct 2017 16:09:24 +0000 (12:09 -0400)
committerChristopher Lott (cl778h) <clott@research.att.com>
Mon, 2 Oct 2017 17:35:07 +0000 (13:35 -0400)
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) <clott@research.att.com>
deliveries/.env
deliveries/.gitignore
deliveries/docker-compose.yml
deliveries/os_docker_base.sh
deliveries/portal_vm_init.sh [deleted file]
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.json.details.modal.page.html [moved from ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html with 100% similarity]

index c67f43f..1e713ae 100644 (file)
@@ -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
index 796b96d..f8dca6f 100644 (file)
@@ -1 +1,2 @@
 /build
+/logs
index 054ce0a..9fa1dd5 100644 (file)
@@ -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:
index 2bdfea6..70ed1b8 100755 (executable)
@@ -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 (executable)
index 8fb971a..0000000
+++ /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