diff options
Diffstat (limited to 'scripts/optf-osdf')
-rw-r--r-- | scripts/optf-osdf/osdf/osdf-properties/osdf.json | 25 | ||||
-rwxr-xr-x | scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml | 5 | ||||
-rwxr-xr-x | scripts/optf-osdf/osdf/osdf_script.sh | 6 | ||||
-rwxr-xr-x | scripts/optf-osdf/osdf/setup-sms.sh | 71 |
4 files changed, 94 insertions, 13 deletions
diff --git a/scripts/optf-osdf/osdf/osdf-properties/osdf.json b/scripts/optf-osdf/osdf/osdf-properties/osdf.json index 0950957b..e52cb0cd 100644 --- a/scripts/optf-osdf/osdf/osdf-properties/osdf.json +++ b/scripts/optf-osdf/osdf/osdf-properties/osdf.json @@ -13,21 +13,21 @@ "name": "conductor", "values": { "UserName": "admin1", - "Password": "plan.15" + "Password": "22234d3472ef5da8ecba5a096110a024f1db5cf195c665f910d558c9e83db19d" } }, { "name": "policyPlatform", "values": { "UserName": "testpdp", - "Password": "alpha123" + "Password": "7a03bdee7a0381daf4ee426b9d2b695e3f4233ffd19a852a3fb0ff0156fbdde7" } }, { "name": "policyClient", "values": { "UserName": "python", - "Password": "test" + "Password": "3a3c8546c91f99f4becc069ba0fbb13ef46f4f3028f5bba09f3f4a9030ddc0a0" } }, { @@ -48,35 +48,35 @@ "name": "osdfPlacement", "values": { "UserName": "test", - "Password": "testpwd" + "Password": "c66b1570ae257375e500f9fe0e62b2a325466137ac5f29581e2e05cce1170212" } }, { "name": "osdfPlacementSO", "values": { "UserName": "so_test", - "Password": "so_testpwd" + "Password": "3d62d49b3e4ada38fd4146d2d82f4ba2f09345a46f15970cd439924c991b8202" } }, { "name": "osdfPlacementVFC", "values": { "UserName": "vfc_test", - "Password": "vfc_testpwd" + "Password": "1fb1cd581f96060d29ecad06be97151656bf29bce66bad587cd2fbaf5ea1e66d" } }, { "name": "osdfCMScheduler", "values": { "UserName": "test1", - "Password": "testpwd1" + "Password": "c5279fb02d7bac5269b1a644ac8e36f41f6ba7a2eae03dc469cb80d71811322b" } }, { "name": "configDb", "values": { "UserName": "osdf", - "Password": "passwd" + "Password": "40697f254409c2b97763892ecdeb50c847d605f5beb6f988f1c142a7e0344d0c" } }, { @@ -90,7 +90,14 @@ "name": "osdfPCIOpt", "values": { "UserName": "pci_test", - "Password": "pci_testpwd" + "Password": "fbf4dcb7f7cda8fdfb742838b0c90ae5bea249801f3f725fdc98941a6e4c347c" + } + }, + { + "name": "osdfOptEngine", + "values": { + "UserName": "opt_test", + "Password": "02946408ce6353d45540cd01d912686f19f48c3d8a955d5effdc14c6a43477e5" } } ] diff --git a/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml b/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml index f8f75005..6578567f 100755 --- a/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml +++ b/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml @@ -18,7 +18,7 @@ conductorMaxRetries: 5 # if we don't get something in 30 minutes, give up conductorMinorVersion: 0 # Policy Platform -- requires ClientAuth, Authorization, and Environment -policyPlatformUrl: http://127.0.0.1:5000/simulated/policy/pdp-has-vcpe-good/getConfig # Policy Dev platform URL +policyPlatformUrl: http://127.0.0.1:5000/simulated/policy/pdpx/decision/v1 # Policy Dev platform URL policyPlatformEnv: TEST # Environment for policy platform # Config for DMaaP @@ -47,3 +47,6 @@ aaf_ca_certs: ssl_certs/aaf_root_ca.cer configDbUrl: http://127.0.0.1:5000/simulated/configdb configDbGetCellListUrl: 'getCellList' configDbGetNbrListUrl: 'getNbrList' + +#key +appkey: os35@rrtky400fdntc#001t5
\ No newline at end of file diff --git a/scripts/optf-osdf/osdf/osdf_script.sh b/scripts/optf-osdf/osdf/osdf_script.sh index 6d4efa19..3554b55e 100755 --- a/scripts/optf-osdf/osdf/osdf_script.sh +++ b/scripts/optf-osdf/osdf/osdf_script.sh @@ -34,7 +34,7 @@ cd ${DIR} # run docker containers OSDF_CONF=/tmp/osdf/properties/osdf_config.yaml IMAGE_NAME=nexus3.onap.org:10001/onap/optf-osdf -IMAGE_VER=1.2.4-SNAPSHOT-latest +IMAGE_VER=2.0.1-SNAPSHOT-latest mkdir -p /tmp/osdf/properties mkdir -p /tmp/sms/properties @@ -52,9 +52,9 @@ sed -i -e "s%127.0.0.1:5000%${OSDF_SIM_IP}:5000%g" $OSDF_CONF sed -i -e "s%aaf-sms.onap:10443%${SMS_IP}:10443%g" $OSDF_CONF #Preload secrets -docker exec -i sms /bin/sh -c "mkdir -p /preload/config" +docker exec --user root -i sms /bin/sh -c "mkdir -p /preload/config" docker cp /tmp/sms/properties/osdf.json sms:/preload/config/osdf.json -docker exec -i sms /bin/sh -c "/sms/bin/preload -cacert /sms/certs/aaf_root_ca.cer -jsondir /preload/config -serviceport 10443 -serviceurl http://localhost" +docker exec --user root -i sms /bin/sh -c "/sms/bin/preload -cacert /sms/certs/aaf_root_ca.cer -jsondir /preload/config -serviceport 10443 -serviceurl http://localhost" docker logs vault docker run -d --name optf-osdf -v ${OSDF_CONF}:/opt/osdf/config/osdf_config.yaml -p "8698:8699" ${IMAGE_NAME}:${IMAGE_VER} diff --git a/scripts/optf-osdf/osdf/setup-sms.sh b/scripts/optf-osdf/osdf/setup-sms.sh new file mode 100755 index 00000000..e6a4b227 --- /dev/null +++ b/scripts/optf-osdf/osdf/setup-sms.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# +# Copyright 2018 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Not sure why this is needed. +source ${SCRIPTS}/common_functions.sh + +CONFIG_FILE=$(pwd)/config/smsconfig.json + +mkdir -p $(pwd)/config + +docker login -u docker -p docker nexus3.onap.org:10001 +docker pull nexus3.onap.org:10001/onap/aaf/sms +docker pull docker.io/vault:1.3.3 + +# +# Running vault in dev server mode here for CSIT +# In HELM it runs in production mode +# +docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \ + -e SKIP_SETCAP=true \ + --name vault -d -p 8200:8200 vault:1.3.3 + +SMSDB_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vault) +cat << EOF > $CONFIG_FILE +{ + "cafile": "auth/selfsignedca.pem", + "servercert": "auth/server.cert", + "serverkey": "auth/server.key", + + "smsdbaddress": "http://$SMSDB_IP:8200", + "vaulttoken": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "disable_tls": true +} +EOF + +cat $CONFIG_FILE + +docker run --workdir /sms -v $CONFIG_FILE:/sms/smsconfig.json \ + --name sms -d -p 10443:10443 --user root nexus3.onap.org:10001/onap/aaf/sms + +SMS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sms) + +echo "###### WAITING FOR ALL CONTAINERS TO COME UP" +sleep 20 +for i in {1..20}; do + curl -sS -m 1 http://${SMSDB_IP}:8200/v1/sys/seal-status && break + echo sleep $i + sleep $i +done + +# +# add here all ROBOT_VARIABLES settings +# +echo "# sms robot variables settings"; +ROBOT_VARIABLES="-v SMS_HOSTNAME:http://${SMS_IP} -v SMS_PORT:10443" + +echo ${ROBOT_VARIABLES} |