X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tutorials%2Ftutorial-xacml-application%2Fsrc%2Fmain%2Fdocker%2FREADME.md;h=33c9166a337dc82307f84b3391c617a4bc36cb1f;hb=2e7b3c77cf6f7bf68233368bce17edb598daedc8;hp=05a8746240b3ab0a41d30a7c0c8e02227158817b;hpb=ef722a6ef6a64b69bf152c0187992f0ee91a2682;p=policy%2Fxacml-pdp.git diff --git a/tutorials/tutorial-xacml-application/src/main/docker/README.md b/tutorials/tutorial-xacml-application/src/main/docker/README.md index 05a87462..33c9166a 100644 --- a/tutorials/tutorial-xacml-application/src/main/docker/README.md +++ b/tutorials/tutorial-xacml-application/src/main/docker/README.md @@ -12,7 +12,7 @@ ### Setting Up and Starting from policy/docker components 1. Clone ```https://git.onap.org/policy/docker/``` - 2. ```cd /docker/csit``` + 2. ```cd /docker``` 3. Run the following to set the containers location, project, branch, and version: - ```export CONTAINER_LOCATION=nexus3.onap.org:10001/``` - ```export PROJECT=pap``` @@ -21,32 +21,34 @@ - ```get-versions.sh``` 4. Run ```docker image ls``` - Take note of the REPOSITORY ```onap/policy/xacml-tutorial``` and its ```TAG``` - - This refers to the image from our mvn clean install from above + - This refers to the image from our `mvn clean install` from above 5. Edit ```docker-compose-all.sh``` - Replace xacml-pdp image with the format "REPOSITORY:TAG" as noted in Step 4 - - ex. image: ```onap/policy-xacml-tutorial:2.7.1-SNAPSHOT``` + - ex. image: ```onap/policy-xacml-tutorial:3.1.1-SNAPSHOT``` ### Running the Containers and Testing -Run ```docker-compose -f docker-compose-all.yml up xacml-pdp``` +Run ```./compose/start-compose.sh xacml-pdp``` +### Triggering policy notification update + +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) ## Verification Example Calls Verify that the components are accessible: - 1. ```curl -X POST http://0.0.0.0:3904/events/POLICY-PDP-PAP``` - - Should return JSON similar to this: ```{"serverTimeMs":0,"count":0}``` - - 2. ```curl -k -u 'healthcheck:zb!XztG34' 'https://0.0.0.0:6969/policy/pdpx/v1/healthcheck'``` - - Should return JSON similar to this: ```{"name":"Policy Xacml PDP","url":"self","healthy":true,"code":200,"message":"alive"}``` + 1. ```curl -k -u 'healthcheck:zb!XztG34' 'https://0.0.0.0:6969/policy/pdpx/v1/healthcheck'``` + - Should return JSON similar to this: ```{"name":"Policy Xacml PDP","url":"self","healthy":true,"code":200,"message":"alive"}``` - 3. ```curl -k -u 'healthcheck:zb!XztG34' 'https://0.0.0.0:6767/policy/api/v1/healthcheck'``` - - Should return JSON similar to this: ```{"name": "Policy API","url": "policy-api","healthy": true,"code": 200,"message": "alive"}``` + 2. ```curl -k -u 'healthcheck:zb!XztG34' 'https://0.0.0.0:6767/policy/api/v1/healthcheck'``` + - Should return JSON similar to this: ```{"name": "Policy API","url": "policy-api","healthy": true,"code": 200,"message": "alive"}``` - 4. ```curl -k -u 'healthcheck:zb!XztG34' 'https://0.0.0.0:6868/policy/pap/v1/healthcheck'``` - - Should return JSON similar to this: ```{"name": "Policy PAP","url": "policy-pap","healthy": true,"code": 200,"message": "alive"}``` + 3. ```curl -k -u 'healthcheck:zb!XztG34' 'https://0.0.0.0:6868/policy/pap/v1/healthcheck'``` + - Should return JSON similar to this: ```{"name": "Policy PAP","url": "policy-pap","healthy": true,"code": 200,"message": "alive"}``` ## POSTMAN Collection -You can find the collection under ```/policy-xacml-pdp/tutorials-tutorial-xacml-application/postman/``` +You can find the collection under ```/policy-xacml-pdp/tutorials/tutorial-xacml-application/postman/```