diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-01-03 15:00:40 +0000 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2024-01-18 10:42:28 +0000 |
commit | 2e7b3c77cf6f7bf68233368bce17edb598daedc8 (patch) | |
tree | c6915325f1ba9705b3072f950b2d5c7b543a570d /tutorials/tutorial-enforcement/README.md | |
parent | ef722a6ef6a64b69bf152c0187992f0ee91a2682 (diff) |
Support for kafka within xacml tutorial
Issue-ID: POLICY-4202
Change-Id: I7bb47dce25d7613221a13f8437030f02a978770d
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'tutorials/tutorial-enforcement/README.md')
-rw-r--r-- | tutorials/tutorial-enforcement/README.md | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tutorials/tutorial-enforcement/README.md b/tutorials/tutorial-enforcement/README.md index 07b55984..d65ca3bb 100644 --- a/tutorials/tutorial-enforcement/README.md +++ b/tutorials/tutorial-enforcement/README.md @@ -14,16 +14,14 @@ The Policy Enforcement Tutorial can be built: Be sure to start the Policy Framework application components in *docker* if you are not testing this in a lab. - Ensure you have docker and docker-compose installed - Check out the *policy/docker* repo from the ONAP gerrit or from github: https://github.com/onap/policy-docker -- In a console, change directory into the *csit* directory of the *policy/docker* repo -- Start *xacml-pdp* by running the *start-containter.sh* script +- In a console, change directory into the *compose* directory of the *policy/docker* repo +- Start *xacml-pdp* by running the *start-compose.sh* script - start-container.sh xacml-pdp + start-compose.sh xacml-pdp -- Ensure that DMaaP is up - - > curl -X POST http://0.0.0.0:30227/events/POLICY-PDP-PAP - Should return JSON similar to this: - {"serverTimeMs":0,"count":0} +- Run python script ```kafka_producer.py``` under docker repository with topic name and message as parameters. + i.e. ```python3 /docker/csit/resources/tests/kafka_producer.py POLICY-PDP-PAP "message"``` + (update "message" to the usual json body) - Run the xacml-pdp health check @@ -58,11 +56,11 @@ Be sure to start the Policy Framework application components in *docker* if you # Run the Tutorial You can run the application via code by running the *App.main* method with command line argument with IP then Port -of the XACML PDP, followed by the IP then Port of Dmaap. +of the XACML PDP, followed by the IP then Port of kafka. - App.main(new String[] {"0.0.0.0", "6969", "0.0.0.0", "3904"}); + App.main(new String[] {"0.0.0.0", "6969", "0.0.0.0", "9092"}); or from Eclipse by right-clicking App.java and selecting *Run As* and select *Java Application*. Edit the -configuration by adding these command line arguments: "0.0.0.0" "6969" "0.0.0.0" "3904" +configuration by adding these command line arguments: "0.0.0.0" "6969" "0.0.0.0" "9092" Quit the application by typing 'q' into stdin. |