...
Code Block |
---|
language | actionscript3 |
---|
theme | Emacs |
---|
title | InitContainer Code Snip |
---|
linenumbers | true |
---|
collapse | true |
---|
|
- name: {{ include "common.name" $dot }}-init-merge-config
image: {{ include "repositoryGenerator.image.envsubst" $dot }}
imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }}
command:
- /bin/sh
args:
- -c
- |
if [ -d /opt/app/config/cache/ ]; then
cd /opt/app/config/cache/
for file in $(ls feed*); do
NUM=$(echo "$file" | sed 's/feedConfig-\([0-9]\+\)-resp.json/\1/')
export DR_LOG_URL_"$NUM"="$(grep -o '"logURL":"[^"]*' "$file" | cut -d '"' -f4)"
export DR_FILES_PUBLISHER_URL_"$NUM"="$(grep -o '"publishURL":"[^"]*' "$file" | cut -d '"' -f4)"
done
for file in $(ls drpub*); do
NUM=$(echo "$file" | sed 's/drpubConfig-\([0-9]\+\)-resp.json/\1/')
export DR_USERNAME_"$NUM"="$(grep -o '"username":"[^"]*' "$file" | cut -d '"' -f4)"
export DR_PASSWORD_"$NUM"="$(grep -o '"userpwd":"[^"]*' "$file" | cut -d '"' -f4)"
export DR_FILES_PUBLISHER_ID_"$NUM"="$(grep -o '"pubId":"[^"]*' "$file" | cut -d '"' -f4)"
done
for file in $(ls drsub*); do
NUM=$(echo "$file" | sed 's/drsubConfig-\([0-9]\+\)-resp.json/\1/')
export DR_USERNAME_"$NUM"="$(grep -o '"username":"[^"]*' "$file" | cut -d '"' -f4)"
export DR_PASSWORD_"$NUM"="$(grep -o '"userpwd":"[^"]*' "$file" | cut -d '"' -f4)"
export DR_FILES_SUBSCRIBER_ID_"$NUM"="$(grep -o '"subId":"[^"]*' "$file" | cut -d '"' -f4)"
done
else
echo "No Response logged for Dmaap BusController Http POST Request..!"
fi
cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done
volumeMounts:
- mountPath: /opt/app/config/cache/
name: dbc-response-cache
- mountPath: /config-input
name: app-config-input
- mountPath: /config
name: app-config |
Container Logs
1. Log snippet collected for dmaap-bc-dmaap-provisioning conatiner making sure it work with updated changes in dbc script.
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | dmaap-bc-dmaap-provisioning Log |
---|
collapse | true |
---|
|
$ kubectl logs -f -n onap dev-dmaap-bc-dmaap-provisioning-n9zfp
+ export 'PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
+ RESP_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=dmaap-bc-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 ]
+ ls dmaap/onap.json
+ do_http_post dmaap/onap.json dmaap
+ RETRY_TIME=60
+ '[' -n ]
+ true
+ '[' dmaap '!=' feeds -a dmaap '!=' topics ]
+ cat dmaap/onap.json
+ envsubst
+ json_input='{
"dmaapName": "mr",
"drProvUrl": "https://dmaap-dr-prov",
"version": "1",
"topicNsRoot": "org.onap.dmaap",
"bridgeAdminTopic": "DCAE_MM_AGENT"
}'
+ xcurl -o /dev/null -d '{
"dmaapName": "mr",
"drProvUrl": "https://dmaap-dr-prov",
"version": "1",
"topicNsRoot": "org.onap.dmaap",
"bridgeAdminTopic": "DCAE_MM_AGENT"
}' https://dmaap-bc:8443/webapi/dmaap
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d '{
"dmaapName": "mr",
"drProvUrl": "https://dmaap-dr-prov",
"version": "1",
"topicNsRoot": "org.onap.dmaap",
"bridgeAdminTopic": "DCAE_MM_AGENT"
}' https://dmaap-bc:8443/webapi/dmaap
Http Post request is successful with response code=200
+ rc=200
+ '[' 200 '=' 200 -o 200 '=' 201 -o 200 '=' 409 ]
+ echo 'Http Post request is successful with response code=200'
+ break
+ '[' -d dcaeLocations ]
+ ls dcaeLocations/san-francisco.json
+ do_http_post dcaeLocations/san-francisco.json dcaeLocations
+ RETRY_TIME=60
+ '[' -n ]
+ true
+ '[' dcaeLocations '!=' feeds -a dcaeLocations '!=' topics ]
+ cat dcaeLocations/san-francisco.json
+ envsubst
+ json_input='{
"dcaeLayer": "kubernetes-central",
"dcaeLocationName": "san-francisco"
}'
+ xcurl -o /dev/null -d '{
"dcaeLayer": "kubernetes-central",
"dcaeLocationName": "san-francisco"
}' https://dmaap-bc:8443/webapi/dcaeLocations
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d '{
"dcaeLayer": "kubernetes-central",
"dcaeLocationName": "san-francisco"
}' https://dmaap-bc:8443/webapi/dcaeLocations
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request is successful with response code=201'
+ break
+ '[' -d mr_clusters ]
Http Post request is successful with response code=201
+ ls mr_clusters/san-francisco.json
+ do_http_post mr_clusters/san-francisco.json mr_clusters
+ RETRY_TIME=60
+ '[' -n ]
+ true
+ '[' mr_clusters '!=' feeds -a mr_clusters '!=' topics ]
+ cat mr_clusters/san-francisco.json
+ envsubst
+ json_input='{
"dcaeLocationName": "san-francisco",
"fqdn": "message-router",
"topicProtocol": "http",
"topicPort": "3904"
}'
+ xcurl -o /dev/null -d '{
"dcaeLocationName": "san-francisco",
"fqdn": "message-router",
"topicProtocol": "http",
"topicPort": "3904"
}' https://dmaap-bc:8443/webapi/mr_clusters
+ curl -X POST -s '-K /opt/app/osaaf/local/curl.cred' -w '%{http_code}' -H 'X-ECOMP-RequestID: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d '{
"dcaeLocationName": "san-francisco",
"fqdn": "message-router",
"topicProtocol": "http",
"topicPort": "3904"
}' https://dmaap-bc:8443/webapi/mr_clusters
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request is successful with response code=201'
+ break
+ '[' -d topics ]
Http Post request is successful with response code=201
+ ls topics/PNF_READY.json topics/PNF_REGISTRATION.json topics/mirrormakeragent.json
+ do_http_post topics/PNF_READY.json topics
+ RETRY_TIME=60
+ '[' -n ]
+ true
+ '[' topics '!=' feeds -a topics '!=' topics ]
+ xcurl -o /dev/null -d @topics/PNF_READY.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: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d @topics/PNF_READY.json 'https://dmaap-bc:8443/webapi/topics/?useExisting=true'
Http Post request for feed creation is successful with response code=201
+ rc=201
+ '[' 201 '=' 200 -o 201 '=' 201 -o 201 '=' 409 ]
+ echo 'Http Post request for feed creation is successful with response code=201'
+ break
+ do_http_post topics/PNF_REGISTRATION.json topics
+ RETRY_TIME=60
+ '[' -n ]
+ true
+ '[' topics '!=' feeds -a topics '!=' topics ]
+ xcurl -o /dev/null -d @topics/PNF_REGISTRATION.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: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d @topics/PNF_REGISTRATION.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
Http Post request for feed creation is successful with response code=201
+ do_http_post topics/mirrormakeragent.json topics
+ RETRY_TIME=60
+ '[' -n ]
+ true
+ '[' topics '!=' feeds -a topics '!=' topics ]
+ xcurl -o /dev/null -d @topics/mirrormakeragent.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: dmaap-bc-dmaap-provisioning' -H 'Content-Type: application/json' -o /dev/null -d @topics/mirrormakeragent.json 'https://dmaap-bc:8443/webapi/topics/?useExisting=true'
Http Post request for feed creation is successful with response code=201
+ 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 ]
+ ls 'dr_nodes/*.json'
ls: dr_nodes/*.json: No such file or directory
+ '[' -d feeds ]
+ ls 'feeds/*.json'
ls: feeds/*.json: No such file or directory
+ '[' -d dr_pubs ]
+ '[' -d dr_subs ] |
2. Log snippet from dcae-datafile-collector initContainer dcae-datafile-collector-init-dmaap-provisioning for creation of Feeds and Dr Publisher.
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | dcae-datafile-collector initContainer dcae-datafile-collector-init-dmaap-provisioning Log |
---|
collapse | true |
---|
|
$ 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
|
Open Issues
Data Router Publisher/Subscriber behaviour is not consistent
...