From 2c7b988e0db6c3869f187c54ac0e81deb99c0e00 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Mon, 2 Oct 2017 13:43:44 -0400 Subject: 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) --- boot/portal_vm_init.sh | 35 +++++++++++++++++++---------------- 1 file 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 - -- cgit 1.2.3-korg