summaryrefslogtreecommitdiffstats
path: root/docs/platform/cookbook.rst
diff options
context:
space:
mode:
authorSaryu Shah <ss3917@att.com>2018-03-19 22:18:13 +0000
committerPamela Dragosh <pdragosh@research.att.com>2018-03-20 14:46:43 +0000
commit82b62ca5dd3ae30aab7999b5959e1c07eb1d3d1f (patch)
tree41c81b9934cf135d157369c21cd358a968370bdb /docs/platform/cookbook.rst
parentc08d7d80907f2799a49987d61e4260bb44ff8aba (diff)
cookbook, updated architecture doc
policy documentation - cookbook, updated architecture ------------------------------------------------------------- Issue-ID: POLICY-535 Change-Id: I7d13c145993692b8669f4855b0b23cc73eaa8142 Signed-off-by: Saryu Shah <ss3917@att.com>
Diffstat (limited to 'docs/platform/cookbook.rst')
-rw-r--r--docs/platform/cookbook.rst128
1 files changed, 128 insertions, 0 deletions
diff --git a/docs/platform/cookbook.rst b/docs/platform/cookbook.rst
new file mode 100644
index 000000000..a93f66be8
--- /dev/null
+++ b/docs/platform/cookbook.rst
@@ -0,0 +1,128 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+*******************************
+Policy Cookbook |cookbooklogo|
+*******************************
+
+Policy VM/Docker Recipes
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+ .. code-block:: bash
+ :caption: Get latest images in an already setup policy VM
+ :linenos:
+
+ /opt/policy_vm_init.sh
+
+
+ .. code-block:: bash
+ :caption: Install/start docker policy containers with no policies preloaded
+ :linenos:
+
+ echo "PRELOAD_POLICIES=false" > /opt/policy/.env
+ /opt/policy_vm_init.sh
+
+
+ .. code-block:: bash
+ :caption: Install/start docker policy containers with policies preloaded
+ :linenos:
+
+ # 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
+ :linenos:
+
+ docker exec -it drools bash
+
+
+ .. code-block:: bash
+ :caption: Access the PDP-X container as a policy user
+ :linenos:
+
+ docker exec -it -u 0 pdp su - policy
+
+
+ .. code-block:: bash
+ :caption: Access the BRMSGW container as a policy user
+ :linenos:
+
+ docker exec -it -u 0 brmsgw su - policy
+
+
+ .. code-block:: bash
+ :caption: Access PAP container as a policy user
+ :linenos:
+
+ docker exec -it -u 0 pap su - policy
+
+
+ .. code-block:: bash
+ :caption: Access the CONSOLE container as a policy user
+ :linenos:
+
+ docker exec -it -u 0 console su - policy
+
+
+ .. code-block:: bash
+ :caption: Manual 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
+
+
+PDP-D Recipes ("drools" container)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ .. code-block:: bash
+ :caption: Stop the PDP-D
+ :linenos:
+
+ policy stop
+
+
+ .. code-block:: bash
+ :caption: Start the PDP-D
+ :linenos:
+
+ policy start
+
+
+ .. code-block:: bash
+ :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
+
+
+.. |recipelogo| image:: recipecard.png
+ :width: 80pt
+ :height: 80pt
+
+.. |cookbooklogo| image:: cookbook.gif
+ :width: 80pt
+ :height: 80pt
+
+End of Document
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Policy+Cookbook
+
+
+