1 # Copyright (C) 2021 Nordix Foundation. All rights reserved.
2 # ========================================================================
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # ============LICENSE_END=================================================
17 SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
18 docker stop $(docker ps -aq)
19 docker system prune -f
21 # build o-ru application image
22 cd ${SHELL_FOLDER}/../app/
23 docker build -t oru-app .
25 # build simulator image of sdnr
26 cd ${SHELL_FOLDER}/../simulators/
27 docker build -f Dockerfile-sdnr-sim -t sdnr-simulator .
29 # build message generator image
30 docker build -f Dockerfile-message-generator -t message-generator .
32 # start up dmaap message router
33 cd ${SHELL_FOLDER}/../../../../docker-compose/
34 docker-compose -f docker-compose.yaml -f mr/docker-compose.yml up -d
36 # wait until mr up & running
38 res=$(curl -o /dev/null -sw %{http_code} http://localhost:3904/topics)
41 if [ "$res" == "$expect" ]; then
42 echo -e "dmaap-mr is alive!\n"
49 # start up oru, message-generator and sdnr-simulator