cookbook, updated architecture doc 55/36855/2
authorSaryu Shah <ss3917@att.com>
Mon, 19 Mar 2018 22:18:13 +0000 (22:18 +0000)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 20 Mar 2018 14:46:43 +0000 (14:46 +0000)
policy documentation - cookbook, updated architecture
-------------------------------------------------------------

Issue-ID: POLICY-535

Change-Id: I7d13c145993692b8669f4855b0b23cc73eaa8142
Signed-off-by: Saryu Shah <ss3917@att.com>
docs/platform/PolicyArchitectureDetails.png
docs/platform/PolicyArchitectureDetailsKey.png [new file with mode: 0755]
docs/platform/PolicySummary.png [new file with mode: 0755]
docs/platform/architecture.rst
docs/platform/cookbook.gif [new file with mode: 0755]
docs/platform/cookbook.rst [new file with mode: 0644]
docs/platform/index.rst

index 3970546..e179cdb 100755 (executable)
Binary files a/docs/platform/PolicyArchitectureDetails.png and b/docs/platform/PolicyArchitectureDetails.png differ
diff --git a/docs/platform/PolicyArchitectureDetailsKey.png b/docs/platform/PolicyArchitectureDetailsKey.png
new file mode 100755 (executable)
index 0000000..e6e7a46
Binary files /dev/null and b/docs/platform/PolicyArchitectureDetailsKey.png differ
diff --git a/docs/platform/PolicySummary.png b/docs/platform/PolicySummary.png
new file mode 100755 (executable)
index 0000000..b2f84dc
Binary files /dev/null and b/docs/platform/PolicySummary.png differ
index 28215de..91679ea 100644 (file)
@@ -35,6 +35,9 @@ As illustrated in the Figure below, the POLICY components are supported by a num
 .. image:: PolicyArchitectureDetails.png
 
 
+.. image:: PolicyArchitectureDetailsKey.png
+
+
 The PAP provides interfaces for the management of policies.  It utilizes the XACML database to store policies, which are then distributed to the PDPs.
 
 The XACML and Drools databases are hosted in a MariaDB cluster.  The XACML database is used to persist policies and policy dictionaries and provide a point for PDPs to retrieve policies.  The XACML database also has tables used for node state management, detection of node failure and failover. As indicated above, the state management tables will only include entries for the PAP and PDP-X as the testing is not yet complete for the PDP-D.
@@ -96,5 +99,7 @@ Attributes can be specified for each dimension. In addition to being defined for
 Policy writers can define attributes so that policy events or requests self-indicate their scope. The scope is then examined by a suitable function and subsequently acted upon accordingly. Policy decisions and enforcement functions can self-indicate their scope of decision-making, enforcement, or other capabilities. Virtual functions can be automatically attached to the appropriate POLICY Framework and distribution mechanisms.
 
 
+.. image:: PolicySummary.png
+
 End of Document
 
diff --git a/docs/platform/cookbook.gif b/docs/platform/cookbook.gif
new file mode 100755 (executable)
index 0000000..10d25ea
Binary files /dev/null and b/docs/platform/cookbook.gif differ
diff --git a/docs/platform/cookbook.rst b/docs/platform/cookbook.rst
new file mode 100644 (file)
index 0000000..a93f66b
--- /dev/null
@@ -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
+
+
+
index f8fccd8..1bedf09 100644 (file)
@@ -35,6 +35,7 @@ Policy Platform Tutorials
 .. toctree::
    :maxdepth: 1
 
+   cookbook.rst
    deployPDPPAP.rst
    guardpolicy.rst
    guardpdp.rst