X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Ftest%2FSTD_2.0.0%2Fbuild_and_start_with_kafka.sh;h=b12ecf77d4e7a54f1006aa818f7340bab31bf56c;hb=refs%2Fheads%2Fi-release;hp=97f2a0f096cc6528f12d0a9d5f947d0b5bc7227c;hpb=b5ca7ce70bdfa58701f9fb5fe8a36a4a8b55bc82;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/test/STD_2.0.0/build_and_start_with_kafka.sh b/near-rt-ric-simulator/test/STD_2.0.0/build_and_start_with_kafka.sh index 97f2a0f..b12ecf7 100755 --- a/near-rt-ric-simulator/test/STD_2.0.0/build_and_start_with_kafka.sh +++ b/near-rt-ric-simulator/test/STD_2.0.0/build_and_start_with_kafka.sh @@ -21,11 +21,11 @@ # Make sure to run the simulator with the same arg as this script print_usage() { - echo "Usage: ./build_and_start.sh duplicate-check|ignore-duplicate kafka-srv|kafka-srv-secure|ignore-kafka-srv" + echo "Usage: ./build_and_start.sh duplicate-check|ignore-duplicate kafka-srv|kafka-srv-secure publish-resp|ignore-publish" exit 1 } -if [ $# -ne 2 ]; then +if [ $# -ne 3 ]; then print_usage fi @@ -41,8 +41,14 @@ if [ $2 == "kafka-srv" ]; then URL="http://localhost:7075" elif [ $2 == "kafka-srv-secure" ]; then URL="https://localhost:7175" -elif [ $2 == "ignore-kafka-srv" ]; then - URL="" +else + print_usage +fi + +if [ $3 == "publish-resp" ]; then + PUBLISH_RESP="-e PUBLISH_RESP=1" +elif [ $3 == "ignore-publish" ]; then + PUBLISH_RESP="" else print_usage fi @@ -89,8 +95,9 @@ fi # Runs kafka server in detached mode # In order to tail logs use:: docker logs -f kafkamessagedispatcher if [ ! -z "$URL" ]; then - docker run -d --network host --rm -it -p 7075:7075 -p 7175:7175 -e ALLOW_HTTP=true -e MSG_BROKER_URL=localhost:9092 -e TIME_OUT=30 --volume "$dirkafkasrv/certificate:/usr/src/app/cert" --name kafkamessagedispatcher kafka_dispatcher + docker run -d --network host --rm -it -p 7075:7075 -p 7175:7175 -e ALLOW_HTTP=true -e MSG_BROKER_URL=localhost:9092 -e TIME_OUT=30 $PUBLISH_RESP --volume "$dirkafkasrv/certificate:/usr/src/app/cert" --name kafkamessagedispatcher kafka_dispatcher fi -# Runs A1 simulator -docker run --network host --rm -it -p 8085:8085 -p 8185:8185 -e A1_VERSION=STD_2.0.0 -e ALLOW_HTTP=true -e REMOTE_HOSTS_LOGGING=1 -e DUPLICATE_CHECK=$DUP_CHECK $URL_FLAG --volume "$dirnrtsim/certificate:/usr/src/app/cert" --name a1StdSimulator a1test +# Runs A1 simulator in detached mode +# In order to tail logs use:: docker logs -f a1StdSimulator +docker run -d --network host --rm -it -p 8085:8085 -p 8185:8185 -e A1_VERSION=STD_2.0.0 -e ALLOW_HTTP=true -e REMOTE_HOSTS_LOGGING=1 -e DUPLICATE_CHECK=$DUP_CHECK $URL_FLAG --volume "$dirnrtsim/certificate:/usr/src/app/cert" --name a1StdSimulator a1test