From: RehanRaza Date: Mon, 24 May 2021 16:00:49 +0000 (+0200) Subject: First version of docker-compose for policy framework X-Git-Tag: 2.2.0~29^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=c5fbfd02e3c7e21de25a7b507a59c0ad10c2ad8b;p=nonrtric.git First version of docker-compose for policy framework Change-Id: I33a0d706d663fc8a0c06b50f812f48a9b2272639 Issue-ID: NONRTRIC-526 Signed-off-by: RehanRaza --- diff --git a/docker-compose/docker-compose-policy-framework/config/apex-pdp/OnapPfConfig.json b/docker-compose/docker-compose-policy-framework/config/apex-pdp/OnapPfConfig.json new file mode 100644 index 00000000..e1f6b23f --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/apex-pdp/OnapPfConfig.json @@ -0,0 +1,43 @@ +{ + "name":"OnapPfParameterGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true + }, + "pdpStatusParameters":{ + "pdpGroup": "defaultGroup", + "timeIntervalMs": 120000, + "pdpType":"apex", + "desiredInstanceCount": 2, + "description":"Pdp Heartbeat", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ] + }, + "topicParameterGroup": { + "topicSources" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false, + "allowSelfSignedCerts" : true + }], + "topicSinks" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false, + "allowSelfSignedCerts" : true + }] + } +} diff --git a/docker-compose/docker-compose-policy-framework/config/db/db.conf b/docker-compose/docker-compose-policy-framework/config/db/db.conf new file mode 100644 index 00000000..22b37f8b --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/db/db.conf @@ -0,0 +1,16 @@ +# Copyright 2019,2021 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. +MYSQL_ROOT_PASSWORD=secret +MYSQL_USER=policy_user +MYSQL_PASSWORD=policy_user diff --git a/docker-compose/docker-compose-policy-framework/config/db/db.sh b/docker-compose/docker-compose-policy-framework/config/db/db.sh new file mode 100755 index 00000000..a5c81296 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/db/db.sh @@ -0,0 +1,22 @@ +#!/bin/bash -xv +# Copyright 2019,2021 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. + +for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory +do + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" +done + +mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" diff --git a/docker-compose/docker-compose-policy-framework/config/distribution/defaultConfig.json b/docker-compose/docker-compose-policy-framework/config/distribution/defaultConfig.json new file mode 100644 index 00000000..140fd706 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/distribution/defaultConfig.json @@ -0,0 +1,73 @@ +{ + "name":"SDCDistributionGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34", + "https": true + }, + "receptionHandlerParameters":{ + "FileReceptionHandler":{ + "receptionHandlerType":"File", + "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandler", + "receptionHandlerConfigurationName":"fileConfiguration", + "pluginHandlerParameters":{ + "policyDecoders":{ + "ApexDecoder":{ + "decoderType":"ApexDecoder", + "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy", + "decoderConfigurationName": "apexDecoderConfiguration" + } + }, + "policyForwarders":{ + "LifeCycleApiForwarder":{ + "forwarderType":"LifeCycleAPI", + "forwarderClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder", + "forwarderConfigurationName": "lifecycleApiConfiguration" + } + } + } + } + }, + "receptionHandlerConfigurationParameters":{ + "fileConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandlerConfigurationParameterGroup", + "parameters":{ + "watchPath": "/opt/app/policy/distribution/etc/temp/", + "maxThread": 1 + } + } + }, + "policyDecoderConfigurationParameters":{ + "apexDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup", + "parameters":{ + "policyFileName": "apex_policy.json", + "policyTypeFileName": "apex_policy_type.json" + } + } + }, + "policyForwarderConfigurationParameters":{ + "lifecycleApiConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters", + "parameters":{ + "apiParameters": { + "hostName": "policy-api", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34" + }, + "papParameters": { + "hostName": "policy-pap", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34" + }, + "isHttps": true, + "allowSelfSignedCerts": true, + "deployPolicies": true + } + } + } +} diff --git a/docker-compose/docker-compose-policy-framework/config/dns_keystore.txt b/docker-compose/docker-compose-policy-framework/config/dns_keystore.txt new file mode 100644 index 00000000..b42a22b2 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/dns_keystore.txt @@ -0,0 +1,14 @@ +DNS:policy +DNS:drools +DNS:drools.onap +DNS:policy-apex-pdp +DNS:policy-apex-pdp.onap +DNS:policy-api +DNS:policy-api.onap +DNS:policy-distribution +DNS:policy-distribution.onap +DNS:policy-pap +DNS:policy-pap.onap +DNS:policy-xacml-pdp +DNS:policy-xacml-pdp.onap +DNS:dmaap-mr diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/AAI-http-client.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/AAI-http-client.properties new file mode 100644 index 00000000..35fa7f61 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/AAI-http-client.properties @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +http.client.services=AAI + +http.client.services.AAI.managed=true +http.client.services.AAI.https=true +http.client.services.AAI.host=${envd:AAI_HOST} +http.client.services.AAI.port=${envd:AAI_PORT} +http.client.services.AAI.userName=${envd:AAI_USERNAME} +http.client.services.AAI.password=${envd:AAI_PASSWORD} +http.client.services.AAI.contextUriPath=${envd:AAI_CONTEXT_URI} +http.client.services.AAI.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-CL-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-CL-topic.properties new file mode 100644 index 00000000..f265b7c6 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-CL-topic.properties @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.source.topics=APPC-CL +dmaap.sink.topics=APPC-CL + +dmaap.source.topics.APPC-CL.servers=${env:DMAAP_SERVERS} +dmaap.source.topics.APPC-CL.https=true +dmaap.source.topics.APPC-CL.selfSignedCertificates=true + +dmaap.sink.topics.APPC-CL.servers=${env:DMAAP_SERVERS} +dmaap.sink.topics.APPC-CL.https=true +dmaap.sink.topics.APPC-CL.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-LCM-READ-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-LCM-READ-topic.properties new file mode 100644 index 00000000..f4a48dcb --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-LCM-READ-topic.properties @@ -0,0 +1,23 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.sink.topics=APPC-LCM-READ + +dmaap.sink.topics.APPC-LCM-READ.servers=${env:DMAAP_SERVERS} +dmaap.sink.topics.APPC-LCM-READ.https=true +dmaap.sink.topics.APPC-LCM-READ.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-LCM-WRITE-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-LCM-WRITE-topic.properties new file mode 100644 index 00000000..51cb0183 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/APPC-LCM-WRITE-topic.properties @@ -0,0 +1,23 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.source.topics=APPC-LCM-WRITE + +dmaap.source.topics.APPC-LCM-WRITE.servers=${env:DMAAP_SERVERS} +dmaap.source.topics.APPC-LCM-WRITE.https=true +dmaap.source.topics.APPC-LCM-WRITE.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/DCAE_CL_RSP-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/DCAE_CL_RSP-topic.properties new file mode 100644 index 00000000..b02f90ce --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/DCAE_CL_RSP-topic.properties @@ -0,0 +1,23 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.sink.topics=DCAE_CL_RSP + +dmaap.sink.topics.DCAE_CL_RSP.servers=${env:DMAAP_SERVERS} +dmaap.sink.topics.DCAE_CL_RSP.https=true +dmaap.sink.topics.DCAE_CL_RSP.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/DCAE_TOPIC-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/DCAE_TOPIC-topic.properties new file mode 100644 index 00000000..608ba8d4 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/DCAE_TOPIC-topic.properties @@ -0,0 +1,25 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.source.topics=DCAE_TOPIC + +dmaap.source.topics.DCAE_TOPIC.effectiveTopic=${env:DCAE_TOPIC} +dmaap.source.topics.DCAE_TOPIC.servers=${env:DMAAP_SERVERS} +dmaap.source.topics.DCAE_TOPIC.consumerGroup=${env:DCAE_CONSUMER_GROUP} +dmaap.source.topics.DCAE_TOPIC.https=true +dmaap.source.topics.DCAE_TOPIC.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/GUARD-http-client.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/GUARD-http-client.properties new file mode 100644 index 00000000..e4c2553a --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/GUARD-http-client.properties @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +http.client.services=GUARD + +http.client.services.GUARD.managed=true +http.client.services.GUARD.https=true +http.client.services.GUARD.host=${envd:PDP_HOST} +http.client.services.GUARD.port=${envd:PDP_PORT} +http.client.services.GUARD.userName=${envd:PDP_USERNAME} +http.client.services.GUARD.password=${envd:PDP_PASSWORD} +http.client.services.GUARD.contextUriPath=${envd:PDP_CONTEXT_URI:policy/pdpx/v1/} +http.client.services.GUARD.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/POLICY-CL-MGT-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/POLICY-CL-MGT-topic.properties new file mode 100644 index 00000000..f2b68265 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/POLICY-CL-MGT-topic.properties @@ -0,0 +1,22 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.sink.topics=POLICY-CL-MGT +dmaap.sink.topics.POLICY-CL-MGT.servers=${env:DMAAP_SERVERS} +dmaap.sink.topics.POLICY-CL-MGT.https=true +dmaap.sink.topics.POLICY-CL-MGT.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNC-http-client.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNC-http-client.properties new file mode 100644 index 00000000..9115950e --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNC-http-client.properties @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +http.client.services=SDNC + +http.client.services.SDNC.managed=true +http.client.services.SDNC.https=true +http.client.services.SDNC.host=${envd:SDNC_HOST} +http.client.services.SDNC.port=${envd:SDNC_PORT} +http.client.services.SDNC.userName=${envd:SDNC_USERNAME} +http.client.services.SDNC.password=${envd:SDNC_PASSWORD} +http.client.services.SDNC.contextUriPath=${envd:SDNC_CONTEXT_URI} +http.client.services.SDNC.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNR-CL-RSP-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNR-CL-RSP-topic.properties new file mode 100644 index 00000000..27a762c6 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNR-CL-RSP-topic.properties @@ -0,0 +1,22 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.source.topics=SDNR-CL-RSP +dmaap.source.topics.SDNR-CL-RSP.servers=${env:DMAAP_SERVERS} +dmaap.source.topics.SDNR-CL-RSP.https=true +dmaap.source.topics.SDNR-CL-RSP.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNR-CL-topic.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNR-CL-topic.properties new file mode 100644 index 00000000..8f2a26c2 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SDNR-CL-topic.properties @@ -0,0 +1,23 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +dmaap.sink.topics=SDNR-CL + +dmaap.sink.topics.SDNR-CL.servers=${env:DMAAP_SERVERS} +dmaap.sink.topics.SDNR-CL.https=true +dmaap.sink.topics.SDNR-CL.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SO-http-client.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SO-http-client.properties new file mode 100644 index 00000000..7e71e359 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/SO-http-client.properties @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +http.client.services=SO + +http.client.services.SO.managed=true +http.client.services.SO.https=false +http.client.services.SO.host=${envd:SO_HOST} +http.client.services.SO.port=${envd:SO_PORT} +http.client.services.SO.userName=${envd:SO_USERNAME} +http.client.services.SO.password=${envd:SO_PASSWORD} +http.client.services.SO.contextUriPath=${envd:SO_CONTEXT_URI} +http.client.services.SO.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/VFC-http-client.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/VFC-http-client.properties new file mode 100644 index 00000000..454e8a96 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/VFC-http-client.properties @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +http.client.services=VFC + +http.client.services.VFC.managed=true +http.client.services.VFC.https=true +http.client.services.VFC.host=${envd:VFC_HOST} +http.client.services.VFC.port=${envd:VFC_PORT} +http.client.services.VFC.userName=${envd:VFC_USERNAME} +http.client.services.VFC.password=${envd:VFC_PASSWORD} +http.client.services.VFC.contextUriPath=${envd:VFC_CONTEXT_URI:api/nslcm/v1/} +http.client.services.VFC.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/engine-system.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/engine-system.properties new file mode 100644 index 00000000..19e03b51 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/engine-system.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= +# + +# system properties set within the application + +java.net.preferIPv4Stack=true + +# jmx + +com.sun.management.jmxremote.port=9991 +com.sun.management.jmxremote.authenticate=false +com.sun.management.jmxremote.ssl=false + +# certs + +javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore} +javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap} + +javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore} +javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap} + +# kie + +kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false} + +# symmetric key for sensitive configuration data + +engine.symm.key=${envd:SYMM_KEY} diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/engine.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/engine.properties new file mode 100644 index 00000000..cf2ed855 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/engine.properties @@ -0,0 +1,50 @@ +### +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= +### + +# Policy Engine Configuration Channels + +dmaap.source.topics=PDPD-CONFIGURATION + +dmaap.source.topics.PDPD-CONFIGURATION.servers=${envd:DMAAP_SERVERS} +dmaap.source.topics.PDPD-CONFIGURATION.effectiveTopic=${envd:PDPD_CONFIGURATION_TOPIC} +dmaap.source.topics.PDPD-CONFIGURATION.apiKey=${envd:PDPD_CONFIGURATION_API_KEY} +dmaap.source.topics.PDPD-CONFIGURATION.apiSecret=${envd:PDPD_CONFIGURATION_API_SECRET} +dmaap.source.topics.PDPD-CONFIGURATION.consumerGroup=${envd:PDPD_CONFIGURATION_CONSUMER_GROUP} +dmaap.source.topics.PDPD-CONFIGURATION.consumerInstance=${envd:PDPD_CONFIGURATION_CONSUMER_INSTANCE} +dmaap.source.topics.PDPD-CONFIGURATION.managed=false +dmaap.source.topics.PDPD-CONFIGURATION.https=true +dmaap.source.topics.PDPD-CONFIGURATION.selfSignedCertificates=true + +http.server.services=SECURED-CONFIG + +http.server.services.SECURED-CONFIG.host=${envd:TELEMETRY_HOST} +http.server.services.SECURED-CONFIG.port=9696 +http.server.services.SECURED-CONFIG.userName=${envd:TELEMETRY_USER} +http.server.services.SECURED-CONFIG.password=${envd:TELEMETRY_PASSWORD} +http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful +http.server.services.SECURED-CONFIG.managed=false +http.server.services.SECURED-CONFIG.swagger=true +http.server.services.SECURED-CONFIG.https=true +http.server.services.SECURED-CONFIG.aaf=${envd:AAF:false} +http.server.services.SECURED-CONFIG.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler + +aaf.namespace=${envd:AAF_NAMESPACE:false} +aaf.root.permission=${envd:AAF_NAMESPACE:org.onap.policy}.pdpd + diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/feature-lifecycle.properties b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/feature-lifecycle.properties new file mode 100644 index 00000000..2ce112ee --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/feature-lifecycle.properties @@ -0,0 +1,40 @@ +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= + +lifecycle.pdp.group=${envd:POLICY_PDP_PAP_GROUP:defaultGroup} +lifecycle.pdp.type=${envd:POLICY_PDP_PAP_TYPE:drools} + +# Mandatory policy types that this PDP-D must support at a minimum +lifecycle.pdp.policytypes=${envd:POLICY_PDP_PAP_POLICYTYPES} + +dmaap.source.topics=POLICY-PDP-PAP +dmaap.sink.topics=POLICY-PDP-PAP + +dmaap.source.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS} +dmaap.source.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC} +dmaap.source.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY} +dmaap.source.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET} +dmaap.source.topics.POLICY-PDP-PAP.https=true +dmaap.source.topics.POLICY-PDP-PAP.selfSignedCertificates=true + +dmaap.sink.topics.POLICY-PDP-PAP.servers=${envd:DMAAP_SERVERS} +dmaap.sink.topics.POLICY-PDP-PAP.effectiveTopic=${envd:POLICY_PDP_PAP_TOPIC} +dmaap.sink.topics.POLICY-PDP-PAP.apiKey=${envd:POLICY_PDP_PAP_API_KEY} +dmaap.sink.topics.POLICY-PDP-PAP.apiSecret=${envd:POLICY_PDP_PAP_API_SECRET} +dmaap.sink.topics.POLICY-PDP-PAP.https=true +dmaap.sink.topics.POLICY-PDP-PAP.selfSignedCertificates=true diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/features.pre.sh b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/features.pre.sh new file mode 100755 index 00000000..fd7b5b91 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/features.pre.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# ============LICENSE_START=================================================== +# Copyright (C) 2020 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===================================================== + +sh -c "features disable distributed-locking" diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/standalone-settings.xml b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/standalone-settings.xml new file mode 100644 index 00000000..ebd6dd2a --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/custom/standalone-settings.xml @@ -0,0 +1,57 @@ + + + + + + + true + + + + + policy-local + + + + file-repository + file:${user.home}/.m2/file-repository + + true + always + + + true + always + + + + + + + + + + policy-local + + + diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/env/base.conf b/docker-compose/docker-compose-policy-framework/config/drools-apps/env/base.conf new file mode 100644 index 00000000..9c0d1591 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/env/base.conf @@ -0,0 +1,132 @@ +# ============LICENSE_START================================================== +# Copyright (C) 2020 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==================================================== + +# JVM options + +JVM_OPTIONS=-server -Xms512m -Xmx512m + +# SYSTEM software configuration + +DEBUG=y +POLICY_HOME=/opt/app/policy +POLICY_LOGS=/var/log/onap/policy/pdpd +KEYSTORE_PASSWD=Pol1cy_0nap +TRUSTSTORE_PASSWD=Pol1cy_0nap + +# Telemetry credentials + +TELEMETRY_PORT=9696 +TELEMETRY_HOST=0.0.0.0 +TELEMETRY_USER=demo@people.osaaf.org +TELEMETRY_PASSWORD=demo123456! + +# nexus repository + +SNAPSHOT_REPOSITORY_ID= +SNAPSHOT_REPOSITORY_URL= +RELEASE_REPOSITORY_ID= +RELEASE_REPOSITORY_URL= +REPOSITORY_USERNAME= +REPOSITORY_PASSWORD= +REPOSITORY_OFFLINE=true + +# Relational (SQL) DB access + +SQL_HOST=mariadb +SQL_USER=policy_user +SQL_PASSWORD=policy_user + +# AAF + +AAF=false +AAF_NAMESPACE=org.onap.policy +AAF_HOST=aaf.api.simpledemo.onap.org + +# PDP-D DMaaP configuration channel + +PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION +PDPD_CONFIGURATION_API_KEY= +PDPD_CONFIGURATION_API_SECRET= +PDPD_CONFIGURATION_CONSUMER_GROUP= +PDPD_CONFIGURATION_CONSUMER_INSTANCE= +PDPD_CONFIGURATION_PARTITION_KEY= + +# PAP-PDP configuration channel + +POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP +POLICY_PDP_PAP_API_KEY= +POLICY_PDP_PAP_API_SECRET= + +# PAP + +PAP_HOST=pap +PAP_USERNAME=testpap +PAP_PASSWORD=alpha123 + +# PDP-X + +GUARD_DISABLED=false +PDP_HOST=policy-xacml-pdp +PDP_PORT=6969 +PDP_CONTEXT_URI=policy/pdpx/v1/ +PDP_USERNAME=healthcheck +PDP_PASSWORD=zb!XztG34 +PDP_CLIENT_USERNAME=python +PDP_CLIENT_PASSWORD=test +PDP_ENVIRONMENT=TEST + +# DCAE DMaaP + +DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT +DCAE_SERVERS=policy.api.simpledemo.onap.org +DCAE_CONSUMER_GROUP=dcae.policy.shared + +# Open DMaaP + +DMAAP_SERVERS=dmaap-mr + +# AAI + +AAI_HOST=policy.api.simpledemo.onap.org +AAI_PORT=6666 +AAI_CONTEXT_URI= +AAI_USERNAME=policy@policy.onap.org +AAI_PASSWORD=demo123456! + +# MSO + +SO_HOST=policy.api.simpledemo.onap.org +SO_PORT=6669 +SO_CONTEXT_URI= +SO_URL=https://policy.api.simpledemo.onap.org:6669/ +SO_USERNAME=InfraPortalClient +SO_PASSWORD=password1$ + +# VFC + +VFC_HOST=policy.api.simpledemo.onap.org +VFC_PORT=6670 +VFC_CONTEXT_URI= +VFC_USERNAME= +VFC_PASSWORD= + +# SDNC + +SDNC_HOST=policy.api.simpledemo.onap.org +SDNC_PORT=6668 +SDNC_CONTEXT_URI= +SDNC_USERNAME= +SDNC_PASSWORD= diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/env/feature-healthcheck.conf b/docker-compose/docker-compose-policy-framework/config/drools-apps/env/feature-healthcheck.conf new file mode 100644 index 00000000..1c710547 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/env/feature-healthcheck.conf @@ -0,0 +1,18 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +HEALTHCHECK_USER=demo@people.osaaf.org +HEALTHCHECK_PASSWORD=demo123456! diff --git a/docker-compose/docker-compose-policy-framework/config/drools-apps/env/feature-pooling-dmaap.conf b/docker-compose/docker-compose-policy-framework/config/drools-apps/env/feature-pooling-dmaap.conf new file mode 100644 index 00000000..3808e3d9 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools-apps/env/feature-pooling-dmaap.conf @@ -0,0 +1,17 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +POOLING_TOPIC=POOLING diff --git a/docker-compose/docker-compose-policy-framework/config/drools/custom/engine-system.properties b/docker-compose/docker-compose-policy-framework/config/drools/custom/engine-system.properties new file mode 100644 index 00000000..19e03b51 --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools/custom/engine-system.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= +# + +# system properties set within the application + +java.net.preferIPv4Stack=true + +# jmx + +com.sun.management.jmxremote.port=9991 +com.sun.management.jmxremote.authenticate=false +com.sun.management.jmxremote.ssl=false + +# certs + +javax.net.ssl.trustStore=${envd:TRUSTSTORE:/opt/app/policy/etc/ssl/policy-truststore} +javax.net.ssl.trustStorePassword=${envd:TRUSTSTORE_PASSWD:Pol1cy_0nap} + +javax.net.ssl.keyStore=${envd:KEYSTORE:/opt/app/policy/etc/ssl/policy-keystore} +javax.net.ssl.keyStorePassword=${envd:KEYSTORE_PASSWD:Pol1cy_0nap} + +# kie + +kie.maven.offline.force=${envd:REPOSITORY_OFFLINE:false} + +# symmetric key for sensitive configuration data + +engine.symm.key=${envd:SYMM_KEY} diff --git a/docker-compose/docker-compose-policy-framework/config/drools/custom/engine.properties b/docker-compose/docker-compose-policy-framework/config/drools/custom/engine.properties new file mode 100644 index 00000000..dfc6a7db --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools/custom/engine.properties @@ -0,0 +1,37 @@ +### +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 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========================================================= +### + +# Policy Engine Telemetry Server + +http.server.services=SECURED-CONFIG + +http.server.services.SECURED-CONFIG.host=${envd:TELEMETRY_HOST} +http.server.services.SECURED-CONFIG.port=9696 +http.server.services.SECURED-CONFIG.userName=${envd:TELEMETRY_USER} +http.server.services.SECURED-CONFIG.password=${envd:TELEMETRY_PASSWORD} +http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful +http.server.services.SECURED-CONFIG.managed=false +http.server.services.SECURED-CONFIG.swagger=true +http.server.services.SECURED-CONFIG.https=true +http.server.services.SECURED-CONFIG.aaf=${envd:AAF:false} +http.server.services.SECURED-CONFIG.serialization.provider=org.onap.policy.common.gson.JacksonHandler,org.onap.policy.common.endpoints.http.server.YamlJacksonHandler + +aaf.namespace=${envd:AAF_NAMESPACE:false} +aaf.root.permission=${envd:AAF_NAMESPACE:org.onap.policy}.pdpd diff --git a/docker-compose/docker-compose-policy-framework/config/drools/custom/noop.pre.sh b/docker-compose/docker-compose-policy-framework/config/drools/custom/noop.pre.sh new file mode 100755 index 00000000..63bdc4cf --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools/custom/noop.pre.sh @@ -0,0 +1,22 @@ +#!/bin/bash -x +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +sed -i "s/^dmaap/noop/g" \ + ${POLICY_HOME}/config/engine.properties \ + ${POLICY_HOME}/config/feature-lifecycle.properties + +chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties diff --git a/docker-compose/docker-compose-policy-framework/config/drools/env/base.conf b/docker-compose/docker-compose-policy-framework/config/drools/env/base.conf new file mode 100644 index 00000000..891de49f --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/drools/env/base.conf @@ -0,0 +1,132 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2020 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========================================================= + +# JVM options + +JVM_OPTIONS=-server -Xms512m -Xmx512m + +# SYSTEM software configuration + +DEBUG=y +POLICY_HOME=/opt/app/policy +POLICY_LOGS=/var/log/onap/policy/pdpd +KEYSTORE_PASSWD=Pol1cy_0nap +TRUSTSTORE_PASSWD=Pol1cy_0nap + +# Telemetry credentials + +TELEMETRY_PORT=9696 +TELEMETRY_HOST=0.0.0.0 +TELEMETRY_USER=demo@people.osaaf.org +TELEMETRY_PASSWORD=demo123456! + +# nexus repository + +SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots +SNAPSHOT_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/snapshots/ +RELEASE_REPOSITORY_ID=policy-nexus-releases +RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/ +REPOSITORY_USERNAME=admin +REPOSITORY_PASSWORD=admin123 +REPOSITORY_OFFLINE=false + +# Relational (SQL) DB access + +SQL_HOST=mariadb +SQL_USER=policy_user +SQL_PASSWORD=policy_user + +# AAF + +AAF=false +AAF_NAMESPACE=org.onap.policy +AAF_HOST=aaf.api.simpledemo.onap.org + +# PDP-D DMaaP configuration channel + +PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION +PDPD_CONFIGURATION_API_KEY= +PDPD_CONFIGURATION_API_SECRET= +PDPD_CONFIGURATION_CONSUMER_GROUP= +PDPD_CONFIGURATION_CONSUMER_INSTANCE= +PDPD_CONFIGURATION_PARTITION_KEY= + +# PAP-PDP configuration channel + +POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP +POLICY_PDP_PAP_API_KEY= +POLICY_PDP_PAP_API_SECRET= + +# PAP + +PAP_HOST= +PAP_USERNAME= +PAP_PASSWORD= + +# PDP-X + +PDP_HOST= +PDP_PORT= +PDP_CONTEXT_URI=policy/pdpx/v1/ +PDP_USERNAME= +PDP_PASSWORD= +PDP_CLIENT_USERNAME= +PDP_CLIENT_PASSWORD= +PDP_ENVIRONMENT= +GUARD_DISABLED=false + +# DCAE DMaaP + +DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT +DCAE_SERVERS= +DCAE_CONSUMER_GROUP=dcae.policy.shared + +# Open DMaaP + +DMAAP_SERVERS=mr.api.simpledemo.onap.org + +# AAI + +AAI_HOST=aai.api.simpledemo.onap.org +AAI_PORT=8443 +AAI_CONTEXT_URI= +AAI_USERNAME=policy@policy.onap.org +AAI_PASSWORD=demo123456! + +# MSO + +SO_HOST=vm1.mso.simpledemo.onap.org +SO_PORT=8080 +SO_CONTEXT_URI=onap/so/infra/ +SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra +SO_USERNAME=InfraPortalClient +SO_PASSWORD=password1$ + +# VFC + +VFC_HOST= +VFC_PORT= +VFC_CONTEXT_URI=api/nslcm/v1/ +VFC_USERNAME= +VFC_PASSWORD= + +# SDNC + +SDNC_HOST= +SDNC_PORT= +SDNC_CONTEXT_URI=restconf/operations/ +SDNC_USERNAME= +SDNC_PASSWORD= diff --git a/docker-compose/docker-compose-policy-framework/config/pap/defaultConfig.json b/docker-compose/docker-compose-policy-framework/config/pap/defaultConfig.json new file mode 100644 index 00000000..8bce2d5f --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/pap/defaultConfig.json @@ -0,0 +1,64 @@ +{ + "name": "PapGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true, + "aaf": false + }, + "pdpParameters": { + "heartBeatMs": 120000, + "updateParameters": { + "maxRetryCount": 1, + "maxWaitMs": 30000 + }, + "stateChangeParameters": { + "maxRetryCount": 1, + "maxWaitMs": 30000 + } + }, + "databaseProviderParameters": { + "name": "PolicyProviderParameterGroup", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.mariadb.jdbc.Driver", + "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin", + "databaseUser": "policy_user", + "databasePassword": "policy_user", + "persistenceUnit": "PolicyMariaDb" + }, + "topicParameterGroup": { + "topicSources" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps": false, + "allowSelfSignedCerts" : true + }], + "topicSinks" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps": false, + "allowSelfSignedCerts" : true + }, + { + "topic" : "POLICY-NOTIFICATION", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps": false, + "allowSelfSignedCerts" : true + }] + }, + "healthCheckRestClientParameters":[{ + "clientName": "api", + "hostname": "policy-api", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "useHttps": true, + "allowSelfSignedCerts" : true, + "basePath": "policy/api/v1/healthcheck" + }] +} diff --git a/docker-compose/docker-compose-policy-framework/config/xacml-pdp/defaultConfig.json b/docker-compose/docker-compose-policy-framework/config/xacml-pdp/defaultConfig.json new file mode 100644 index 00000000..7dc401fe --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/config/xacml-pdp/defaultConfig.json @@ -0,0 +1,39 @@ +{ + "name": "XacmlPdpParameters", + "pdpGroup": "defaultGroup", + "pdpType": "xacml", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true, + "aaf": false + }, + "policyApiParameters": { + "host": "policy-api", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "useHttps": true, + "allowSelfSignedCerts" : true, + "aaf": false + }, + "applicationPath": "/opt/app/policy/pdpx/apps", + "topicParameterGroup": { + "topicSources" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false, + "allowSelfSignedCerts" : true + }], + "topicSinks" : [{ + "topic" : "POLICY-PDP-PAP", + "servers" : [ "dmaap-mr" ], + "topicCommInfrastructure" : "dmaap", + "useHttps" : false, + "allowSelfSignedCerts" : true + }] + } +} diff --git a/docker-compose/docker-compose-policy-framework/docker-compose.yml b/docker-compose/docker-compose-policy-framework/docker-compose.yml new file mode 100644 index 00000000..4cdde39e --- /dev/null +++ b/docker-compose/docker-compose-policy-framework/docker-compose.yml @@ -0,0 +1,189 @@ +# +# ===========LICENSE_START==================================================== +# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2021 Bell Canada. All rights reserved. +# Modifications Copyright (C) 2021 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: '2' +networks: + default: + driver: bridge + name: nonrtric-docker-net +services: + mariadb: + image: nexus3.onap.org:10001/mariadb:10.5.8 + container_name: mariadb + hostname: mariadb + command: ['--lower-case-table-names=1', '--wait_timeout=28800'] + env_file: config/db/db.conf + volumes: + - ./config/db:/docker-entrypoint-initdb.d:ro + expose: + - 3306 + api: + image: nexus3.onap.org:10001/onap/policy-api:2.4.2 + container_name: policy-api + depends_on: + - mariadb + hostname: policy-api + ports: + - "6969:6969" + expose: + - 6969 + volumes: + - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore.jks:ro + - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro + entrypoint: ./wait_for_port.sh + command: [ + '-c', './policy-api.sh', + 'mariadb', '3306' + ] + pap: + image: nexus3.onap.org:10001/onap/policy-pap:2.4.2 + container_name: policy-pap + depends_on: + - mariadb + - api + hostname: policy-pap + ports: + - "6868:6969" + expose: + - 6868 + volumes: + - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro + - ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore.jks:ro + - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro + entrypoint: ./wait_for_port.sh + command: [ + '-c', './policy-pap.sh', + 'mariadb', '3306', + 'dmaap-mr', '3904', + 'api', '6969' + ] + xacml-pdp: + image: nexus3.onap.org:10001/onap/policy-xacml-pdp:2.4.2 + container_name: policy-xacml-pdp + depends_on: + - mariadb + - pap + hostname: policy-xacml-pdp + expose: + - 6969 + volumes: + - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro + - ./config/ks.jks:/opt/app/policy/pdpx/etc/ssl/policy-keystore.jks:ro + - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro + entrypoint: ./wait_for_port.sh + command: [ + '-c', './policy-pdpx.sh', + 'mariadb', '3306', + 'dmaap-mr', '3904', + 'pap', '6969' + ] + drools: + image: nexus3.onap.org:10001/onap/policy-drools:1.8.2 + container_name: drools + depends_on: + - mariadb + - pap + hostname: drools + expose: + - 6969 + - 9696 + volumes: + - ./config/drools/custom:/tmp/policy-install/config:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + env_file: + - config/drools/env/base.conf + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot', + 'mariadb', '3306', + 'dmaap-mr', '3904' + ] + drools-apps: + image: nexus3.onap.org:10001/onap/policy-pdpd-cl:1.8.2 + container_name: drools-apps + depends_on: + - mariadb + - pap + - xacml-pdp + hostname: drools-apps + expose: + - 6969 + - 9696 + volumes: + - ./config/drools-apps/custom:/tmp/policy-install/config:ro + - ./config/drools-apps/custom/feature-lifecycle.properties:/opt/app/policy/features/lifecycle/config/feature-lifecycle.properties:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + env_file: + - config/drools-apps/env/base.conf + - config/drools-apps/env/feature-healthcheck.conf + - config/drools-apps/env/feature-pooling-dmaap.conf + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot', + 'mariadb', '3306', + 'dmaap-mr', '3904', + 'pap', '6969', + 'dmaap-mr', '6666', + 'dmaap-mr', '6668', + 'dmaap-mr', '6669', + 'dmaap-mr', '6670' + ] + apex-pdp: + image: onap/policy-apex-pdp:latest + container_name: policy-apex-pdp + depends_on: + - mariadb + - pap + hostname: policy-apex-pdp + expose: + - 6969 + - 23324 + volumes: + - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro + - ./config/ks.jks:/opt/app/policy/apex-pdp/etc/ssl/policy-keystore.jks:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json', + 'mariadb', '3306', + 'dmaap-mr', '3904', + 'pap', '6969' + ] + distribution: + image: nexus3.onap.org:10001/onap/policy-distribution:2.5.2 + container_name: policy-distribution + depends_on: + - mariadb + - api + - pap + - apex-pdp + hostname: policy-distribution + volumes: + - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro + - ./config/ks.jks:/opt/app/policy/distribution/etc/ssl/policy-keystore.jks:ro + - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/:ro + - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro + entrypoint: /opt/app/policy/bin/wait_for_port.sh + command: [ + '-c', './policy-dist.sh', + 'mariadb', '3306', + 'dmaap-mr', '3904', + 'pap', '6969', + 'apex-pdp', '6969' + ]