Security/ Package Name changes
[portal.git] / deliveries / local-dev-host-start.sh
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
23
24 # Pull and tag the CLI image, which is provided elsewhere.
25 # Authenticate like this; the username and password are NOT stored here.
26 docker login -u username -p password $NEXUS_REPO 
27 docker pull $NEXUS_REPO/$CLI_IMG_NAME:${CLI_IMG_VERSION}
28 docker tag $NEXUS_REPO/$CLI_IMG_NAME:${CLI_IMG_VERSION} $CLI_IMG_NAME:$PORTAL_TAG
29
30 # Create local logs directory
31 # The leading "./" is required for docker-compose
32 export LOGS_DIR=./logs
33 mkdir -p $LOGS_DIR
34
35 # Make inter-app communication work in dev3
36 export EXTRA_HOST_IP="135.207.161.175"
37 export EXTRA_HOST_NAME="portal.api.simpledemo.onap.org"
38
39 # (re)start containers
40 docker-compose down
41 docker-compose up -d