Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document highlights design considered for to Provision authenticated, authorized DMaaP topics on Message Router and feeds on Data Router .

...

Code Block
languagebash
themeEmacs
titledcae-datafile-collector initContainer dcae-datafile-collector-init-dmaap-provisioning Log
collapsetrue
$ kubectl logs -f -n onap dev-dcae-datafile-collector-d996487db-6wdjb -c dcae-datafile-collector-init-dmaap-provisioning

+ export 'PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
+ RESP_CACHE=/opt/app/config/cache
+ RESP=/dev/null
+ APP_ROOT=/opt/app/dbc-client
+ CONFIGMAP_ROOT=/opt/app/config
+ PORT=8443
+ DBC=dmaap-bc
+ PROTO=https
+ PARAM='useExisting=true'
+ REQUESTID=dcae-datafile-collector-dmaap-provisioning
+ URL=https://dmaap-bc:8443/webapi/
+ CA_PEM=ca.pem
+ KEY_PEM=key.pem
+ CLIENT_PEM=client.pem
+ PEM_DIR=/opt/app/osaaf/local
+ CERT_PWD='2U[iOZzMHI:.#tdCwlBqc;}S'
+ BA_PWD='demo123456!'
+ AUTH_METHOD=basicAuth
+ BA_IDENTITY=dmaap-bc@dmaap-bc.onap.org
+ init_config
+ '[' '!' -d /opt/app/dbc-client -a '!' -d /opt/app/config ]
+ cd /opt/app/osaaf/local
+ '[' basicAuth '=' basicAuth ]
+ echo '-u dmaap-bc@dmaap-bc.onap.org:demo123456!'
+ CURL_CRED='-K /opt/app/osaaf/local/curl.cred'
+ init_dbc_provisioning
+ cd /opt/app/config
+ '[' -d dmaap ]
+ '[' -d dcaeLocations ]
+ '[' -d mr_clusters ]
+ '[' -d topics ]
+ '[' -d mr_clients ]
+ '[' -d dr_nodes ]
+ '[' -d feeds ]
+ ls feeds/feedConfig-0.json
+ do_http_post feeds/feedConfig-0.json feeds
+ RETRY_TIME=60
+ '[' -n /opt/app/config/cache ]
+ cut -d . -f1
+ echo feedConfig-0.json
+ RESP=/opt/app/config/cache/feedConfig-0-resp.json
+ true
+ '[' feeds '!=' feeds -a feeds '!=' topics ]
+ xcurl -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'https://dmaap-bc:8443/webapi/feeds/?useExisting=true'
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-datafile-collector-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'https://dmaap-bc:8443/webapi/feeds/?useExisting=true'
Http Post request for feed creation is successful with response code=200
+ rc=200
+ '[' 200 '=' 200 -o 200 '=' 201 -o 200 '=' 409 ]
+ echo 'Http Post request for feed creation is successful with response code=200'
+ break
+ '[' -d dr_pubs ]
+ ls dr_pubs/drpubConfig-0.json
+ do_http_post dr_pubs/drpubConfig-0.json dr_pubs
+ RETRY_TIME=60
+ '[' -n /opt/app/config/cache ]
+ echo drpubConfig-0.json
+ cut -d . -f1
+ RESP=/opt/app/config/cache/drpubConfig-0-resp.json
+ true
+ '[' dr_pubs '!=' feeds -a dr_pubs '!=' topics ]
+ cat dr_pubs/drpubConfig-0.json
+ envsubst
+ json_input='{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed"}'
+ xcurl -o /opt/app/config/cache/drpubConfig-0-resp.json -d '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed"}' https://dmaap-bc:8443/webapi/dr_pubs
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-datafile-collector-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/drpubConfig-0-resp.json -d '{"dcaeLocationName":"loc00","feedName":"bulk_pm_feed"}' https://dmaap-bc:8443/webapi/dr_pubs
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request is successful with response code=201'
+ break
+ '[' -d dr_subs ]
Http Post request is successful with response code=201

3. Log snippet from dcae-pm-mapper initContainer dcae-pm-mapper-init-dmaap-provisioning for creation of Feeds and Dr Subscriber and MessageRouter Topics.

Code Block
languagebash
themeEmacs
titledcae-pm-mapper initContainer dcae-pm-mapper-init-dmaap-provisioning Log
collapsetrue
$ kubectl logs -f -n onap dev-dcae-pm-mapper-6d84cb4757-mljn9 -c dcae-pm-mapper-init-dmaap-provisioning

+ export 'PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
+ RESP_CACHE=/opt/app/config/cache
+ RESP=/dev/null
+ APP_ROOT=/opt/app/dbc-client
+ CONFIGMAP_ROOT=/opt/app/config
+ PORT=8443
+ DBC=dmaap-bc
+ PROTO=https
+ PARAM='useExisting=true'
+ REQUESTID=dcae-pm-mapper-dmaap-provisioning
+ URL=https://dmaap-bc:8443/webapi/
+ CA_PEM=ca.pem
+ KEY_PEM=key.pem
+ CLIENT_PEM=client.pem
+ PEM_DIR=/opt/app/osaaf/local
+ CERT_PWD='2U[iOZzMHI:.#tdCwlBqc;}S'
+ BA_PWD='demo123456!'
+ AUTH_METHOD=basicAuth
+ BA_IDENTITY=dmaap-bc@dmaap-bc.onap.org
+ init_config
+ '[' '!' -d /opt/app/dbc-client -a '!' -d /opt/app/config ]
+ cd /opt/app/osaaf/local
+ '[' basicAuth '=' basicAuth ]
+ echo '-u dmaap-bc@dmaap-bc.onap.org:demo123456!'
+ CURL_CRED='-K /opt/app/osaaf/local/curl.cred'
+ init_dbc_provisioning
+ cd /opt/app/config
+ '[' -d dmaap ]
+ '[' -d dcaeLocations ]
+ '[' -d mr_clusters ]
+ '[' -d topics ]
+ ls topics/topicsConfig-0.json
+ do_http_post topics/topicsConfig-0.json topics
+ RETRY_TIME=60
+ '[' -n /opt/app/config/cache ]
+ echo+  topicsConfig-0.json
cut -d . -f1
+ RESP=/opt/app/config/cache/topicsConfig-0-resp.json
+ true
+ '[' topics '!=' feeds -a topics '!=' topics ]
+ xcurl -o /opt/app/config/cache/topicsConfig-0-resp.json -d @topics/topicsConfig-0.json 'https://dmaap-bc:8443/webapi/topics/?useExisting=true'
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-pm-mapper-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/topicsConfig-0-resp.json -d @topics/topicsConfig-0.json 'https://dmaap-bc:8443/webapi/topics/?useExisting=true'
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request for feed creation is successful with response code=201'
+ break
+ '[' -d mr_clients ]
+ '[' -d dr_nodes ]
+ '[' -d feeds ]
Http Post request for feed creation is successful with response code=201
+ ls feeds/feedConfig-0.json
+ do_http_post feeds/feedConfig-0.json feeds
+ RETRY_TIME=60
+ '[' -n /opt/app/config/cache ]
+ echo feedConfig-0.json
+ cut -d . -f1
+ RESP=/opt/app/config/cache/feedConfig-0-resp.json
+ true
+ '[' feeds '!=' feeds -a feeds '!=' topics ]
+ xcurl -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'https://dmaap-bc:8443/webapi/feeds/?useExisting=true'
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-pm-mapper-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/feedConfig-0-resp.json -d @feeds/feedConfig-0.json 'https://dmaap-bc:8443/webapi/feeds/?useExisting=true'
+ rc=200
+ '[' 200 '=' 200 -o 200 '=' 201 -o 200 '=' 409 ]
+ echo 'Http Post request for feed creation is successful with response code=200'
+ break
+ '[' -d dr_pubs ]
+ '[' -d dr_subs ]
Http Post request for feed creation is successful with response code=200
+ ls dr_subs/drsubConfig-0.json
+ do_http_post dr_subs/drsubConfig-0.json dr_subs
+ RETRY_TIME=60
+ '[' -n /opt/app/config/cache ]
+ echo drsubConfig-0.json
+ cut -d . -f1
+ RESP=/opt/app/config/cache/drsubConfig-0-resp.json
+ true
+ '[' dr_subs '!=' feeds -a dr_subs '!=' topics ]
+ cat dr_subs/drsubConfig-0.json
+ envsubst
+ json_input='{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}'
+ xcurl -o /opt/app/config/cache/drsubConfig-0-resp.json -d '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' https://dmaap-bc:8443/webapi/dr_subs
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dcae-pm-mapper-dmaap-provisioning' -H 'Content-Type: application/json' -o /opt/app/config/cache/drsubConfig-0-resp.json -d '{"dcaeLocationName":"loc00","decompress":true,"deliveryURL":"https://dcae-pm-mapper:8443/delivery","feedName":"bulk_pm_feed","privilegedSubscriber":true,"username":"username","userpwd":"password"}' https://dmaap-bc:8443/webapi/dr_subs
Http Post request is successful with response code=201
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request is successful with response code=201'
+ break



Open Issues

Data Router Publisher/Subscriber behaviour is not consistent 

  1. On dr_publiser creation if we dont provide username/password a  default usename/password is created, but the same is not happening for dr_subscriber.
  2. On both dr_publisher / dr_subscriber creation creation if username/password is provided as part of input dmaap-dbc client Api returns username as output and password is defaulted ot "NULL".

 Cmpv2Certificates generation

  1. While testing with 5gbulkpm testcase  Cmpv2Certificates processing is failing send mail for clarification - Issue was due to incorrect configuration its resolved now (Poor documentation on Cmpv2 enabling)



**Further analysis is on going will be updating this wiki as we move along.

...