...
The commands below show examples of operations towards the helm manager using the dummy chart:.
As an alternative, run the script 'test.sh' to execute a full sequence of commands.
Code Block | ||||
---|---|---|---|---|
| ||||
// Get charts $ curl -sw %{http_code} http://localhost:8112/helm/charts {"charts":[]}200 // Onboard the chart curl -sw %{http_code} http://localhost:8112/helm/charts -X POST -F chart=@simple-app-0.1.0.tgz -F values=@simple-app-values.yaml -F "info=<simple-app.json" Curl OK Response: 200 Body: // List the chart(s) $ curl -sw %{http_code} http://localhost:8112/helm/charts {"charts":[{"releaseName":"simpleapp","chartName":"simple-app","version":"0.1.0","namespace":"ckhm","repository":"cm"}]}200 // Install the chart (app) - note: the namespace ckhm is created in kubernetes $curl -sw %{http_code} http://localhost:8112/helm/install -X POST -H Content-Type:application/json -d @simple-app-installation.json 201 ===================== Get apps - simple-app ===================== $curl -sw %{http_code} http://localhost:8112/helm/charts Curl OK Response: 200 Body: {"charts":[{"releaseName":"simpleapp","chartName":"simple-app","version":"0.1.0","namespace":"ckhm","repository":"cm"}]} //List the installed chart using helm ls // helm ls -A NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION simpleapp ckhm 1 2021-12-02 20:53:21.52883025 +0000 UTC deployed simple-app-0.1.0 1.16.0 // List the service and pods in kubernetes - may take a few seconds until the object are created in kubernetes $ kubectl get svc -n ckhm NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE simpleapp-simple-app ClusterIP 10.107.86.92 <none> 80/TCP 30s $ kubectl get pods -n ckhm NAME READY STATUS RESTARTS AGE simpleapp-simple-app-675f44fc99-wpd6g 1/1 Running 0 31s |
To run in the helm manager in kubernetes see this page: Build/Run Helm ManagerRun Helm Manager in kubernetes
Run the Dmaap Adaptor Service
The Dmaap Adaptor Service needs two configurations files, one for the application specific parameters and one for the types the application supports.
Note that a running Information Coordinator Service is needed for creating jobs and a running message router is needed for receiving data that the job can distribute to the consumer.
In addition, if the data is available on a kafka topic then a instance of a running kafka server is needed.
Create the file application.yaml with content below.
The following parameter need to be configured according to hosts and ports (these setting may need to adjusted to your environment)
- ics-base-url: https://informationservice:8434
- dmaap-base-url: https://message-router:3905 (needed when data is received from the Dmaap message router)
- bootstrap-servers: message-router-kafka:9092 (needed when data is received on a kafka topic)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
spring:
profiles:
active: prod
main:
allow-bean-definition-overriding: true
aop:
auto: false
management:
endpoints:
web:
exposure:
# Enabling of springboot actuator features. See springboot documentation.
include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
springdoc:
show-actuator: true
logging:
# Configuration of logging
level:
ROOT: ERROR
org.springframework: ERROR
org.springframework.data: ERROR
org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
org.oran.dmaapadapter: INFO
file:
name: /var/log/dmaap-adaptor-service/application.log
server:
# Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
# See springboot documentation.
port : 8435
http-port: 8084
ssl:
key-store-type: JKS
key-store-password: policy_agent
key-store: /opt/app/dmaap-adaptor-service/etc/cert/keystore.jks
key-password: policy_agent
key-alias: policy_agent
app:
webclient:
# Configuration of the trust store used for the HTTP client (outgoing requests)
# The file location and the password for the truststore is only relevant if trust-store-used == true
# Note that the same keystore as for the server is used.
trust-store-used: false
trust-store-password: policy_agent
trust-store: /opt/app/dmaap-adaptor-service/etc/cert/truststore.jks
# Configuration of usage of HTTP Proxy for the southbound accesses.
# The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
http.proxy-host:
http.proxy-port: 0
ics-base-url: https://informationservice:8434
# Location of the component configuration file. The file will only be used if the Consul database is not used;
# configuration from the Consul will override the file.
configuration-filepath: /opt/app/dmaap-adaptor-service/data/application_configuration.json
dmaap-base-url: https://message-router:3905
# The url used to adress this component. This is used as a callback url sent to other components.
dmaap-adapter-base-url: https://dmaapadapterservice:8435
# KAFKA boostrap server. This is only needed if there are Information Types that uses a kafkaInputTopic
kafka:
bootstrap-servers: message-router-kafka:9092 |
Create the file application_configuration.json according to one of alternatives below.
application_configuration.json without kafka type
Code Block | ||||
---|---|---|---|---|
| ||||
{
"types": [
{
"id": "ExampleInformationType",
"dmaapTopicUrl": "/events/unauthenticated.dmaapadp.json/dmaapadapterproducer/msgs?timeout=15000&limit=100",
"useHttpProxy": false
}
]
} |
application_configuration.json with kafka type
Code Block | ||||
---|---|---|---|---|
| ||||
{
"types": [
{
"id": "ExampleInformationType",
"dmaapTopicUrl": "/events/unauthenticated.dmaapadp.json/dmaapadapterproducer/msgs?timeout=15000&limit=100",
"useHttpProxy": false
},
{
"id": "ExampleInformationTypeKafka",
"kafkaInputTopic": "unauthenticated.dmaapadp_kafka.text",
"useHttpProxy": false
}
]
} |
Start the Dmaap Adaptor Service in a separate shell with the following command:
Code Block | ||
---|---|---|
| ||
docker run --rm -v \
<absolute-path-to-config-file>/application.yaml:/opt/app/dmaap-adaptor-service/config/application.yaml \
<absolute-path-to-config-file>/application_configuration.json:/opt/app/dmaap-adaptor-service/data/application_configuration.json \
-p 9086:8084 -p 9087:8435 --network=nonrtric-docker-net --name=dmaapadapterservice nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-dmaap-adaptor:1.0.0 |
Setup jobs to produce data according to the types in application_configuration.json
Create a file job1.json with the job definition (replace paths <url-for-jod-data-delivery> and <url-for-jod-status-delivery> to fit your enviroment:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"info_type_id": "ExampleInformationType",
"job_result_uri": "<url-for-jod-data-delivery>",
"job_owner": "job1owner",
"status_notification_uri": "<url-for-jod-status-delivery>",
"job_definition": {}
} |
Create job1 for type 'ExampleInformationType'
Code Block | ||
---|---|---|
| ||
curl -X PUT -H Content-Type:application/json https://localhost:8083/data-consumer/v1/info-jobs/job1 --data-binary @job1.json |
Data posted on the message router topic unauthenticated.dmaapadp.json will be delivered to the path as specified inn the job1.son