diff options
author | Marcin Przybysz <marcin.przybysz@nokia.com> | 2020-03-03 14:00:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-03 14:00:59 +0000 |
commit | 76c23b4b58627443b19ccab994f17943d5c7902f (patch) | |
tree | efa2d5d2622c81a8d9cff2db57d02a3e50307559 /plans/aaf/certservice/setup.sh | |
parent | f3f1b5e5f426fc181d25061cef39429b9498106f (diff) | |
parent | 7a5e3f62e3db0052112938397c4b194836b6a91b (diff) |
Merge "Add EJBCA setup to AAF Cert Service CSITs"
Diffstat (limited to 'plans/aaf/certservice/setup.sh')
-rw-r--r-- | plans/aaf/certservice/setup.sh | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/plans/aaf/certservice/setup.sh b/plans/aaf/certservice/setup.sh index 1bf57470..4911e475 100644 --- a/plans/aaf/certservice/setup.sh +++ b/plans/aaf/certservice/setup.sh @@ -15,16 +15,20 @@ # limitations under the License. # -AAFCERT_IMAGE=nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-api:latest - -echo AAFCERT_IMAGE=${AAFCERT_IMAGE} - # ------------------------------------ -# Resolve path to cmp servers configuration +# Resolve path to script's folder and cmp servers configuration SCRIPT=`realpath $0` CURRENT_WORKDIR_PATH=`dirname $SCRIPT` +SCRIPTS_DIRECTORY="scripts" +if test -d "$CURRENT_WORKDIR_PATH/plans/aaf/certservice/$SCRIPTS_DIRECTORY"; then + SCRIPTS_PATH="$CURRENT_WORKDIR_PATH/plans/aaf/certservice/$SCRIPTS_DIRECTORY" +else test -f "$CURRENT_WORKDIR_PATH/$SCRIPTS_DIRECTORY"; + SCRIPTS_PATH=$CURRENT_WORKDIR_PATH/$SCRIPTS_DIRECTORY +fi +echo "Use scripts from: $SCRIPTS_PATH" + CONFIGURATION_FILE="cmpServers.json" if test -f "$CURRENT_WORKDIR_PATH/plans/aaf/certservice/$CONFIGURATION_FILE"; then CONFIGURATION_PATH="$CURRENT_WORKDIR_PATH/plans/aaf/certservice/$CONFIGURATION_FILE" @@ -32,14 +36,17 @@ else test -f "$CURRENT_WORKDIR_PATH/$CONFIGURATION_FILE"; CONFIGURATION_PATH=$CURRENT_WORKDIR_PATH/$CONFIGURATION_FILE fi echo "Use configuration from: $CONFIGURATION_PATH" + # ------------------------------------- -# Start AAF Cert Srevice -docker run -p 8080:8080 -d --mount type=bind,source=${CONFIGURATION_PATH},target=/etc/onap/aaf/certservice/cmpServers.json --name aafcert ${AAFCERT_IMAGE} +export CONFIGURATION_PATH=${CONFIGURATION_PATH} +export SCRIPTS_PATH=${SCRIPTS_PATH} + +docker-compose up -d AAFCERT_IP=`get-instance-ip.sh aafcert` export AAFCERT_IP=${AAFCERT_IP} # Wait container ready -sleep 5 +sleep 10 |