1 Copyright 2020 AT&T Intellectual Property. All rights reserved.
3 This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
4 Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
8 The Policy Enforcement Tutorial can be built:
12 # Start the Policy Framework components
14 Be sure to start the Policy Framework application components in *docker* if you are not testing this in a lab.
15 - Ensure you have docker and docker-compose installed
16 - Check out the *policy/docker* repo from the ONAP gerrit or from github: https://github.com/onap/policy-docker
17 - In a console, change directory into the *csit* directory of the *policy/docker* repo
18 - Start *xacml-pdp* by running the *start-containter.sh* script
20 start-container.sh xacml-pdp
22 - Ensure that DMaaP is up
24 > curl -X POST http://0.0.0.0:30227/events/POLICY-PDP-PAP
25 Should return JSON similar to this:
26 {"serverTimeMs":0,"count":0}
28 - Run the xacml-pdp health check
30 curl -u 'policyadmin:zb!XztG34' 'http://0.0.0.0:30441/policy/pdpx/v1/healthcheck'
31 Should return JSON similar to this:
32 {"name":"Policy Xacml PDP","url":"self","healthy":true,"code":200,"message":"alive"}
34 - Run the api health check
36 curl -u 'policyadmin:zb!XztG34' 'http://0.0.0.0:30440/policy/api/v1/healthcheck'
37 Should return JSON similar to this:
46 - Run the pap health check
48 curl -u 'policyadmin:zb!XztG34' 'http://0.0.0.0:30442/policy/pap/v1/healthcheck'
49 Should return JSON similar to this:
60 You can run the application via code by running the *App.main* method with command line argument with IP then Port
61 of the XACML PDP, followed by the IP then Port of Dmaap.
63 App.main(new String[] {"0.0.0.0", "6969", "0.0.0.0", "3904"});
65 or from Eclipse by right-clicking App.java and selecting *Run As* and select *Java Application*. Edit the
66 configuration by adding these command line arguments: "0.0.0.0" "6969" "0.0.0.0" "3904"
68 Quit the application by typing 'q' into stdin.