blob: 8355983a3c2a822cba30d933cfd06abfaa65237f [file] [log] [blame]
st782s21a87612018-01-30 17:29:36 -05001#!/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
6set -x
7
8# Get variables from docker-compose environment file
9source .env
10
11# Define local subdirectory with host-specific property files
12# The leading "./" is required for docker-compose
13export PROPS_DIR=./properties_vm-ep-dev11
14if [ ! -d $PROPS_DIR ] ; then
15 echo "Failed to find directory $PROPS_DIR"
16 exit 1
17fi
18echo "Using properties directory $PROPS_DIR"
19
20# Constants as of Oct 2017, Amsterdam release
21NEXUS_REPO=nexus3.onap.org:10001
22CLI_IMG_VERSION=1.1-STAGING-latest
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040023CDR_IMG_VERSION=latest
24ZK_IMG_VERSION=3.4
st782s21a87612018-01-30 17:29:36 -050025
26# Pull and tag the CLI image, which is provided elsewhere.
27# Authenticate like this; the username and password are NOT stored here.
28docker login -u username -p password $NEXUS_REPO
29docker pull $NEXUS_REPO/$CLI_IMG_NAME:${CLI_IMG_VERSION}
30docker tag $NEXUS_REPO/$CLI_IMG_NAME:${CLI_IMG_VERSION} $CLI_IMG_NAME:$PORTAL_TAG
31
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040032# Pull and tag the Music Cassandra image.
33docker pull $NEXUS_REPO/$CDR_IMG_NAME:${CDR_IMG_VERSION}
34docker tag $NEXUS_REPO/$CDR_IMG_NAME:${CDR_IMG_VERSION} $CDR_IMG_NAME:$PORTAL_TAG
35
36# Pull and tag the ZK image.
37docker pull library/$ZK_IMG_NAME:${ZK_IMG_VERSION}
38docker tag library/$ZK_IMG_NAME:${ZK_IMG_VERSION} $ZK_IMG_NAME:$PORTAL_TAG
39
st782s21a87612018-01-30 17:29:36 -050040# Create local logs directory
41# The leading "./" is required for docker-compose
42export LOGS_DIR=./logs
43mkdir -p $LOGS_DIR
44
45# Make inter-app communication work in dev3
Kotta, Shireesha (sk434m)47bcf092018-10-09 11:28:41 -040046export EXTRA_HOST_IP=localhost
st782s21a87612018-01-30 17:29:36 -050047export EXTRA_HOST_NAME="portal.api.simpledemo.onap.org"
48
49# (re)start containers
50docker-compose down
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040051docker-compose up -d