diff options
author | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2018-10-04 15:34:34 -0700 |
---|---|---|
committer | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2018-10-22 14:33:09 -0700 |
commit | 425ba9232b52ee2d40999526ae792bbf2bf76f55 (patch) | |
tree | 3c4f755d02887f4a5a912b8f3a2dd2f1a518fe1f /scripts/optf-has | |
parent | 1344ef2dd571923b5fa40f7c0863477df59d651b (diff) |
OOF SMS CSIT
Added CSIT support for HAS and OSDF with SMS
Bring up dependencies like sms service and related containers
Preload secrets
Removed clear text secrets from config files
Deleted unused osdf folders inside has folders.
osdf uses separate folders now.
Change-Id: Ie534e13b87a98de9f3ab1ed0be66f5f699353d93
Issue-ID: OPTFRA-343
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'scripts/optf-has')
-rw-r--r-- | scripts/optf-has/has/has-properties/conductor.conf.onap | 47 | ||||
-rw-r--r-- | scripts/optf-has/has/has-properties/has.json | 36 | ||||
-rwxr-xr-x | scripts/optf-has/has/has_script.sh | 20 | ||||
-rw-r--r-- | scripts/optf-has/osdf/testsample.txt | 1 |
4 files changed, 58 insertions, 46 deletions
diff --git a/scripts/optf-has/has/has-properties/conductor.conf.onap b/scripts/optf-has/has/has-properties/conductor.conf.onap index c000248c..768e81b3 100644 --- a/scripts/optf-has/has/has-properties/conductor.conf.onap +++ b/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -162,9 +162,12 @@ aaf_url = http://localhost:8100/authz/perms/user/ # From conductor # +# Is Secret Management service enabled (boolean value) +#is_enabled = true + # Base URL for SMS, up to and not including the version, and without a trailing # slash. (string value) -#aaf_sms_url = https://aaf-sms.onap:10443 +aaf_sms_url = http://aaf-sms.onap:10443 # Timeout for SMS API Call (integer value) #aaf_sms_timeout = 30 @@ -172,9 +175,9 @@ aaf_url = http://localhost:8100/authz/perms/user/ # Path to the cacert that will be used to verify If this is None, verify will # be False and the server certis not verified by the client. (string value) #aaf_ca_certs = AAF_RootCA.cer +aaf_ca_certs = /usr/local/bin/AAF_RootCA.cer -# Domain UUID - A unique UUID generated when the domainfor HAS is created by -# administrator during deployment (string value) +# Domain Name for HAS (string value) #secret_domain = has @@ -224,13 +227,6 @@ certificate_key_file = #certificate_authority_bundle_file = certificate_authority_bundle.pem certificate_authority_bundle_file = /usr/local/bin/AAF_RootCA.cer -# Username for AAI. (string value) -username = OOF - -# Password for AAI. (string value) -password = OOF - - [api] # @@ -254,14 +250,6 @@ password = OOF # Base URL for plans. (string value) #server_url = -# username for plans. (string value) -#username = -username = admin1 - -# password for plans. (string value) -#password = -password = plan.15 - # auth toggling. (boolean value) basic_auth_secure = false @@ -463,21 +451,6 @@ music_new_version = True #music_version = <None> music_version = "3.0.21" -# username value that used for creating basic authorization header (string -# value) -#aafuser = <None> -aafuser = conductor - -# password value that used for creating basic authorization header (string -# value) -#aafpass = <None> -aafpass = c0nduct0r - -# AAF namespace field used in MUSIC request header (string value) -#aafns = <None> -aafns = conductor - - [prometheus] # @@ -534,14 +507,6 @@ concurrent = true #server_url = https://controller:8443/restconf/ server_url = http://localhost:8083/restconf/ -# Basic Authentication Username (string value) -#username = <None> -username = admin - -# Basic Authentication Password (string value) -#password = <None> -password = Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U - # Timeout for SDNC Rest Call (string value) #sdnc_rest_timeout = 30 diff --git a/scripts/optf-has/has/has-properties/has.json b/scripts/optf-has/has/has-properties/has.json new file mode 100644 index 00000000..ae990a9e --- /dev/null +++ b/scripts/optf-has/has/has-properties/has.json @@ -0,0 +1,36 @@ +{ + "domain": { + "name": "has", + "secrets": [ + { + "name": "aai", + "values": { + "username": "oof@oof.onap.org", + "password": "demo123456!" + } + }, + { + "name": "conductor_api", + "values": { + "username": "admin1", + "password": "plan.15" + } + }, + { + "name": "sdnc", + "values": { + "username": "admin", + "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + } + }, + { + "name": "music_api", + "values": { + "aafuser": "conductor", + "aafpass": "c0nduct0r", + "aafns": "conductor" + } + } + ] + } +} diff --git a/scripts/optf-has/has/has_script.sh b/scripts/optf-has/has/has_script.sh index 1364c87b..08663f4e 100755 --- a/scripts/optf-has/has/has_script.sh +++ b/scripts/optf-has/has/has_script.sh @@ -35,14 +35,18 @@ IMAGE_VER=1.2.2-SNAPSHOT-latest BUNDLE=/tmp/conductor/properties/AAF_RootCA.cer mkdir -p /tmp/conductor/properties +mkdir -p /tmp/sms/properties mkdir -p /tmp/conductor/logs cp ${WORKSPACE}/scripts/optf-has/has/has-properties/conductor.conf.onap /tmp/conductor/properties/conductor.conf cp ${WORKSPACE}/scripts/optf-has/has/has-properties/log.conf.onap /tmp/conductor/properties/log.conf cp ${WORKSPACE}/scripts/optf-has/has/has-properties/AAF_RootCA.cer /tmp/conductor/properties/AAF_RootCA.cer +cp ${WORKSPACE}/scripts/optf-has/has/has-properties/has.json /tmp/sms/properties/has.json #chmod -R 777 /tmp/conductor/properties MUSIC_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` echo "MUSIC_IP=${MUSIC_IP}" +SMS_IP=`get-instance-ip.sh sms` +echo "SMS_IP=${SMS_IP}" # change MUSIC reference to the local instance sed -i -e "s%localhost:8080/MUSIC%${MUSIC_IP}:8080/MUSIC%g" /tmp/conductor/properties/conductor.conf @@ -65,6 +69,14 @@ echo "AAFSIM_IP=${AAFSIM_IP}" # change AAF reference to the local instance sed -i -e "s%localhost:8100/%${AAFSIM_IP}:8100/%g" /tmp/conductor/properties/conductor.conf +#SMS +sed -i -e "s%aaf-sms.onap:10443%${SMS_IP}:10443%g" /tmp/conductor/properties/conductor.conf +#Preload secrets +docker exec -i sms /bin/sh -c "mkdir -p /preload/config" +docker cp /tmp/sms/properties/has.json sms:/preload/config/has.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 logs vault + #onboard conductor into music echo "Query MUSIC to check for reachability. Query Version" curl -vvvvv --noproxy "*" --request GET http://${MUSIC_IP}:8080/MUSIC/rest/v2/version -H "Content-Type: application/json" @@ -72,13 +84,13 @@ curl -vvvvv --noproxy "*" --request GET http://${MUSIC_IP}:8080/MUSIC/rest/v2/ve echo "Onboard conductor into music" curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" -H "Authorization: Basic Y29uZHVjdG9yOmMwbmR1Y3Qwcg==" --data @${WORKSPACE}/tests/optf-has/has/data/onboard.json -docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${BUNDLE}:/usr/local/bin/AAF_RootCA.cer ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf sleep 15 -docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${BUNDLE}:/usr/local/bin/AAF_RootCA.cer ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf sleep 15 -docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${BUNDLE}:/usr/local/bin/AAF_RootCA.cer ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf sleep 15 -docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${BUNDLE}:/usr/local/bin/AAF_RootCA.cer ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf sleep 5 docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${BUNDLE}:/usr/local/bin/AAF_RootCA.cer ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf sleep 15 diff --git a/scripts/optf-has/osdf/testsample.txt b/scripts/optf-has/osdf/testsample.txt deleted file mode 100644 index 9f4e8d7d..00000000 --- a/scripts/optf-has/osdf/testsample.txt +++ /dev/null @@ -1 +0,0 @@ -#test |