summaryrefslogtreecommitdiffstats
path: root/deliveries/portal_vm_init.sh
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-09-28 16:59:17 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-09-28 17:36:30 -0400
commitde8b8df79c1f0f56d978046a6f5afda05ec72fc4 (patch)
tree9b4c2675207fadf839adad36b1b97358e522666d /deliveries/portal_vm_init.sh
parenta3b65e405278eb4b54de869a19b66ed9338dd1a6 (diff)
Update license in non-Java files.
Add logs and properties directory names to .env file. Revise portal_vm_init.sh script to pull and tag onap/cli docker image. Issue: PORTAL-90 Change-Id: I82a371ee9797b3e037ad282538cb48b5620c9709 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'deliveries/portal_vm_init.sh')
-rwxr-xr-xdeliveries/portal_vm_init.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/deliveries/portal_vm_init.sh b/deliveries/portal_vm_init.sh
index 5f4716ec..8fb971a8 100755
--- a/deliveries/portal_vm_init.sh
+++ b/deliveries/portal_vm_init.sh
@@ -12,19 +12,24 @@ 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 image names used below from docker-compose environment file
+# Get variables from docker-compose environment file
source .env
-# Copy property files
-ETC=/PROJECT/OpenSource/UbuntuEP/etc
-mkdir -p $ETC
-cp -r properties_rackspace/* $ETC
+# 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
@@ -32,11 +37,17 @@ 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