diff options
author | waynedunican <wayne.dunican@est.tech> | 2024-11-22 12:39:30 +0000 |
---|---|---|
committer | waynedunican <wayne.dunican@est.tech> | 2024-11-26 09:26:12 +0000 |
commit | db14aad1c5ab38c2313e2edfbad44887bb6f980a (patch) | |
tree | 1dd08454217347769b93843ad1c1bd58a19447f2 | |
parent | 25d78d69b182fea95e888e632c897239bbd3702c (diff) |
Update policy framework documentation
Update documentation to:
- remove DMaap references
- add Kafka information
Issue-ID: POLICY-4579
Change-Id: I1691476e6757c3f44fa5cb037a4fce55e3823b6d
Signed-off-by: waynedunican <wayne.dunican@est.tech>
-rw-r--r-- | docs/apex/APEX-OnapPf-Guide.rst | 39 | ||||
-rw-r--r-- | docs/apex/APEX-Policy-Guide.rst | 4 | ||||
-rw-r--r-- | docs/architecture/architecture.rst | 40 | ||||
-rw-r--r-- | docs/development/devtools/installation/local-installation.rst | 25 | ||||
-rw-r--r-- | docs/development/pdp/pdp-pap-interaction.rst | 6 | ||||
-rw-r--r-- | docs/installation/oom.rst | 15 | ||||
-rw-r--r-- | docs/pap/pap.rst | 2 |
7 files changed, 48 insertions, 83 deletions
diff --git a/docs/apex/APEX-OnapPf-Guide.rst b/docs/apex/APEX-OnapPf-Guide.rst index f7f1f3a7..289d1ea6 100644 --- a/docs/apex/APEX-OnapPf-Guide.rst +++ b/docs/apex/APEX-OnapPf-Guide.rst @@ -154,7 +154,7 @@ Verify Installation - run APEXOnapPf .. container:: paragraph - OnapPfConfig.json is the file which contains the initial configuration to startup the ApexStarter service. The dmaap topics to be used for sending or receiving messages is also specified in the this file. Provide this file as argument while running the ApexOnapPf. + OnapPfConfig.json is the file which contains the initial configuration to startup the ApexStarter service. The Kafka topics to be used for sending or receiving messages is also specified in the this file. Provide this file as argument while running the ApexOnapPf. .. container:: listingblock @@ -204,7 +204,7 @@ Verify Installation - run APEXOnapPf .. container:: paragraph - The ApexOnapPf service is now running, sending heartbeat messages to dmaap (which will be received by PAP) and listening for messages from PAP on the dmaap topic specified. Based on instructions from PAP, the ApexOnapPf will deploy or undeploy policies on the ApexEngine. + The ApexOnapPf service is now running, sending heartbeat messages to Kafka (which will be received by PAP) and listening for messages from PAP on the Kafka topic specified. Based on instructions from PAP, the ApexOnapPf will deploy or undeploy policies on the ApexEngine. .. container:: paragraph @@ -343,16 +343,27 @@ Format of the configuration file (OnapPfConfig.json) explained "supportedPolicyTypes":[{"name":"onap.policies.controlloop.operational.Apex","version":"1.0.0"}] (6) }, "topicParameterGroup": { - "topicSources" : [{ (7) - "topic" : "POLICY-PDP-PAP", (8) - "servers" : [ "message-router" ], (9) - "topicCommInfrastructure" : "dmaap" (10) - }], - "topicSinks" : [{ (11) - "topic" : "POLICY-PDP-PAP", (12) - "servers" : [ "message-router" ], (13) - "topicCommInfrastructure" : "dmaap" (14) - }] + "topicSources": [ + { + "topic": "policy-pdp-pap", + "servers": [ + "kafka:9092" + ], + "useHttps": false, + "topicCommInfrastructure": "kafka", + "fetchTimeout": 15000 + } + ], + "topicSinks": [ + { + "topic": "policy-pdp-pap", + "servers": [ + "kafka:9092" + ], + "useHttps": false, + "topicCommInfrastructure": "kafka" + } + ] } } @@ -392,7 +403,7 @@ Format of the configuration file (OnapPfConfig.json) explained | | topic. | +-----------------------------------+-------------------------------------------------+ | **10** | The source topic infrastructure. | - | | For e.g. dmaap, noop, ueb | + | | For e.g. kafka, noop | +-----------------------------------+-------------------------------------------------+ | **11** | List of topics' details to which | | | messages are sent. | @@ -404,5 +415,5 @@ Format of the configuration file (OnapPfConfig.json) explained | | topic. | +-----------------------------------+-------------------------------------------------+ | **14** | The sink topic infrastructure. | - | | For e.g. dmaap, noop, ueb | + | | For e.g. kafka, noop | +-----------------------------------+-------------------------------------------------+ diff --git a/docs/apex/APEX-Policy-Guide.rst b/docs/apex/APEX-Policy-Guide.rst index 60468917..2c3c684e 100644 --- a/docs/apex/APEX-Policy-Guide.rst +++ b/docs/apex/APEX-Policy-Guide.rst @@ -1870,7 +1870,7 @@ Writing Multiple Output Events from a Final State Consider a simple example where a policy *CDSActionPolicy* has a state *MakeCDSRequestState* which is also a final state. The state is triggered by an event *AAIEvent*. A task called *HandleCDSActionTask* is associated with *MakeCDSRequestState*.There are two output events expected from *MakeCDSRequestState* which are *CDSRequestEvent* - (request event sent to CDS) and *LogEvent* (log event sent to DMaaP). + (request event sent to CDS) and *LogEvent* (log event sent to Kafka). Writing an APEX policy with this example will involve the below changes. *Command File:* @@ -1891,7 +1891,7 @@ Writing Multiple Output Events from a Final State event create name=CDSRequestEvent version=0.0.1 nameSpace=org.onap.policy.apex.test source=APEX target=CDS event parameter create name=CDSRequestEvent parName=actionIdentifiers schemaName=CDSActionIdentifiersType .. - event create name=LogEvent version=0.0.1 nameSpace=org.onap.policy.apex.test source=APEX target=DMaaP + event create name=LogEvent version=0.0.1 nameSpace=org.onap.policy.apex.test source=APEX target=Kafka event parameter create name=LogEvent parName=status schemaName=SimpleStringType .. diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst index f582918c..fb960f0c 100644 --- a/docs/architecture/architecture.rst +++ b/docs/architecture/architecture.rst @@ -187,7 +187,7 @@ such as *CLAMP* can use the *PolicyAPI* API to create, update, delete, and read - Management of the deployment of policies to PDPs in an ONAP installation. *PolicyAdministration* gives each PDP group a set of domain policies to execute. -*PolicyAdministration* handles PDPs and policy allocation to PDPs using asynchronous messaging over DMaaP. It provides +*PolicyAdministration* handles PDPs and policy allocation to PDPs using asynchronous messaging over Kafka. It provides three APIs: - a CRUD API for policy groups and subgroups @@ -722,46 +722,18 @@ the clusters. .. image:: images/MCSharedDB.svg -2.3.8.2 DMaaP Arrangement -""""""""""""""""""""""""" +2.3.8.2 Kafka Communication +""""""""""""""""""""""""""" -As in prior releases, communication between the PAPs and PDPs still takes place via -DMaaP. Two arrangements, described below, are supported. - -2.3.8.2.1 Local DMaaP -~~~~~~~~~~~~~~~~~~~~~ - -In this arrangement, each cluster is associated with its own, local -DMaaP, and communication only happens between PAPs and PDPs within the same cluster. - -.. image:: images/MCLocalDmaap.svg - -The one -limitation with this approach is that, when a PAP in cluster A deploys a policy, PAP -is only able to inform the PDPs in the local cluster; the PDPs in the other clusters -are not made aware of the new deployment until they generate a heartbeat, at which -point, their local PAP will inform them of the new deployment. The same is true of -changes made to the state of a PDP Group; changes only propagate to PDPs in other -clusters in response to heartbeats generated by the PDPs. - -.. image:: images/MCLocalHB.svg - -2.3.8.2.2 Shared DMaaP -~~~~~~~~~~~~~~~~~~~~~~ - -In this arrangement, the PAPs and PDPs in all of the clusters are -pointed to a common DMaaP. Because the PAP and PDPs all communicate via the same -DMaaP, when a PAP deploys a policy, all PDPs are made aware, rather than having to -wait for a heartbeat. - -.. image:: images/MCSharedDmaap.svg +In prior releases, communication between the PAPs and PDPs took place via +DMaaP. The communication now takes place over Kafka topics. 2.3.8.3 Missed Heartbeat """""""""""""""""""""""" To manage the removal of terminated PDPs from the DB, a record, containing a "last-updated" timestamp, is maintained within the DB for each PDP. Whether using a -local or shared DMaaP, any PAP receiving a message from a PDP will update the timestamp +local or shared Kafka cluster, any PAP receiving a message from a PDP will update the timestamp in the associated record, thus keeping the records “current”. .. image:: images/MCSharedHB.svg diff --git a/docs/development/devtools/installation/local-installation.rst b/docs/development/devtools/installation/local-installation.rst index 861d4650..7e2e6899 100644 --- a/docs/development/devtools/installation/local-installation.rst +++ b/docs/development/devtools/installation/local-installation.rst @@ -54,6 +54,17 @@ Command Line mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082” + +Models Simulators +***************** + +Command Line +------------ + + .. code-block:: bash + + mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json" + Apex-PDP ******** @@ -95,20 +106,6 @@ Command Line mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082” -Models Simulators -***************** - -Command Line ------------- - - .. code-block:: bash - - mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json" - - .. code-block:: bash - - mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.dmaap.startstop.Main" -Dexec.args="-c /PATH/TO/DefaultConfig.json" - XACML-PDP ********* diff --git a/docs/development/pdp/pdp-pap-interaction.rst b/docs/development/pdp/pdp-pap-interaction.rst index 14a92517..eff8a79e 100644 --- a/docs/development/pdp/pdp-pap-interaction.rst +++ b/docs/development/pdp/pdp-pap-interaction.rst @@ -13,7 +13,7 @@ Guidelines for PDP-PAP interaction A PDP (Policy Decision Point) is where the policy execution happens. The administrative actions such as managing the PDPs, deploying or undeploying policies to these PDPs etc. are handled by PAP (Policy Administration Point). Any PDP should follow certain behavior to be registered and functional in -the Policy Framework. All the communications between PAP and PDP happen over DMaaP on topic *POLICY-PDP-PAP*. +the Policy Framework. All the communications between PAP and PDP happen over Kafka on topic *POLICY-PDP-PAP*. The below diagram shows how a PDP interacts with PAP. .. image:: images/PDP_PAP.svg @@ -23,7 +23,7 @@ The below diagram shows how a PDP interacts with PAP. A PDP should be configured to start with the below information in its startup configuration file. - *pdpGroup* to which the PDP should belong to. -- *DMaaP topic* 'POLICY-PDP-PAP' which should be the source and sink for communicating with PAP. +- *Kafka topic* 'POLICY-PDP-PAP' which should be the source and sink for communicating with PAP. **2. PDP sends PDP_STATUS (registration message)** @@ -81,7 +81,7 @@ PAP also sends the *pdpHeartbeatIntervalMs* which is the time interval in which **4. PDP sends PDP_STATUS response to PDP_UPDATE** -PDP on receiving the PDP_UPDATE message from the DMaaP topic, it first checks if the message is intended for the PDP. +PDP on receiving the PDP_UPDATE message from the Kafka topic, it first checks if the message is intended for the PDP. If so, it updates itself with the information in PDP_UPDATE message from PAP such as *pdpSubgroup*, *pdpHeartbeatIntervalMs* and *policiesToBeDeployed* (if any). After handling the PDP_UPDATE message, the PDP sends a response message back to PAP with the current status of the PDP along with the result of the PDP_UPDATE operation. diff --git a/docs/installation/oom.rst b/docs/installation/oom.rst index d975e752..263e5a2f 100644 --- a/docs/installation/oom.rst +++ b/docs/installation/oom.rst @@ -437,18 +437,3 @@ To *override the PDP-D keystore or trustore*, add a suitable replacement(s) unde "drools/resources/secrets". Modify the drools chart values.yaml with new credentials, and follow the procedures described at :ref:`install-upgrade-policy-label` to redeploy the chart. - -To *disable https* for the DMaaP configuration topic, add a copy of -`engine.properties <https://git.onap.org/policy/drools-pdp/tree/policy-management/src/main/server/config/engine.properties>`_ -with "dmaap.source.topics.PDPD-CONFIGURATION.https" set to "false", or alternatively -create a ".pre.sh" script (see above) that edits this file before the PDP-D is -started. - -To use *noop topics* for standalone testing, add a "noop.pre.sh" script under -oom/kubernetes/policy/charts/drools/resources/configmaps/: - -.. code-block:: bash - - #!/bin/bash - sed -i "s/^dmaap/noop/g" $POLICY_HOME/config/*.properties - diff --git a/docs/pap/pap.rst b/docs/pap/pap.rst index 1515af53..c2e38e53 100644 --- a/docs/pap/pap.rst +++ b/docs/pap/pap.rst @@ -390,7 +390,7 @@ Here is a sample response: The *PolicyAdministration* component (PAP) is initialized using a configuration file: `papParameters.yaml <https://github.com/onap/policy-pap/blob/master/packages/policy-pap-tarball/src/main/resources/etc/papParameters.yaml>`_ -The configuration file is a YAML file containing the relevant fields for configuring the REST server, Database and DMaaP connectivity and so on. +The configuration file is a YAML file containing the relevant fields for configuring the REST server, Database and Kafka connectivity and so on. End of Document |