aboutsummaryrefslogtreecommitdiffstats
path: root/boot/portal_vm_init.sh
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-10-02 13:43:44 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-10-03 09:34:02 -0400
commit2c7b988e0db6c3869f187c54ac0e81deb99c0e00 (patch)
tree055b8dded78260392107d85cd7b487ac64497f52 /boot/portal_vm_init.sh
parent155b752b944d11b6213d1d5cae5194a52a4630a9 (diff)
Restore portal_vm_init.sh
Interim versions were being maintained in portal repo; now restored to the ONAP demo area. Issue: PORTAL-90, PORTAL-113 Change-Id: Ib98bcf27f85139f55a0bd1f9b79c6e0edf6402fe Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'boot/portal_vm_init.sh')
-rwxr-xr-xboot/portal_vm_init.sh35
1 files changed, 19 insertions, 16 deletions
diff --git a/boot/portal_vm_init.sh b/boot/portal_vm_init.sh
index c58f22f0..d4fd88a5 100755
--- a/boot/portal_vm_init.sh
+++ b/boot/portal_vm_init.sh
@@ -10,6 +10,8 @@ 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)
+# Use "latest" to deploy snapshot images:
+# DOCKER_IMAGE_VERSION=latest
CLI_DOCKER_VERSION=$(cat /opt/config/cli_docker_version.txt)
# Refresh configuration and scripts
@@ -20,27 +22,28 @@ cd deliveries
# Get image names used below from docker-compose environment file
source .env
-# Copy property files
-ETC=/PROJECT/OpenSource/UbuntuEP/etc
-mkdir -p $ETC
-cp -r properties_rackspace/* $ETC
-
# 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
-# Add CLI docker image
-docker pull $NEXUS_DOCKER_REPO/onap/cli:$CLI_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/$DB_IMG_NAME:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/$EP_IMG_NAME:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/$WMS_IMG_NAME:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/$CLI_IMG_NAME:$CLI_DOCKER_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
-# Add tagging for CLI docker image as expected by docker-compose file
-docker tag $NEXUS_DOCKER_REPO/onap/cli:$CLI_DOCKER_VERSION onap/cli:$PORTAL_TAG
+docker tag $NEXUS_DOCKER_REPO/$DB_IMG_NAME:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG
+docker tag $NEXUS_DOCKER_REPO/$EP_IMG_NAME:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG
+docker tag $NEXUS_DOCKER_REPO/$WMS_IMG_NAME:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG
+docker tag $NEXUS_DOCKER_REPO/$CLI_IMG_NAME:$CLI_DOCKER_VERSION $CLI_IMG_NAME:$PORTAL_TAG
+
+# Export variable for local logs directory, and create directory too
+# The leading "./" is required for docker-compose
+export LOGS_DIR=./logs
+mkdir -p $LOGS_DIR
+
+# Export variable for subdirectory with host-specific property files
+# The leading "./" is required for docker-compose
+export PROPS_DIR=./properties_rackspace
# docker-compose is not in /usr/bin
/opt/docker/docker-compose down
/opt/docker/docker-compose up -d
-