Add docker-compose file for nonrtric deployment with dmaap-mr
Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech>
Issue-ID: NONRTRIC-269
Change-Id: I56437e93c6e70008c831924ce8fb3b2d48ac4a05
diff --git a/docker-compose/data/dmaap-msg.sh b/docker-compose/data/dmaap-msg.sh
new file mode 100755
index 0000000..0bbd135
--- /dev/null
+++ b/docker-compose/data/dmaap-msg.sh
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# 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.
+# ============LICENSE_END=================================================
+#
+
+# The scripts in data/ will generate some dummy data in the running system.
+# It will create:
+# one policy type in a1-sim-OSC
+# one service in policy agent
+# one policy in a1-sim-OSC
+# one policy in a1-sim-STD
+
+# Run command:
+# ./dmaap-msg.sh [dmaap-mr port] [a1-sim-OSC port] [a1-sim-STD port] [http/https]
+
+dmaa_mr_port=${1:-3904}
+a1_sim_OSC_port=${2:-30001}
+a1_sim_STD_port=${3:-30003}
+httpx=${4:-"http"}
+
+echo "using dmaap-mr port: "$dmaa_mr_port
+echo "using a1-sim-OSC port: "$a1_sim_OSC_port
+echo "using a1-sim-STD port: "$a1_sim_STD_port
+echo "using protocol: "$httpx
+echo -e "\n"
+
+echo "dmaap-mr topics:"
+curl -skw " %{http_code}" $httpx://localhost:$dmaa_mr_port/topics/listAll
+echo -e "\n"
+
+echo "dmaap-mr create topic A1-POLICY-AGENT-READ:"
+curl -skw " %{http_code}" -X POST "$httpx://localhost:$dmaa_mr_port/topics/create" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"topicName\": \"A1-POLICY-AGENT-READ\", \"topicDescription\": \"test topic\", \"partitionCount\": 1, \"replicationCount\": 1, \"transactionEnabled\": \"false\"}"
+echo -e "\n"
+
+echo "dmaap-mr create topic A1-POLICY-AGENT-WRITE:"
+curl -skw " %{http_code}" -X POST "$httpx://localhost:$dmaa_mr_port/topics/create" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"topicName\": \"A1-POLICY-AGENT-WRITE\", \"topicDescription\": \"test topic\", \"partitionCount\": 1, \"replicationCount\": 1, \"transactionEnabled\": \"false\"}"
+echo -e "\n"
+
+echo "dmaap-mr topics:"
+curl -skw " %{http_code}" $httpx://localhost:$dmaa_mr_port/topics/listAll
+echo -e "\n"
+
+echo "ric1 version:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/counter/interface
+echo -e "\n"
+
+echo "ric2 version:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_STD_port/counter/interface
+echo -e "\n"
+
+echo "create policy type 1 to ric1:"
+curl -X PUT -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json
+echo -e "\n"
+
+for i in {1..12}; do
+ echo "policy types from policy agent:"
+ curlString="curl -skw %{http_code} $httpx://localhost:8081/policy_types"
+ res=$($curlString)
+ echo "$res"
+ expect="[\"\",\"1\"]200"
+ if [ "$res" == "$expect" ]; then
+ echo -e "\n"
+ break;
+ else
+ sleep $i
+ fi
+done
+
+echo "create service 1 to policy agent via dmaap_mr:"
+curl -k -X POST -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$dmaa_mr_port/events/A1-POLICY-AGENT-READ/" --data-binary @testdata/dmaap-msg-service-create.json
+echo -e "\n"
+
+echo "create policies to ric1 & ric2 with type1 and service1 via dmaa_mr:"
+curl -k -X POST -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$dmaa_mr_port/events/A1-POLICY-AGENT-READ/" --data-binary @testdata/dmaap-msg-policy-create.json
+echo -e "\n"
+
+echo "policy numbers from ric1:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/counter/num_instances
+echo -e "\n"
+
+echo "policy numbers from ric2:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_STD_port/counter/num_instances
+echo -e "\n"
+
+echo "get policy from policy agent via dmaap_mr:"
+curl -k -X POST -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$dmaa_mr_port/events/A1-POLICY-AGENT-READ/" --data-binary @testdata/dmaap-msg-policy-get.json
+echo -e "\n"
\ No newline at end of file
diff --git a/docker-compose/data/testdata/OSC/policy_type.json b/docker-compose/data/testdata/OSC/policy_type.json
index 537d86f..aeea773 100644
--- a/docker-compose/data/testdata/OSC/policy_type.json
+++ b/docker-compose/data/testdata/OSC/policy_type.json
@@ -24,7 +24,7 @@
"qosId"
]
},
- "qosObjective": {
+ "qosObjectives": {
"type": "object",
"properties": {
"priorityLevel": {
@@ -39,7 +39,7 @@
},
"additionalProperties": false,
"required": [
- "scope", "qosObjective"
+ "scope", "qosObjectives"
]
}
}
diff --git a/docker-compose/data/testdata/dmaap-msg-pms-status.json b/docker-compose/data/testdata/dmaap-msg-pms-status.json
new file mode 100644
index 0000000..5c7968e
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-pms-status.json
@@ -0,0 +1,14 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596363451067769100",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-02 10:17:31.067784",
+ "type": "request",
+ "url": "/status"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/dmaap-msg-policy-create.json b/docker-compose/data/testdata/dmaap-msg-policy-create.json
new file mode 100644
index 0000000..60504d1
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-policy-create.json
@@ -0,0 +1,82 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596304565904621535",
+ "originatorId": "849e6c6b420",
+ "payload": {
+ "scope": {
+ "ueId": "ue3000",
+ "qosId": "qos3000"
+ },
+ "qosObjectives": {
+ "priorityLevel": 3000
+ }
+ },
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:05.905035",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3000&ric=ric1&service=service1&type=1"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596304566656253556",
+ "originatorId": "849e6c6b420",
+ "payload": {
+ "scope": {
+ "ueId": "ue3100",
+ "qosId": "qos3100"
+ },
+ "qosObjectives": {
+ "priorityLevel": 3100
+ }
+ },
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:06.656949",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3100&ric=ric1&service=service1&type=1"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596304566656253557",
+ "originatorId": "849e6c6b420",
+ "payload": {
+ "scope": {
+ "ueId": "ue3100",
+ "qosId": "qos3100"
+ },
+ "qosObjectives": {
+ "priorityLevel": 3200
+ }
+ },
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:06.656949",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3101&ric=ric1&service=service1&type=1"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596304566656253558",
+ "originatorId": "849e6c6b420",
+ "payload": {
+ "scope": {
+ "ueId": "ue3102",
+ "qosId": "qos3102"
+ },
+ "qosObjectives": {
+ "priorityLevel": 3201
+ }
+ },
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:06.656949",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3102&ric=ric2&service=service1"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/dmaap-msg-policy-delete.json b/docker-compose/data/testdata/dmaap-msg-policy-delete.json
new file mode 100644
index 0000000..6065af3
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-policy-delete.json
@@ -0,0 +1,50 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "DELETE",
+ "correlationId": "1596304567816229314",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.816235",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3000"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "DELETE",
+ "correlationId": "1596304567816229314",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.816235",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3100"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "DELETE",
+ "correlationId": "1596304567816229314",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.816235",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3101"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "DELETE",
+ "correlationId": "1596304567816229314",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.816235",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3102"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/dmaap-msg-policy-get.json b/docker-compose/data/testdata/dmaap-msg-policy-get.json
new file mode 100644
index 0000000..abcaa35
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-policy-get.json
@@ -0,0 +1,50 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596304567017739720",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.017744",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3000"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596304567017739720",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.017744",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3100"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596304567017739720",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.017744",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3101"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596304567017739720",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-01 17:56:07.017744",
+ "type": "request",
+ "url": "/policy?id=0f7bb041e1584b1fa17e87520d70a3102"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/dmaap-msg-rics-get.json b/docker-compose/data/testdata/dmaap-msg-rics-get.json
new file mode 100644
index 0000000..59562d3
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-rics-get.json
@@ -0,0 +1,14 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596363459399504200",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-02 10:17:39.399517",
+ "type": "request",
+ "url": "/rics"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/dmaap-msg-service-create.json b/docker-compose/data/testdata/dmaap-msg-service-create.json
new file mode 100644
index 0000000..3e3d542
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-service-create.json
@@ -0,0 +1,46 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596363458549998500",
+ "originatorId": "849e6c6b420",
+ "payload": {
+ "callbackUrl": "http://callback-receiver:8090/callbacks/1",
+ "keepAliveIntervalSeconds": "1000",
+ "serviceName": "serv1"
+ },
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-02 10:17:38.550324",
+ "type": "request",
+ "url": "/service"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596363458549998501",
+ "originatorId": "849e6c6b421",
+ "payload": {
+ "callbackUrl": "http://callback-receiver:8090/callbacks/1",
+ "keepAliveIntervalSeconds": "1000",
+ "serviceName": "service1"
+ },
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-02 10:17:38.550324",
+ "type": "request",
+ "url": "/service"
+ },
+ {
+ "apiVersion": "1.0",
+ "operation": "PUT",
+ "correlationId": "1596363459196978900",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-02 10:17:39.197067",
+ "type": "request",
+ "url": "/services/keepalive?name=serv1"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/dmaap-msg-services-get.json b/docker-compose/data/testdata/dmaap-msg-services-get.json
new file mode 100644
index 0000000..e9c2f8c
--- /dev/null
+++ b/docker-compose/data/testdata/dmaap-msg-services-get.json
@@ -0,0 +1,14 @@
+[
+ {
+ "apiVersion": "1.0",
+ "operation": "GET",
+ "correlationId": "1596363458896827100",
+ "originatorId": "849e6c6b420",
+ "payload": {},
+ "requestId": "23343221",
+ "target": "policy-agent",
+ "timestamp": "2020-08-02 10:17:38.897367",
+ "type": "request",
+ "url": "/services"
+ }
+]
\ No newline at end of file
diff --git a/docker-compose/data/testdata/policy.json b/docker-compose/data/testdata/policy.json
index 119ba8b..ac1b538 100644
--- a/docker-compose/data/testdata/policy.json
+++ b/docker-compose/data/testdata/policy.json
@@ -3,7 +3,7 @@
"ueId": "ue3100",
"qosId": "qos3100"
},
- "qosObjective": {
+ "qosObjectives": {
"priorityLevel": 3100
}
}
diff --git a/docker-compose/data/testdata/service.json b/docker-compose/data/testdata/service.json
index 1b973fc..7bb6651 100644
--- a/docker-compose/data/testdata/service.json
+++ b/docker-compose/data/testdata/service.json
@@ -1 +1,5 @@
-{"callbackUrl": "http://callback-receiver:8090/callbacks/1","keepAliveIntervalSeconds": "3600","serviceName": "service1"}
+{
+ "callbackUrl": "https://callback-receiver:8091/callbacks/1",
+ "keepAliveIntervalSeconds": "3600",
+ "serviceName": "service1"
+}
diff --git a/docker-compose/withDmaap_nosdnc/docker-compose.yml b/docker-compose/withDmaap_nosdnc/docker-compose.yml
new file mode 100644
index 0000000..492660e
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/docker-compose.yml
@@ -0,0 +1,142 @@
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# 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.
+# ============LICENSE_END=================================================
+#
+version: '3.5'
+
+networks:
+ default:
+ driver: bridge
+ name: nonrtric-docker-net
+
+services:
+ policy-agent:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent:2.1.0
+ container_name: policy-agent
+ networks:
+ default:
+ aliases:
+ - policy-agent-container
+ ports:
+ - 8081:8081
+ - 8433:8433
+ volumes:
+ - ./pms/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:ro
+ - ./pms/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro
+ # For using own certs instead of the default ones (built into the container),
+ # place them in pms/ directory, update the application-policyagent.yaml file, and uncomment the following lines
+ # - ./pms/keystore-policyagent.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro
+ # - ./pms/truststore-policyagent.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro
+ # - ./pms/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro
+
+ a1-sim-OSC:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
+ container_name: a1-sim-OSC
+ networks:
+ - default
+ ports:
+ - 30001:8085
+ - 30002:8185
+ environment:
+ - A1_VERSION=OSC_2.1.0
+ - REMOTE_HOSTS_LOGGING=1
+ - ALLOW_HTTP=true
+
+ a1-sim-STD:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
+ container_name: a1-sim-STD
+ networks:
+ - default
+ ports:
+ - 30003:8085
+ - 30004:8185
+ environment:
+ - A1_VERSION=STD_1.1.3
+ - REMOTE_HOSTS_LOGGING=1
+ - ALLOW_HTTP=true
+
+ policy-control-panel:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel:2.0.0
+ container_name: policy-control-panel
+ networks:
+ - default
+ ports:
+ - 8080:8080
+ - 8082:8082
+
+ zookeeper:
+ image: nexus3.onap.org:10001/onap/dmaap/zookeeper:6.0.3
+ container_name: zookeeper
+ ports:
+ - "2181:2181"
+ environment:
+ ZOOKEEPER_REPLICAS: 1
+ ZOOKEEPER_TICK_TIME: 2000
+ ZOOKEEPER_SYNC_LIMIT: 5
+ ZOOKEEPER_INIT_LIMIT: 10
+ ZOOKEEPER_MAX_CLIENT_CNXNS: 200
+ ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
+ ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
+ ZOOKEEPER_CLIENT_PORT: 2181
+ KAFKA_OPTS: -Djava.security.auth.login.config=/etc/zookeeper/secrets/jaas/zk_server_jaas.conf -Dzookeeper.kerberos.removeHostFromPrincipal=true -Dzookeeper.kerberos.removeRealmFromPrincipal=true -Dzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider -Dzookeeper.requireClientAuthScheme=sasl
+ ZOOKEEPER_SERVER_ID: 1
+ volumes:
+ - ./zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
+ networks:
+ - default
+
+ kafka:
+ image: nexus3.onap.org:10001/onap/dmaap/kafka111:1.0.4
+ container_name: kafka
+ ports:
+ - "9092:9092"
+ environment:
+ enableCadi: 'false'
+ KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+ KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
+ KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
+ KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
+ KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
+ KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
+ KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
+ KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
+ KAFKA_ZOOKEEPER_SET_ACL: 'true'
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
+ # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
+ KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
+ volumes:
+ - ./kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
+ networks:
+ - default
+ depends_on:
+ - zookeeper
+
+ dmaap:
+ image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.18
+ container_name: dmaap-mr
+ ports:
+ - "3904:3904"
+ - "3905:3905"
+ environment:
+ enableCadi: 'false'
+ volumes:
+ - ./mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+ - ./mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
+ - ./mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
+ networks:
+ - default
+ depends_on:
+ - zookeeper
+ - kafka
\ No newline at end of file
diff --git a/docker-compose/withDmaap_nosdnc/kafka/zk_client_jaas.conf b/docker-compose/withDmaap_nosdnc/kafka/zk_client_jaas.conf
new file mode 100644
index 0000000..d4ef1eb
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/kafka/zk_client_jaas.conf
@@ -0,0 +1,5 @@
+Client {
+ org.apache.zookeeper.server.auth.DigestLoginModule required
+ username="kafka"
+ password="kafka_secret";
+ };
\ No newline at end of file
diff --git a/docker-compose/withDmaap_nosdnc/mr/MsgRtrApi.properties b/docker-compose/withDmaap_nosdnc/mr/MsgRtrApi.properties
new file mode 100644
index 0000000..8f8260e
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/mr/MsgRtrApi.properties
@@ -0,0 +1,172 @@
+# LICENSE_START=======================================================
+# org.onap.dmaap
+# ================================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+###############################################################################
+###############################################################################
+##
+## Cambria API Server config
+##
+## Default values are shown as commented settings.
+##
+###############################################################################
+##
+## HTTP service
+##
+## 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+## Both Cambria and Kafka make use of Zookeeper.
+##
+#config.zk.servers=172.18.1.1
+#config.zk.servers={{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}
+config.zk.servers=zookeeper:2181
+
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+## Items below are passed through to Kafka's producer and consumer
+## configurations (after removing "kafka.")
+## if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+#kafka.metadata.broker.list={{.Values.kafka.name}}:{{.Values.kafka.port}}
+kafka.metadata.broker.list=kafka:9092
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=20000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+#(backoff*retries > zksessiontimeout)
+kafka.rebalance.backoff.ms=10000
+kafka.rebalance.max.retries=6
+
+
+###############################################################################
+##
+## Secured Config
+##
+## Some data stored in the config system is sensitive -- API keys and secrets,
+## for example. to protect it, we use an encryption layer for this section
+## of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+## Kafka expects live connections from the consumer to the broker, which
+## obviously doesn't work over connectionless HTTP requests. The Cambria
+## server proxies HTTP requests into Kafka consumer sessions that are kept
+## around for later re-use. Not doing so is costly for setup per request,
+## which would substantially impact a high volume consumer's performance.
+##
+## This complicates Cambria server failover, because we often need server
+## A to close its connection before server B brings up the replacement.
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+cambria.consumer.cache.touchFreqMs=120000
+##stickforallconsumerrequests=false
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+#cambria.rateLimit.maxEmptyPollsPerMinute=30
+#cambria.rateLimitActual.delay.ms=10
+
+###############################################################################
+##
+## Metrics Reporting
+##
+## This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+consumer.timeout=17
+default.partitions=3
+default.replicas=3
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
+msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+enforced.topic.name.AAF=org.onap.dmaap.mr
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.onap.dmaap.mr
+##############################################################################
+#Mirror Maker Agent
+
+msgRtr.mirrormakeradmin.aaf=org.onap.dmaap.mr.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=org.onap.dmaap.mr.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=org.onap.dmaap.mr.mirrormakeragent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
+
+kafka.max.poll.interval.ms=300000
+kafka.heartbeat.interval.ms=60000
+kafka.session.timeout.ms=240000
+kafka.max.poll.records=1000
\ No newline at end of file
diff --git a/docker-compose/withDmaap_nosdnc/mr/cadi.properties b/docker-compose/withDmaap_nosdnc/mr/cadi.properties
new file mode 100644
index 0000000..dca56c8
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/mr/cadi.properties
@@ -0,0 +1,19 @@
+aaf_locate_url=https://aaf-locate.{{ include "common.namespace" . }}:8095
+aaf_url=https://AAF_LOCATE_URL/onap.org.osaaf.aaf.service:2.1
+aaf_env=DEV
+aaf_lur=org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm
+
+cadi_truststore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.trust.jks
+cadi_truststore_password=enc:mN6GiIzFQxKGDzAXDOs7b4j8DdIX02QrZ9QOWNRpxV3rD6whPCfizSMZkJwxi_FJ
+
+cadi_keyfile=/appl/dmaapMR1/etc/org.onap.dmaap.mr.keyfile
+
+cadi_alias=dmaapmr@mr.dmaap.onap.org
+cadi_keystore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.p12
+cadi_keystore_password=enc:_JJT2gAEkRzXla5xfDIHal8pIoIB5iIos3USvZQT6sL-l14LpI5fRFR_QIGUCh5W
+cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
+
+cadi_loglevel=INFO
+cadi_protocols=TLSv1.1,TLSv1.2
+cadi_latitude=37.78187
+cadi_longitude=-122.26147
\ No newline at end of file
diff --git a/docker-compose/withDmaap_nosdnc/mr/logback.xml b/docker-compose/withDmaap_nosdnc/mr/logback.xml
new file mode 100644
index 0000000..f02a2db
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/mr/logback.xml
@@ -0,0 +1,208 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright © 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ 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.
+ ============LICENSE_END=========================================================
+ -->
+
+<configuration scan="true" scanPeriod="3 seconds" debug="false">
+ <contextName>${module.ajsc.namespace.name}</contextName>
+ <jmxConfigurator />
+ <property name="logDirectory" value="${AJSC_HOME}/log" />
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>ERROR</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+ <appender name="INFO" class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>INFO</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ </appender>
+
+ <appender name="DEBUG" class="ch.qos.logback.core.ConsoleAppender">
+
+ <encoder>
+ <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="ERROR" class="ch.qos.logback.core.ConsoleAppender"> class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>ERROR</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ <encoder>
+ <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
+ </encoder>
+ </appender>
+
+
+ <!-- Msgrtr related loggers -->
+ <logger name="org.onap.dmaap.dmf.mr.service" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.service.impl" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.resources" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.resources.streamReaders" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.backends" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.backends.kafka" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.backends.memory" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.beans" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.constants" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.exception" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.listener" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.metabroker" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.metrics.publisher" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.metrics.publisher.impl" level="INFO" />
+
+
+
+ <logger name="org.onap.dmaap.dmf.mr.security" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.security.impl" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.transaction" level="INFO" />
+ <logger name="com.att.dmf.mr.transaction.impl" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.metabroker" level="INFO" />
+ <logger name="org.onap.dmaap.dmf.mr.metabroker" level="INFO" />
+
+ <logger name="org.onap.dmaap.dmf.mr.utils" level="INFO" />
+ <logger name="org.onap.dmaap.mr.filter" level="INFO" />
+
+ <!--<logger name="com.att.nsa.cambria.*" level="INFO" />-->
+
+ <!-- Msgrtr loggers in ajsc -->
+ <logger name="org.onap.dmaap.service" level="INFO" />
+ <logger name="org.onap.dmaap" level="INFO" />
+
+
+ <!-- Spring related loggers -->
+ <logger name="org.springframework" level="WARN" additivity="false"/>
+ <logger name="org.springframework.beans" level="WARN" additivity="false"/>
+ <logger name="org.springframework.web" level="WARN" additivity="false" />
+ <logger name="com.blog.spring.jms" level="WARN" additivity="false" />
+
+ <!-- AJSC Services (bootstrap services) -->
+ <logger name="ajsc" level="WARN" additivity="false"/>
+ <logger name="ajsc.RouteMgmtService" level="INFO" additivity="false"/>
+ <logger name="ajsc.ComputeService" level="INFO" additivity="false" />
+ <logger name="ajsc.VandelayService" level="WARN" additivity="false"/>
+ <logger name="ajsc.FilePersistenceService" level="WARN" additivity="false"/>
+ <logger name="ajsc.UserDefinedJarService" level="WARN" additivity="false" />
+ <logger name="ajsc.UserDefinedBeansDefService" level="WARN" additivity="false" />
+ <logger name="ajsc.LoggingConfigurationService" level="WARN" additivity="false" />
+
+ <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
+ logging) -->
+ <logger name="ajsc.utils" level="WARN" additivity="false"/>
+ <logger name="ajsc.utils.DME2Helper" level="INFO" additivity="false" />
+ <logger name="ajsc.filters" level="DEBUG" additivity="false" />
+ <logger name="ajsc.beans.interceptors" level="DEBUG" additivity="false" />
+ <logger name="ajsc.restlet" level="DEBUG" additivity="false" />
+ <logger name="ajsc.servlet" level="DEBUG" additivity="false" />
+ <logger name="com.att" level="WARN" additivity="false" />
+ <logger name="com.att.ajsc.csi.logging" level="WARN" additivity="false" />
+ <logger name="com.att.ajsc.filemonitor" level="WARN" additivity="false"/>
+
+ <logger name="com.att.nsa.dmaap.util" level="INFO" additivity="false"/>
+ <logger name="com.att.cadi.filter" level="INFO" additivity="false" />
+
+
+ <!-- Other Loggers that may help troubleshoot -->
+ <logger name="net.sf" level="WARN" additivity="false" />
+ <logger name="org.apache.commons.httpclient" level="WARN" additivity="false"/>
+ <logger name="org.apache.commons" level="WARN" additivity="false" />
+ <logger name="org.apache.coyote" level="WARN" additivity="false"/>
+ <logger name="org.apache.jasper" level="WARN" additivity="false"/>
+
+ <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
+ May aid in troubleshooting) -->
+ <logger name="org.apache.camel" level="WARN" additivity="false" />
+ <logger name="org.apache.cxf" level="WARN" additivity="false" />
+ <logger name="org.apache.camel.processor.interceptor" level="WARN" additivity="false"/>
+ <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" additivity="false" />
+ <logger name="org.apache.cxf.service" level="WARN" additivity="false" />
+ <logger name="org.restlet" level="DEBUG" additivity="false" />
+ <logger name="org.apache.camel.component.restlet" level="DEBUG" additivity="false" />
+ <logger name="org.apache.kafka" level="DEBUG" additivity="false" />
+ <logger name="org.apache.zookeeper" level="INFO" additivity="false" />
+ <logger name="org.I0Itec.zkclient" level="DEBUG" additivity="false" />
+
+ <!-- logback internals logging -->
+ <logger name="ch.qos.logback.classic" level="INFO" additivity="false"/>
+ <logger name="ch.qos.logback.core" level="INFO" additivity="false" />
+
+ <!-- logback jms appenders & loggers definition starts here -->
+ <!-- logback jms appenders & loggers definition starts here -->
+ <appender name="auditLogs" class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ </filter>
+ <encoder>
+ <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
+ </encoder>
+ </appender>
+ <appender name="perfLogs" class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ </filter>
+ <encoder>
+ <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
+ </encoder>
+ </appender>
+ <appender name="ASYNC-audit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>1000</queueSize>
+ <discardingThreshold>0</discardingThreshold>
+ <appender-ref ref="Audit-Record-Queue" />
+ </appender>
+
+ <logger name="AuditRecord" level="INFO" additivity="FALSE">
+ <appender-ref ref="STDOUT" />
+ </logger>
+ <logger name="AuditRecord_DirectCall" level="INFO" additivity="FALSE">
+ <appender-ref ref="STDOUT" />
+ </logger>
+ <appender name="ASYNC-perf" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>1000</queueSize>
+ <discardingThreshold>0</discardingThreshold>
+ <appender-ref ref="Performance-Tracker-Queue" />
+ </appender>
+ <logger name="PerfTrackerRecord" level="INFO" additivity="FALSE">
+ <appender-ref ref="ASYNC-perf" />
+ <appender-ref ref="perfLogs" />
+ </logger>
+ <!-- logback jms appenders & loggers definition ends here -->
+
+ <root level="DEBUG">
+ <appender-ref ref="DEBUG" />
+ <appender-ref ref="ERROR" />
+ <appender-ref ref="INFO" />
+ <appender-ref ref="STDOUT" />
+ </root>
+
+</configuration>
diff --git a/docker-compose/withDmaap_nosdnc/pms/application-policyagent.yaml b/docker-compose/withDmaap_nosdnc/pms/application-policyagent.yaml
new file mode 100755
index 0000000..58b3f81
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/pms/application-policyagent.yaml
@@ -0,0 +1,37 @@
+spring:
+ profiles:
+ active: prod
+ main:
+ allow-bean-definition-overriding: true
+ aop:
+ auto: false
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.data: ERROR
+ org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ org.oransc.policyagent: TRACE
+ file: /var/log/policy-agent/application.log
+server:
+ port : 8433
+ http-port: 8081
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: /opt/app/policy-agent/etc/cert/keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+app:
+ filepath: /opt/app/policy-agent/data/application_configuration.json
+ webclient:
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: /opt/app/policy-agent/etc/cert/truststore.jks
+
diff --git a/docker-compose/withDmaap_nosdnc/pms/application_configuration.json b/docker-compose/withDmaap_nosdnc/pms/application_configuration.json
new file mode 100644
index 0000000..0925703
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/pms/application_configuration.json
@@ -0,0 +1,39 @@
+{
+ "config":{
+ "//description":"Application configuration",
+ "ric":[
+ {
+ "name":"ric1",
+ "baseUrl":"https://a1-sim-OSC:8185/",
+ "managedElementIds":[
+ "kista_1",
+ "kista_2"
+ ]
+ },
+ {
+ "name":"ric2",
+ "baseUrl":"https://a1-sim-STD:8185/",
+ "managedElementIds":[
+ "kista_1",
+ "kista_2"
+ ]
+ }
+ ],
+ "streams_publishes":{
+ "dmaap_publisher":{
+ "type":"message_router",
+ "dmaap_info":{
+ "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-WRITE"
+ }
+ }
+ },
+ "streams_subscribes":{
+ "dmaap_subscriber":{
+ "type":"message_router",
+ "dmaap_info":{
+ "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
+ }
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/docker-compose/withDmaap_nosdnc/zk/zk_server_jaas.conf b/docker-compose/withDmaap_nosdnc/zk/zk_server_jaas.conf
new file mode 100644
index 0000000..26bf460
--- /dev/null
+++ b/docker-compose/withDmaap_nosdnc/zk/zk_server_jaas.conf
@@ -0,0 +1,4 @@
+Server {
+ org.apache.zookeeper.server.auth.DigestLoginModule required
+ user_kafka=kafka_secret;
+};
\ No newline at end of file