diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2018-11-05 15:34:55 -0600 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2018-11-06 13:51:34 +0000 |
commit | c5db7f47bf3440429b4f6082ca729f3dcf92c98e (patch) | |
tree | bc8f242d60a48c8701e8bc9b31a2e406f4d6f08b | |
parent | 216aa6119a6f5aec0c63f6b07dcfd12bd4fed8aa (diff) |
Update policy cookbook documentation
Change-Id: I86f99dfec5d8b402505dd5922c985e6b9e93ceb9
Issue-ID: POLICY-1167
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
(cherry picked from commit 5a91dc31a529ff9d795e83650d400a5a35bf8755)
-rw-r--r-- | docs/platform/cookbook.rst | 119 |
1 files changed, 97 insertions, 22 deletions
diff --git a/docs/platform/cookbook.rst b/docs/platform/cookbook.rst index fee191358..3281d571c 100644 --- a/docs/platform/cookbook.rst +++ b/docs/platform/cookbook.rst @@ -6,11 +6,11 @@ Policy Cookbook *************** -Policy VM/Docker Recipes -^^^^^^^^^^^^^^^^^^^^^^^^ +Openstack Heat Installation - Policy VM/Docker Recipes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash - :caption: Get latest images in an already setup policy VM + :caption: Get the latest images in an already setup policy VM :linenos: /opt/policy_vm_init.sh @@ -31,60 +31,106 @@ Policy VM/Docker Recipes # This is the current default mode of instantiation. # These operations are unnecessary unless PRELOAD_POLICIES # was previously set to true - + echo "PRELOAD_POLICIES=true" > /opt/policy/.env /opt/policy_vm_init.sh .. code-block:: bash - :caption: Access the PDP-D container as a policy user + :caption: Access the PDP-D container as the policy user :linenos: docker exec -it drools bash .. code-block:: bash - :caption: Access the PDP-X container as a policy user + :caption: Access the PDP-X container as the policy user :linenos: docker exec -it -u 0 pdp su - policy .. code-block:: bash - :caption: Access the BRMSGW container as a policy user + :caption: Access the BRMSGW container as the policy user :linenos: docker exec -it -u 0 brmsgw su - policy .. code-block:: bash - :caption: Access PAP container as a policy user + :caption: Access PAP container as the policy user :linenos: docker exec -it -u 0 pap su - policy .. code-block:: bash - :caption: Access the CONSOLE container as a policy user + :caption: Access the CONSOLE container the a policy user :linenos: docker exec -it -u 0 console su - policy .. code-block:: bash - :caption: Manual Healthcheck invokation + :caption: Command line Healthcheck invokation :linenos: - # Assuming the healthcheck service credentials have not been changed - # post-installation within the drools container - source /opt/app/policy/config/feature-healthcheck.conf.environment - curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" - -X GET http://localhost:6969/healthcheck | python -m json.tool + curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" + -X GET https://localhost:6969/healthcheck | python -m json.tool + + +OOM Installation - Policy Kubernetes Recipes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. code-block:: bash + :caption: List the policy pods + :linenos: + + kubectl get pods -n onap -o wide | grep policy + + + .. code-block:: bash + :caption: Access the PAP container + :linenos: + + kubectl exec -it <pap-pod> -c pap -n onap bash + + + .. code-block:: bash + :caption: Access a PDPD-D container + :linenos: + + # <policy-deployment-prefix> depends on the deployment configuration + + kubectl exec -it <policy-deployment-prefix>-drools-0 -c drools -n onap bash + + + .. code-block:: bash + :caption: Access the PDP container + :linenos: + + # <policy-deployment-prefix> depends on the deployment configuration + + kubectl exec -it <policy-deployment-prefix>-pdp-0 -c drools -n onap bash + + + .. code-block:: bash + :caption: Push Default Policies + :linenos: + kubectl exec -it <pap-pod> -c pap -n onap -- bash -c "export PRELOAD_POLICIES=true; /tmp/policy-install/config/push-policies.sh" -PDP-D Recipes ("drools" container) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + .. code-block:: bash + :caption: Standalone Policy Web UI URL access + :linenos: + + http://<pap-vm>:30219/onap/login.htm + + +PDP-D Recipes (inside the "drools" container) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash :caption: Stop the PDP-D @@ -104,12 +150,41 @@ PDP-D Recipes ("drools" container) :caption: Manual Healthcheck Invokation :linenos: - # Assuming the healthcheck service credentials have not been changed - # post-installation within the drools container - source ${POLICY_HOME}/config/feature-healthcheck.conf - curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" - -X GET http://localhost:6969/healthcheck | python -m json.tool + curl --silent --user "${HEALTHCHECK_USER}:${HEALTHCHECK_PASSWORD}" + -X GET https://localhost:6969/healthcheck | python -m json.tool + + + .. code-block:: bash + :caption: Start a telemetry shell + :linenos: + + telemetry + + + .. code-block:: bash + :caption: See all the configured loggers + :linenos: + + curl -k --silent --user "${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" + https://localhost:9696/policy/pdp/engine/tools/loggers + + + .. code-block:: bash + :caption: See the logging level for a given logger (for example the network logger): + :linenos: + + curl -k --silent --user"${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" + https://localhost:9696/policy/pdp/engine/tools/loggers/network + + + .. code-block:: bash + :caption: Modify the logging level for a given logger (for example the network logger): + :linenos: + + curl -k --silent --user"${ENGINE_MANAGEMENT_USER}:${ENGINE_MANAGEMENT_PASSWORD}" + -X PUT https://localhost:9696/policy/pdp/engine/tools/loggers/network/WARN + End of Document |