3 # ============LICENSE_START===============================================
4 # Copyright (C) 2021 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
19 SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
20 docker stop $(docker ps -aq)
21 docker system prune -f
23 cd ${SHELL_FOLDER}/../config
24 cp application_configuration.json.sdnc application_configuration.json
26 cd ${SHELL_FOLDER}/../
27 docker-compose -f docker-compose.yml -f sdnc/docker-compose.yml up -d
34 if [ "$res" == "$expect" ]; then
35 echo -e "$3 is alive!\n"
42 # Healthcheck docker containers
45 echo "check SIM1 status:"
46 checkStatus "curl -skw %{http_code} http://localhost:30001/" "OK200" "SIM1"
49 echo "check SIM2 status:"
50 checkStatus "curl -skw %{http_code} http://localhost:30003/" "OK200" "SIM2"
53 echo "check SIM3 status:"
54 checkStatus "curl -skw %{http_code} http://localhost:30005/" "OK200" "SIM3"
57 echo "check PMS status:"
58 checkStatus "curl -skw %{http_code} http://localhost:8081/status" "hunky dory200" "PMS"
61 echo "check SDNC status:"
62 checkStatus "curl -s -o /dev/null -I -w %{http_code} http://localhost:8282/apidoc/explorer/" "200" "SDNC"
64 cd ${SHELL_FOLDER}/../data