blob: 6378726b1128f2ce9f08d844bbb280924018925d [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001#!/bin/bash
2
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +03003#
4# Constants:
5#
6
7WORKSPACE="${WORKSPACE:-}"
8SUCCESS=0
9FAILURE=1
10
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020011CS_PASSWORD="onap123#@!"
12SDC_USER="asdc_user"
13SDC_PASSWORD="Aa1234%^!"
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030014
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020015JETTY_BASE="/var/lib/jetty"
kooperb087a8b2019-04-04 14:03:36 +000016SDC_CERT_DIR="onap/cert"
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030017
18RELEASE=latest
19LOCAL=false
20RUNTESTS=false
Tal Gitelmanef4b94e2018-08-02 17:11:25 +030021BE_DEBUG_PORT="--publish 4000:4000"
22FE_DEBUG_PORT="--publish 6000:6000"
Tal Gitelmanc4d387d2019-03-28 11:00:54 +020023ONBOARD_DEBUG_PORT="--publish 4001:4001"
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030024
25
26# Java Options:
Gitelman, Tal (tg851x)328388b2018-03-22 13:03:44 +020027BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -Xmx1536m -Xms1536m"
28FE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=6000,server=y,suspend=n -Xmx256m -Xms256m"
Avi Zivc175a0d2018-03-15 13:21:44 +020029ONBOARD_BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4001,server=y,suspend=n -Xmx1g -Xms1g"
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030030DCAE_BE_JAVA_OPTIONS="-XX:MaxPermSize=256m -Xmx1024m -Dconfig.home=config -Dlog.home=/var/lib/jetty/logs/ -Dlogging.config=config/dcae-be/logback-spring.xml"
31DCAE_FE_JAVA_OPTIONS="-XX:MaxPermSize=256m -Xmx1024m -Dconfig.home=config -Dlog.home=/var/lib/jetty/logs/ -Dlogging.config=config/dcae-fe/logback-spring.xml"
Yuli Shlosbergaf70a202018-09-25 17:16:48 +030032SIM_JAVA_OPTIONS=" -Xmx128m -Xms128m -Xss1m -Dlog4j.configuration=file:///${JETTY_BASE}/config/sdc-simulator/log4j.properties"
Yuli Shlosbergf59a2252018-03-21 11:14:08 +020033API_TESTS_JAVA_OPTIONS="-Xmx512m -Xms512m"
34UI_TESTS_JAVA_OPTIONS="-Xmx1024m -Xms1024m"
dekstroza83520062018-05-03 16:47:08 +010035#Define this as variable, so it can be excluded in run commands on Docker for OSX, as /etc/localtime cant be mounted there.
36LOCAL_TIME_MOUNT_CMD="--volume /etc/localtime:/etc/localtime:ro"
37# If os is OSX, unset this, so /etc/localtime is not mounted, otherwise leave it be
38if [[ "$OSTYPE" == "darwin"* ]]; then
39 LOCAL_TIME_MOUNT_CMD=""
40fi
41
42
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030043#
44# Functions:
45#
46
Michael Lando451a3402017-02-19 10:28:42 +020047
Grinberg Motic3bda482017-02-23 11:24:34 +020048function usage {
Idan Amit8e0e0ea2018-09-13 17:13:55 +030049 echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -sim|--simulator <Run-with-simulator>] [ -ta <run api tests with the supplied test suit>] [ -tu <run ui tests with the supplied test suit>] [ -ta <run api tests with the supplied test suit>] [ -tu <run ui tests with the supplied test suit>] [ -tad <run api tests with the default test suit>] [ -tu <run ui tests with the default test suit>] [ -dcae|--dcae <Run-with-DCAE>][ -h|--help ]"
Michael Landodc856bb2018-08-13 13:27:52 +030050 echo "start dockers built locally example: docker_run.sh -l"
51 echo "start dockers built locally and simulator example: docker_run.sh -l -sim"
52 echo "start dockers, pull from onap nexus according to release and simulator example: docker_run.sh -r 1.3-STAGING-latest -sim"
53 echo "start dockers built locally and run api tests docker example: docker_run.sh -l -tad"
54 echo "start dockers built locally and run only the catalog be example: docker_run.sh -l -d sdc-BE "
Michael Lando451a3402017-02-19 10:28:42 +020055}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030056#
Michael Lando451a3402017-02-19 10:28:42 +020057
58
Grinberg Motic3bda482017-02-23 11:24:34 +020059function cleanup {
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030060 echo "Performing old dockers cleanup"
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020061
62 if [ "$1" == "all" ] ; then
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030063 docker_ids=`docker ps -a | egrep -v "onap/sdc-simulator" | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit}|dcae" | awk '{print $1}'`
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020064 for X in ${docker_ids}
65 do
66 docker rm -f ${X}
67 done
68 else
69 echo "performing $1 docker cleanup"
70 tmp=`docker ps -a -q --filter="name=$1"`
Yuli Shlosberg474996a2018-02-27 18:55:25 +020071 if [[ ! -z "$tmp" ]]; then
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030072 docker rm -f ${tmp}
73 fi
Yuli Shlosberg958c32d2018-02-15 12:04:46 +020074 fi
Grinberg Motic3bda482017-02-23 11:24:34 +020075}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030076#
Grinberg Motic3bda482017-02-23 11:24:34 +020077
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030078
Grinberg Motic3bda482017-02-23 11:24:34 +020079function dir_perms {
Michael Lando4b9b9472018-06-02 19:14:05 +030080 mkdir -p ${WORKSPACE}/data/logs/BE/SDC/SDC-BE
81 mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030082
83 mkdir -p ${WORKSPACE}/data/logs/DCAE-BE/DCAE
84 mkdir -p ${WORKSPACE}/data/logs/DCAE-FE/DCAE
85
Michael Lando4b9b9472018-06-02 19:14:05 +030086 mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport
87 mkdir -p ${WORKSPACE}/data/logs/ONBOARD/SDC/ONBOARD-BE
Yuli Shlosbergf59a2252018-03-21 11:14:08 +020088 mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/target
89 mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030090 mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/target
91 mkdir -p ${WORKSPACE}/data/logs/docker_logs
92 mkdir -p ${WORKSPACE}/data/logs/WS
kooperb087a8b2019-04-04 14:03:36 +000093 echo "create dir"
94 echo "${WORKSPACE}data/${SDC_CERT_DIR}"
95 mkdir -p ${WORKSPACE}/data/${SDC_CERT_DIR}
Michael Lando4b9b9472018-06-02 19:14:05 +030096 chmod -R 777 ${WORKSPACE}/data/logs
Grinberg Motic3bda482017-02-23 11:24:34 +020097}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +030098#
99
Yuli Shlosberg36604c72018-02-25 16:03:45 +0200100
Yuli Shlosbergb4deec12018-02-25 20:24:44 +0200101function docker_logs {
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300102 docker logs $1 > ${WORKSPACE}/data/logs/docker_logs/$1_docker.log
Yuli Shlosbergb4deec12018-02-25 20:24:44 +0200103}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300104#
Yuli Shlosbergb4deec12018-02-25 20:24:44 +0200105
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300106
107#
108# Readiness Prob
109#
110
111function ready_probe {
Michael Lando4b9b9472018-06-02 19:14:05 +0300112 docker exec $1 /var/lib/ready-probe.sh > /dev/null 2>&1
113 rc=$?
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300114 if [[ ${rc} == 0 ]]; then
115 echo DOCKER $1 start finished in $2 seconds
116 return ${SUCCESS}
Michael Lando4b9b9472018-06-02 19:14:05 +0300117 fi
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300118 return ${FAILURE}
Yuli Shlosberg0875ce02018-01-25 13:53:36 +0200119}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300120#
Yuli Shlosberg0875ce02018-01-25 13:53:36 +0200121
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200122
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300123function probe_docker {
124 MATCH=`docker logs --tail 30 $1 | grep "DOCKER STARTED"`
125 echo MATCH is -- ${MATCH}
Avi Zivc175a0d2018-03-15 13:21:44 +0200126
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300127 if [ -n "$MATCH" ] ; then
128 echo DOCKER start finished in $2 seconds
129 return ${SUCCESS}
Michael Lando4b9b9472018-06-02 19:14:05 +0300130 fi
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300131 return ${FAILURE}
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200132}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300133#
134
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200135
136function probe_es {
Michael Lando4b9b9472018-06-02 19:14:05 +0300137 health_Check_http_code=$(curl --noproxy "*" -o /dev/null -w '%{http_code}' http://${IP}:9200/_cluster/health?wait_for_status=yellow&timeout=120s)
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300138 if [[ "$health_Check_http_code" -eq 200 ]] ; then
139 echo DOCKER start finished in $1 seconds
140 return ${SUCCESS}
141 fi
142 return ${FAILURE}
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200143}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300144#
145
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200146
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200147function probe_sim {
Michael Lando4b9b9472018-06-02 19:14:05 +0300148 if lsof -Pi :8285 -sTCP:LISTEN -t >/dev/null ; then
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300149 echo "Already running"
150 return ${SUCCESS}
Michael Lando4b9b9472018-06-02 19:14:05 +0300151 else
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300152 echo "Not running"
153 return ${FAILURE}
Michael Lando4b9b9472018-06-02 19:14:05 +0300154 fi
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200155}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300156#
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200157
Yuli Shlosberg0875ce02018-01-25 13:53:36 +0200158
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300159function probe_dcae_be {
160 health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' http://${IP}:8082/dcae/conf/composition)
161 if [[ "${health_check_http_code}" -eq 200 ]] ; then
162 echo DOCKER start finished in $1 seconds
163 return ${SUCCESS}
Michael Lando4b9b9472018-06-02 19:14:05 +0300164 fi
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300165 return ${FAILURE}
Yuli Shlosberg0875ce02018-01-25 13:53:36 +0200166}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300167#
168
169function probe_dcae_fe {
170 health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' http://${IP}:8183/dcaed/healthCheck)
171 if [[ "${health_check_http_code}" -eq 200 ]] ; then
172 echo DOCKER start finished in $1 seconds
173 return ${SUCCESS}
174 fi
175 return ${FAILURE}
176}
177#
178
179
180# Not applicable for current release. Return Success in any case
181function probe_dcae_tools {
182 health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' http://${IP}:8082/dcae/getResourcesByMonitoringTemplateCategory)
183 if [[ "${health_check_http_code}" -eq 200 ]] ; then
184 echo DOCKER start finished in $1 seconds
185 return ${SUCCESS}
186 fi
187 return ${SUCCESS}
188}
189#
190
191
Yuli Shlosberg5571a862017-10-03 18:18:51 +0300192function monitor_docker {
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300193 DOCKER_NAME=$1
194 echo "Monitor ${DOCKER_NAME} Docker"
Idan Amitdb3d5542017-12-07 11:33:32 +0200195 sleep 5
196 TIME_OUT=900
197 INTERVAL=20
198 TIME=0
Avi Zivc175a0d2018-03-15 13:21:44 +0200199
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300200 while [ "$TIME" -lt "$TIME_OUT" ]; do
201
202 case ${DOCKER_NAME} in
203
204 sdc-cs)
205 ready_probe ${DOCKER_NAME} ${TIME} ;
206 status=$? ;
207 ;;
208 sdc-es)
209 probe_es ${TIME} ;
210 status=$? ;
211 ;;
212 sdc-BE)
213 ready_probe ${DOCKER_NAME} ${TIME} ;
214 status=$? ;
215 ;;
216 sdc-FE)
217 ready_probe ${DOCKER_NAME} ${TIME} ;
218 status=$? ;
219 ;;
220 sdc-onboard-BE)
221 ready_probe ${DOCKER_NAME} ${TIME} ;
222 status=$? ;
223 ;;
224 dcae-be)
225 probe_dcae_be ${TIME} ;
226 status=$? ;
227 ;;
228 dcae-fe)
229 probe_dcae_fe ${TIME} ;
230 status=$? ;
231 ;;
232 dcae-tools)
233 probe_dcae_tools ;
234 status=$? ;
235 ;;
236 *)
237 probe_docker ${DOCKER_NAME} ${TIME};
238 status=$? ;
239 ;;
240
241 esac
242
243 if [ ${status} == ${SUCCESS} ] ; then
244 break;
Idan Amitdb3d5542017-12-07 11:33:32 +0200245 fi
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300246
247 echo "Sleep: ${INTERVAL} seconds before testing if ${DOCKER_NAME} DOCKER is up. Total wait time up now is: ${TIME} seconds. Timeout is: ${TIME_OUT} seconds"
248 sleep ${INTERVAL}
Idan Amitdb3d5542017-12-07 11:33:32 +0200249 TIME=$(($TIME+$INTERVAL))
250 done
Yuli Shlosberg5571a862017-10-03 18:18:51 +0300251
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300252 docker_logs ${DOCKER_NAME}
Yuli Shlosberg36604c72018-02-25 16:03:45 +0200253
Idan Amitdb3d5542017-12-07 11:33:32 +0200254 if [ "$TIME" -ge "$TIME_OUT" ]; then
255 echo -e "\e[1;31mTIME OUT: DOCKER was NOT fully started in $TIME_OUT seconds... Could cause problems ...\e[0m"
256 fi
Yuli Shlosberg5571a862017-10-03 18:18:51 +0300257}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300258#
259
Yuli Shlosberg5571a862017-10-03 18:18:51 +0300260
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200261function healthCheck {
Yuli Shlosberg474996a2018-02-27 18:55:25 +0200262 curl --noproxy "*" ${IP}:9200/_cluster/health?pretty=true
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200263
264 echo "BE health-Check:"
Yuli Shlosberg474996a2018-02-27 18:55:25 +0200265 curl --noproxy "*" http://${IP}:8080/sdc2/rest/healthCheck
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200266
267 echo ""
268 echo ""
269 echo "FE health-Check:"
Yuli Shlosberg474996a2018-02-27 18:55:25 +0200270 curl --noproxy "*" http://${IP}:8181/sdc1/rest/healthCheck
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200271
272
273 echo ""
274 echo ""
Yuli Shlosberg474996a2018-02-27 18:55:25 +0200275 healthCheck_http_code=$(curl --noproxy "*" -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user/demo;)
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300276 if [[ ${healthCheck_http_code} != 200 ]]; then
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200277 echo "Error [${healthCheck_http_code}] while user existance check"
278 return ${healthCheck_http_code}
279 fi
280 echo "check user existance: OK"
281 return ${healthCheck_http_code}
282}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300283#
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200284
Tal Gitelmane224d0b2017-10-17 15:24:25 +0300285
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300286function command_exit_status {
287 status=$1
288 docker=$2
289 if [ "${status}" != "0" ] ; then
290 echo "[ ERROR ] Docker ${docker} run command exit with status [${status}]"
291 fi
292}
293#
294
295
296#
297# Run Containers
298#
299
300#Elastic-Search
301function sdc-es {
302 DOCKER_NAME="sdc-es"
303 echo "docker run sdc-elasticsearch..."
304 if [ ${LOCAL} = false ]; then
305 echo "pulling code"
306 docker pull ${PREFIX}/sdc-elasticsearch:${RELEASE}
307 fi
308 docker run -dit --name ${DOCKER_NAME} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --env ES_HEAP_SIZE=1024M --volume ${WORKSPACE}/data/ES:/usr/share/elasticsearch/data --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9200:9200 --publish 9300:9300 ${PREFIX}/sdc-elasticsearch:${RELEASE} /bin/sh
309 command_exit_status $? ${DOCKER_NAME}
310 echo "please wait while ES is starting..."
311 monitor_docker ${DOCKER_NAME}
312}
313#
314
315
316#Init-Elastic-Search
317function sdc-init-es {
318 DOCKER_NAME="sdc-init-es"
319 echo "docker run sdc-init-elasticsearch..."
320 if [ ${LOCAL} = false ]; then
321 echo "pulling code"
322 docker pull ${PREFIX}/sdc-init-elasticsearch:${RELEASE}
323 fi
324 echo "Running sdc-init-es"
325 docker run --name ${DOCKER_NAME} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments ${PREFIX}/sdc-init-elasticsearch:${RELEASE} > /dev/null 2>&1
326 rc=$?
327 docker_logs ${DOCKER_NAME}
328 if [[ ${rc} != 0 ]]; then exit ${rc}; fi
329}
330#
331
332
333#Cassandra
334function sdc-cs {
335 DOCKER_NAME="sdc-cs"
336 echo "docker run sdc-cassandra..."
337 if [ ${LOCAL} = false ]; then
338 docker pull ${PREFIX}/sdc-cassandra:${RELEASE}
339 fi
340 docker run -dit --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh
341 command_exit_status $? ${DOCKER_NAME}
342 echo "please wait while CS is starting..."
343 monitor_docker ${DOCKER_NAME}
344}
345#
346
347
348#Cassandra-init
349function sdc-cs-init {
350 DOCKER_NAME="sdc-cs-init"
351 echo "docker run sdc-cassandra-init..."
352 if [ ${LOCAL} = false ]; then
353 docker pull ${PREFIX}/sdc-cassandra-init:${RELEASE}
354 fi
355 docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-cassandra-init:${RELEASE} > /dev/null 2>&1
356 rc=$?
357 docker_logs ${DOCKER_NAME}
358 if [[ ${rc} != 0 ]]; then exit ${rc}; fi
359}
360#
361
362
363#Onboard Cassandra-init
364function sdc-cs-onboard-init {
365 DOCKER_NAME="sdc-cs-onboard-init"
366 echo "docker run sdc-cs-onboard-init..."
367 if [ ${LOCAL} = false ]; then
368 docker pull ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
369 fi
370 docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
371 rc=$?
372 docker_logs ${DOCKER_NAME}
373 if [[ ${rc} != 0 ]]; then exit ${rc}; fi
374}
375#
376
377
378#Kibana
379function sdc-kbn {
380 DOCKER_NAME="sdc-kbn"
381 echo "docker run sdc-kibana..."
382 if [ ${LOCAL} = false ]; then
383 docker pull ${PREFIX}/sdc-kibana:${RELEASE}
384 docker run --detach --name ${DOCKER_NAME} --env ENVNAME="${DEP_ENV}" --env NODE_OPTIONS="--max-old-space-size=200" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5601:5601 ${PREFIX}/sdc-kibana:${RELEASE}
385 command_exit_status $? ${DOCKER_NAME}
386 fi
387}
388#
389
390
391#Back-End
392function sdc-BE {
393 DOCKER_NAME="sdc-BE"
394 echo "docker run sdc-backend..."
395 if [ ${LOCAL} = false ]; then
396 docker pull ${PREFIX}/sdc-backend:${RELEASE}
397 else
Tal Gitelmanef4b94e2018-08-02 17:11:25 +0300398 ADDITIONAL_ARGUMENTS=${BE_DEBUG_PORT}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300399 fi
400 docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env JAVA_OPTIONS="${BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-backend:${RELEASE}
401 command_exit_status $? ${DOCKER_NAME}
402 echo "please wait while BE is starting..."
403 monitor_docker ${DOCKER_NAME}
404}
405#
406
407
408# Back-End-Init
409function sdc-BE-init {
410 DOCKER_NAME="sdc-BE-init"
411 echo "docker run sdc-backend-init..."
412 if [ ${LOCAL} = false ]; then
413 docker pull ${PREFIX}/sdc-backend-init:${RELEASE}
414 fi
415 docker run --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
416 rc=$?
417 docker_logs ${DOCKER_NAME}
418 if [[ ${rc} != 0 ]]; then exit ${rc}; fi
419}
420#
421
422
423# Onboard Back-End
424function sdc-onboard-BE {
425 DOCKER_NAME="sdc-onboard-BE"
426 echo "docker run sdc-onboard-BE ..."
427# TODO Check the dir_perms action . do we need it here ??
428# dir_perms
429 if [ ${LOCAL} = false ]; then
430 docker pull ${PREFIX}/sdc-onboard-backend:${RELEASE}
431 else
432 ADDITIONAL_ARGUMENTS=${ONBOARD_DEBUG_PORT}
433 fi
kooperb087a8b2019-04-04 14:03:36 +0000434 docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env SDC_CERT_DIR="${SDC_CERT_DIR}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/${SDC_CERT_DIR}:/var/lib/jetty/onap/cert --volume ${WORKSPACE}/data/logs/ONBOARD:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300435 command_exit_status $? ${DOCKER_NAME}
436 echo "please wait while sdc-onboard-BE is starting..."
437 monitor_docker ${DOCKER_NAME}
438}
439#
440
441
442# Front-End
443function sdc-FE {
444 DOCKER_NAME="sdc-FE"
445 echo "docker run sdc-frontend..."
446 if [ ${LOCAL} = false ]; then
447 docker pull ${PREFIX}/sdc-frontend:${RELEASE}
Tal Gitelmanef4b94e2018-08-02 17:11:25 +0300448 else
449 ADDITIONAL_ARGUMENTS=${FE_DEBUG_PORT}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300450 fi
shrikantawachard139e092019-01-16 12:37:16 +0530451 docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${FE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/FE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/environments/plugins-configuration.yaml:${JETTY_BASE}/config/catalog-fe/plugins-configuration.yaml --publish 9443:9443 --publish 8181:8181 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-frontend:${RELEASE}
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300452 command_exit_status $? ${DOCKER_NAME}
453 echo "please wait while FE is starting....."
454 monitor_docker ${DOCKER_NAME}
455}
456#
457
458
459# DCAE BackEnd
460function dcae-be {
461 if [ ! ${DCAE_ENABLE} ] ; then
462 return
463 fi
464 DOCKER_NAME="dcae-be"
465 echo "docker run ${DOCKER_NAME}..."
466 if [ ${LOCAL} = false ]; then
467 docker pull ${PREFIX}/${DOCKER_NAME}:${RELEASE}
468 fi
469 docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${DCAE_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/DCAE-BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/var/opt/dcae-be/chef-solo/environments --publish 8444:8444 --publish 8082:8082 ${PREFIX}/${DOCKER_NAME}:${RELEASE}
470 command_exit_status $? ${DOCKER_NAME}
471 echo "please wait while ${DOCKER_NAME^^} is starting....."
472 monitor_docker ${DOCKER_NAME}
473}
474#
475
476
477# DCAE Configuration
478function dcae-tools {
479 if [ ! ${DCAE_ENABLE} ] ; then
480 return
481 fi
482 DOCKER_NAME="dcae-tools"
483 echo "docker run ${DOCKER_NAME}..."
484 if [ ${LOCAL} = false ]; then
485 docker pull ${PREFIX}/${DOCKER_NAME}:${RELEASE}
486 fi
487 docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/var/opt/dcae-tools/chef-solo/environments ${PREFIX}/${DOCKER_NAME}:${RELEASE}
488 command_exit_status $? ${DOCKER_NAME}
489 echo "please wait while ${DOCKER_NAME^^} is starting....."
490 monitor_docker ${DOCKER_NAME}
491
492}
493#
494
495
496# DCAE FrontEnd
497function dcae-fe {
498 if [ ! ${DCAE_ENABLE} ] ; then
499 return
500 fi
501 DOCKER_NAME="dcae-fe"
502 echo "docker run ${DOCKER_NAME}..."
503 if [ ${LOCAL} = false ]; then
504 docker pull ${PREFIX}/${DOCKER_NAME}:${RELEASE}
505 fi
506 docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${DCAE_FE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/DCAE-FE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/var/opt/dcae-fe/chef-solo/environments/ --publish 9444:9444 --publish 8183:8183 ${PREFIX}/${DOCKER_NAME}:${RELEASE}
507 command_exit_status $? ${DOCKER_NAME}
508 echo "please wait while ${DOCKER_NAME^^} is starting....."
509 monitor_docker ${DOCKER_NAME}
510
511}
512#
513
514
515# apis-sanity
516function sdc-api-tests {
517 if [[ ${RUN_API_TESTS} = true ]] ; then
Yuli Shlosbergd0eaeca2018-07-19 17:54:15 +0300518 healthCheck
519 healthCheck_http_code=$?
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300520 if [[ ${healthCheck_http_code} == 200 ]] ; then
521 echo "docker run sdc-api-tests..."
522 echo "Trigger sdc-api-tests docker, please wait..."
523
524 if [ ${LOCAL} = false ]; then
525 docker pull ${PREFIX}/sdc-api-tests:${RELEASE}
526 fi
527
528 docker run --detach --name sdc-api-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${API_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${API_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/sdc-api-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-api-tests/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-api-tests:${RELEASE} echo "please wait while SDC-API-TESTS is starting....."
529 monitor_docker sdc-api-tests
530 fi
531 fi
532}
533#
534
535
536# ui-sanity
537function sdc-ui-tests {
538
539 if [[ ${RUN_UI_TESTS} = true ]] ; then
Yuli Shlosbergd0eaeca2018-07-19 17:54:15 +0300540 healthCheck
541 healthCheck_http_code=$?
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300542 if [[ ${healthCheck_http_code} == 200 ]]; then
543 echo "docker run sdc-ui-tets..."
544 echo "Trigger sdc-ui-tests docker, please wait..."
545
546 if [ ${LOCAL} = false ]; then
547 docker pull ${PREFIX}/sdc-ui-tests:${RELEASE}
548 fi
Michael Landodc856bb2018-08-13 13:27:52 +0300549 RUN_SIMULATOR=true;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300550 sdc-sim
551 docker run --detach --name sdc-ui-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${UI_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${UI_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/sdc-ui-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5901:5901 --publish 6901:6901 ${PREFIX}/sdc-ui-tests:${RELEASE}
552 echo "please wait while SDC-UI-TESTS is starting....."
553 monitor_docker sdc-ui-tests
554 fi
555 fi
556}
557#
558
559
560# SDC-Simulator
561function sdc-sim {
Lianhao Lu26166842018-09-07 10:42:10 +0800562 if [ "${RUN_SIMULATOR}" == true ]; then
Michael Landodc856bb2018-08-13 13:27:52 +0300563 echo "docker run sdc-webSimulator..."
564 if [ ${LOCAL} = false ]; then
565 docker pull ${PREFIX}/sdc-simulator:${RELEASE}
566 fi
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300567
Michael Landodc856bb2018-08-13 13:27:52 +0300568 probe_sim
569 sim_stat=$?
Michael Landob751c962018-08-20 11:34:04 +0300570 if [ ${sim_stat} == 1 ]; then
Michael Landodc856bb2018-08-13 13:27:52 +0300571 docker run \
572 --detach \
573 --name sdc-sim \
574 --env FE_URL="${FE_URL}" \
575 --env JAVA_OPTIONS="${SIM_JAVA_OPTIONS}" \
576 --env ENVNAME="${DEP_ENV}" \
577 ${LOCAL_TIME_MOUNT_CMD} \
578 --volume ${WORKSPACE}/data/logs/WS/:/var/lib/jetty/logs \
579 --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments \
580 --publish 8285:8080 \
581 --publish 8286:8443 ${PREFIX}/sdc-simulator:${RELEASE}
582 echo "please wait while SDC-WEB-SIMULATOR is starting....."
583 monitor_docker sdc-sim
584 fi
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300585 fi
586}
587#
588
589
590#
591# Main
592#
593
594# Handle command line arguments
Idan Amitdb3d5542017-12-07 11:33:32 +0200595while [ $# -gt 0 ]; do
Michael Lando451a3402017-02-19 10:28:42 +0200596 case $1 in
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300597
Idan Amitdb3d5542017-12-07 11:33:32 +0200598 # -r | --release - The specific docker version to pull and deploy
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200599 -r | --release )
600 shift 1 ;
601 RELEASE=$1;
602 shift 1;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300603
Idan Amitdb3d5542017-12-07 11:33:32 +0200604 # -e | --environment - The environment name you want to deploy
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200605 -e | --environment )
606 shift 1;
607 DEP_ENV=$1;
608 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300609
Idan Amitdb3d5542017-12-07 11:33:32 +0200610 # -p | --port - The port from which to connect to the docker nexus
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200611 -p | --port )
612 shift 1 ;
613 PORT=$1;
614 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300615
Idan Amitdb3d5542017-12-07 11:33:32 +0200616 # -l | --local - Use this for deploying your local dockers without pulling them first
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200617 -l | --local )
618 LOCAL=true;
619 shift 1;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300620
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200621 # -ta - Use this for running the APIs sanity docker after all other dockers have been deployed
622 -ta )
623 shift 1 ;
624 API_SUITE=$1;
625 RUN_API_TESTS=true;
626 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300627
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200628 # -tu - Use this for running the UI sanity docker after all other dockers have been deployed
629 -tu )
630 shift 1 ;
631 UI_SUITE=$1;
632 RUN_UI_TESTS=true;
633 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300634
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200635 # -tad - Use this for running the DEFAULT suite of tests in APIs sanity docker after all other dockers have been deployed
636 -tad | -t )
637 API_SUITE="onapApiSanity";
638 RUN_API_TESTS=true;
639 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300640
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200641 # -tud - Use this for running the DEFAULT suite of tests in UI sanity docker after all other dockers have been deployed
642 -tud )
643 UI_SUITE="onapUiSanity";
644 RUN_UI_TESTS=true;
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200645 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300646
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200647 # -d | --docker - The init specified docker
648 -d | --docker )
649 shift 1 ;
650 DOCKER=$1;
651 shift 1 ;;
Michael Landodc856bb2018-08-13 13:27:52 +0300652 # -sim | --simulator run the simulator
653 -sim | --simulator )
654 RUN_SIMULATOR=true;
655 shift 1 ;;
656 # -sim | --simulator run the simulator
657 -u | --fe_url )
658 shift 1 ;
659 FE_URL=$1;
660 shift 1 ;;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300661 # -dcae | --dcae - Use this to deploy DCAE upon SDC
662 -dcae | --dcae )
663 shift 1 ;
664 DCAE_ENABLE='True';;
665
Idan Amitdb3d5542017-12-07 11:33:32 +0200666 # -h | --help - Display the help message with all the available run options
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200667 -h | --help )
668 usage;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300669 exit ${SUCCESS};;
670
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200671 * )
672 usage;
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300673 exit ${FAILURE};;
Michael Lando451a3402017-02-19 10:28:42 +0200674 esac
Michael Lando451a3402017-02-19 10:28:42 +0200675done
676
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300677
liang dingd73c2872018-09-27 19:07:02 -0700678#Prefix those with WORKSPACE so it can be set to something other than /opt
dekstroza83520062018-05-03 16:47:08 +0100679[ -f ${WORKSPACE}/opt/config/env_name.txt ] && DEP_ENV=$(cat ${WORKSPACE}/opt/config/env_name.txt) || echo ${DEP_ENV}
680[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat ${WORKSPACE}/opt/config/nexus_username.txt) || NEXUS_USERNAME=release
681[ -f ${WORKSPACE}/opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat ${WORKSPACE}/opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
682[ -f ${WORKSPACE}/opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat ${WORKSPACE}/opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
683[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
Michael Lando451a3402017-02-19 10:28:42 +0200684
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300685
Yuli Shlosbergd1bb2e52018-01-15 11:51:21 +0200686export IP=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
dekstroza83520062018-05-03 16:47:08 +0100687#If OSX, then use this to get IP
688if [[ "$OSTYPE" == "darwin"* ]]; then
689 export IP=$(ipconfig getifaddr en0)
690fi
Idan Amitdb3d5542017-12-07 11:33:32 +0200691export PREFIX=${NEXUS_DOCKER_REPO}'/onap'
Idan Amitc7f57ec2017-08-31 14:26:21 +0300692
693if [ ${LOCAL} = true ]; then
Idan Amitdb3d5542017-12-07 11:33:32 +0200694 PREFIX='onap'
Idan Amitc7f57ec2017-08-31 14:26:21 +0300695fi
Michael Lando451a3402017-02-19 10:28:42 +0200696
697echo ""
698
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200699if [ -z "${DOCKER}" ]; then
Michael Lando4b9b9472018-06-02 19:14:05 +0300700 cleanup all
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200701 dir_perms
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200702 sdc-es
703 sdc-init-es
704 sdc-cs
705 sdc-cs-init
Gitelman, Tal (tg851x)19c9bda2018-03-19 19:07:30 +0200706# sdc-kbn
Avi Zivc175a0d2018-03-15 13:21:44 +0200707 sdc-cs-onboard-init
708 sdc-onboard-BE
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200709 sdc-BE
710 sdc-BE-init
711 sdc-FE
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300712 dcae-be
713 dcae-tools
714 dcae-fe
715 healthCheck
Michael Landodc856bb2018-08-13 13:27:52 +0300716 sdc-sim
Yuli Shlosbergf59a2252018-03-21 11:14:08 +0200717 sdc-api-tests
Areli, Fuss (af732p)062d4c12018-06-03 18:49:19 +0300718 sdc-ui-tests
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200719else
720 cleanup ${DOCKER}
svishnev0b698c42018-03-08 15:50:44 +0200721 dir_perms
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200722 ${DOCKER}
Yuli Shlosberge07a5162018-02-26 10:11:10 +0200723 healthCheck
Yuli Shlosberg958c32d2018-02-15 12:04:46 +0200724fi