st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Starts docker containers for ONAP Portal in test environment |
| 3 | # For development use only; this does NOT pull from git nor build. |
| 4 | |
| 5 | # be verbose |
| 6 | set -x |
| 7 | |
| 8 | # Get variables from docker-compose environment file |
| 9 | source .env |
| 10 | |
| 11 | # Define local subdirectory with host-specific property files |
| 12 | # The leading "./" is required for docker-compose |
| 13 | export PROPS_DIR=./properties_vm-ep-dev11 |
| 14 | if [ ! -d $PROPS_DIR ] ; then |
| 15 | echo "Failed to find directory $PROPS_DIR" |
| 16 | exit 1 |
| 17 | fi |
| 18 | echo "Using properties directory $PROPS_DIR" |
| 19 | |
| 20 | # Constants as of Oct 2017, Amsterdam release |
| 21 | NEXUS_REPO=nexus3.onap.org:10001 |
| 22 | CLI_IMG_VERSION=1.1-STAGING-latest |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 23 | CDR_IMG_VERSION=latest |
| 24 | ZK_IMG_VERSION=3.4 |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 25 | |
| 26 | # Pull and tag the CLI image, which is provided elsewhere. |
| 27 | # Authenticate like this; the username and password are NOT stored here. |
| 28 | docker login -u username -p password $NEXUS_REPO |
| 29 | docker pull $NEXUS_REPO/$CLI_IMG_NAME:${CLI_IMG_VERSION} |
| 30 | docker tag $NEXUS_REPO/$CLI_IMG_NAME:${CLI_IMG_VERSION} $CLI_IMG_NAME:$PORTAL_TAG |
| 31 | |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 32 | # Pull and tag the Music Cassandra image. |
| 33 | docker pull $NEXUS_REPO/$CDR_IMG_NAME:${CDR_IMG_VERSION} |
| 34 | docker tag $NEXUS_REPO/$CDR_IMG_NAME:${CDR_IMG_VERSION} $CDR_IMG_NAME:$PORTAL_TAG |
| 35 | |
| 36 | # Pull and tag the ZK image. |
| 37 | docker pull library/$ZK_IMG_NAME:${ZK_IMG_VERSION} |
| 38 | docker tag library/$ZK_IMG_NAME:${ZK_IMG_VERSION} $ZK_IMG_NAME:$PORTAL_TAG |
| 39 | |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 40 | # Create local logs directory |
| 41 | # The leading "./" is required for docker-compose |
| 42 | export LOGS_DIR=./logs |
| 43 | mkdir -p $LOGS_DIR |
| 44 | |
| 45 | # Make inter-app communication work in dev3 |
Kotta, Shireesha (sk434m) | 47bcf09 | 2018-10-09 11:28:41 -0400 | [diff] [blame] | 46 | export EXTRA_HOST_IP=localhost |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 47 | export EXTRA_HOST_NAME="portal.api.simpledemo.onap.org" |
| 48 | |
| 49 | # (re)start containers |
| 50 | docker-compose down |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 51 | docker-compose up -d |