2 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
5 *******************************
6 Policy Cookbook |cookbooklogo|
7 *******************************
9 Policy VM/Docker Recipes
10 ^^^^^^^^^^^^^^^^^^^^^^^^
13 :caption: Get latest images in an already setup policy VM
16 /opt/policy_vm_init.sh
20 :caption: Install/start docker policy containers with no policies preloaded
23 echo "PRELOAD_POLICIES=false" > /opt/policy/.env
24 /opt/policy_vm_init.sh
28 :caption: Install/start docker policy containers with policies preloaded
31 # This is the current default mode of instantiation.
32 # These operations are unnecessary unless PRELOAD_POLICIES
33 # was previously set to true
35 echo "PRELOAD_POLICIES=true" > /opt/policy/.env
36 /opt/policy_vm_init.sh
40 :caption: Access the PDP-D container as a policy user
43 docker exec -it drools bash
47 :caption: Access the PDP-X container as a policy user
50 docker exec -it -u 0 pdp su - policy
54 :caption: Access the BRMSGW container as a policy user
57 docker exec -it -u 0 brmsgw su - policy
61 :caption: Access PAP container as a policy user
64 docker exec -it -u 0 pap su - policy
68 :caption: Access the CONSOLE container as a policy user
71 docker exec -it -u 0 console su - policy
75 :caption: Manual Healthcheck invokation
78 # Assuming the healthcheck service credentials have not been changed
79 # post-installation within the drools container
81 source /opt/app/policy/config/feature-healthcheck.conf.environment
82 curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}"
83 -X GET http://localhost:6969/healthcheck | python -m json.tool
86 PDP-D Recipes ("drools" container)
87 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90 :caption: Stop the PDP-D
97 :caption: Start the PDP-D
104 :caption: Manual Healthcheck Invokation
107 # Assuming the healthcheck service credentials have not been changed
108 # post-installation within the drools container
110 source ${POLICY_HOME}/config/feature-healthcheck.conf
111 curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}"
112 -X GET http://localhost:6969/healthcheck | python -m json.tool
115 .. |recipelogo| image:: recipecard.png
119 .. |cookbooklogo| image:: cookbook.gif
125 .. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Policy+Cookbook