# 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
-
# 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
services:
cli:
- image: onap/cli:${PORTAL_TAG}
+ image: ${CLI_IMG_NAME}:${PORTAL_TAG}
environment:
CLI_MODE: 'daemon'
expose:
exit 1
fi
+# ONAP docker registry for pushing; may need to move
+# this into os_docker_push, os_docker_release scripts
+NEXUS_REPO=nexus3.onap.org:10003
+
# Establish environment variables
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}"
+APPS_VERSION="${NEXUS_REPO}/${EP_IMG_NAME}:${VERSION}"
+DB_VERSION="${NEXUS_REPO}/${DB_IMG_NAME}:${VERSION}"
+WMS_VERSION="${NEXUS_REPO}/${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}/${EP_IMG_NAME}:${LATEST}"
+DB_LATEST="${NEXUS_REPO}/${DB_IMG_NAME}:${LATEST}"
+WMS_LATEST="${NEXUS_REPO}/${WMS_IMG_NAME}:${LATEST}"
# tag versions
docker tag ${EP_IMG_NAME}:${PORTAL_TAG} ${APPS_VERSION}
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}
+++ /dev/null
-#!/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