summaryrefslogtreecommitdiffstats
path: root/docs/drools/tutorial_cl.rst
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2020-06-12 17:01:24 -0500
committerjhh <jorge.hernandez-herrero@att.com>2020-06-15 11:56:21 -0500
commit108dd8ff62cbdfbbe1ba3589afe43582105ea275 (patch)
tree6007bd025b40e1aca92c3cfe1b0672f7645c917d /docs/drools/tutorial_cl.rst
parent11de40286f2a91edc9755f6ea9e621006452527b (diff)
drools documentation redo
Issue-ID: POLICY-2622 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I568c041f972c76b595964ee3de731c1cde304d8f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'docs/drools/tutorial_cl.rst')
-rw-r--r--docs/drools/tutorial_cl.rst107
1 files changed, 0 insertions, 107 deletions
diff --git a/docs/drools/tutorial_cl.rst b/docs/drools/tutorial_cl.rst
deleted file mode 100644
index d7c2430c..00000000
--- a/docs/drools/tutorial_cl.rst
+++ /dev/null
@@ -1,107 +0,0 @@
-
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-
-***********************************************************************************************
-Using the Control Loop PDP-D docker image for standalone testing
-***********************************************************************************************
-
-.. contents::
- :depth: 3
-
-In this tutorial will start a Control Loop PDP-D container to use to test Operational Policies
-without companion components.
-
-**Step 1:** Copy a template *base.conf* with configuration to instantiate the container.
-
- .. code-block:: bash
-
- mkdir config
- cd config
- wget https://git.onap.org/policy/docker/plain/config/drools/base.conf?h=dublin -O base.conf
-
-
-**Step 2:** Simplify *base.conf* for a standalone configuration (by disabling db and nexus access):
-
- .. code-block:: bash
-
- cd config
- sed -i "s/^SQL_HOST=.*$/SQL_HOST=/g" base.conf
- sed -i "s/^SNAPSHOT_REPOSITORY_ID=.*$/SNAPSHOT_REPOSITORY_ID=/g" base.conf
- sed -i "s/^SNAPSHOT_REPOSITORY_URL=.*$/SNAPSHOT_REPOSITORY_URL=/g" base.conf
- sed -i "s/^RELEASE_REPOSITORY_ID=.*$/RELEASE_REPOSITORY_ID=/g" base.conf
- sed -i "s/^RELEASE_REPOSITORY_URL=.*$/RELEASE_REPOSITORY_URL=/g" base.conf
-
- Note: For MacOS use - sed -i'' -e "s/^SQL_HOST=.*$/SQL_HOST=/g" base.conf and similar for all sed commands.
-
-**Step 3:** Open a *bash* shell into the PDP-D Control Loop container.
-
- .. code-block:: bash
-
- docker run --rm --env-file config/base.conf -p 9696:9696 -p 6969:6969 -it --name pdpd -h pdpd nexus3.onap.org:10001/onap/policy-pdpd-cl:1.4.1 bash
-
-**Step 4:** Disable the distributed-locking feature, since this is a single CL PDP-D instance.
-
- .. code-block:: bash
-
- features disable distributed-locking
-
-**Step 5:** If using simulators (see tutorials), enable the *controlloop-utils* feature.
-
- .. code-block:: bash
-
- features enable controlloop-utils
-
-**Step 6:** To reduce error logs due to being unable to communicate with DMaaP, change the official configuration to use *noop* topics instead (no network IO involved).
-
- .. code-block:: bash
-
- cd $POLICY_HOME/config
- sed -i "s/^dmaap/noop/g" *.properties
-
-**Step 7:** Disable PDP-X guard functionality.
-
- .. code-block:: bash
-
- cd $POLICY_HOME/config
- sed -i "s/^guard.disabled=*$/guard.disabled=true/g" $POLICY_HOME/config/controlloop.properties.environment
- sed -i "s/^aai.customQuery=*$/aai.customQuery=false/g" $POLICY_HOME/config/controlloop.properties.environment
-
-**Step 8:** Start the CL PDP-D.
-
- .. code-block:: bash
-
- policy start
-
-**Step 9:** Place the CL PDP-D in *ACTIVE* mode.
-
- .. code-block:: bash
-
- cat pdp-state-change.json
- {
- "state": "ACTIVE",
- "messageName": "PDP_STATE_CHANGE",
- "requestId": "385146af-adeb-4157-b97d-6ae85c1ddcb3",
- "timestampMs": 1555791893587,
- "name": "pdpd",
- "pdpGroup": "controlloop",
- "pdpSubgroup": "drools"
- }
-
- http --verify=no -a "${TELEMETRY_USER}:${TELEMETRY_PASSWORD}" PUT https://localhost:9696/policy/pdp/engine/topics/sources/noop/POLICY-PDP-PAP/events @pdp-state-change.json Content-Type:'text/plain'
-
- telemetry # to verify
- > get lifecycle/fsm/state # verify that state is ACTIVE
-
-Note that *name* in *pdp-state-change.json* can be obtained from running *hostname* in the container.
-
-Proceed with testing your new policy as described in the specific tutorials:
-
-• vCPE - `Tutorial: Testing the vCPE use case in a standalone PDP-D <tutorial_vCPE.html>`_
-• vDNS - `Tutorial: Testing the vDNS Use Case in a standalone PDP-D <tutorial_vDNS.html>`_
-• vFW - `Tutorial: Testing the vFW flow in a standalone PDP-D <tutorial_vFW.html>`_
-
-.. seealso:: `Methods to run PDP-D <runningPDPD.html>`_.
-
-
-End of Document