Add microk8s installation documentation 35/134435/3
authorwaynedunican <wayne.dunican@est.tech>
Wed, 3 May 2023 07:18:36 +0000 (08:18 +0100)
committerwaynedunican <wayne.dunican@est.tech>
Wed, 3 May 2023 08:12:44 +0000 (09:12 +0100)
- Add description of how to install and run the Policy Framework in microk8s
- Fix html issues in local-installation.rst

Issue-ID: POLICY-4582
Change-Id: I7351c08bf77aaca85677ff0cd34912017373e363
Signed-off-by: waynedunican <wayne.dunican@est.tech>
21 files changed:
docs/development/devtools/devtools.rst
docs/development/devtools/installation/images/a1-ppnt-intellij.png [moved from docs/development/devtools/images/a1-ppnt-intellij.png with 100% similarity]
docs/development/devtools/installation/images/acm-eclipse.png [moved from docs/development/devtools/images/acm-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/acm-intellij.png [moved from docs/development/devtools/images/acm-intellij.png with 100% similarity]
docs/development/devtools/installation/images/apex-pdp-eclipse.png [moved from docs/development/devtools/images/apex-pdp-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/apex-pdp-intellij.png [moved from docs/development/devtools/images/apex-pdp-intellij.png with 100% similarity]
docs/development/devtools/installation/images/drools-pdp-eclipse.png [moved from docs/development/devtools/images/drools-pdp-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/drools-pdp-intellij.png [moved from docs/development/devtools/images/drools-pdp-intellij.png with 100% similarity]
docs/development/devtools/installation/images/http-ppnt-intellij.png [moved from docs/development/devtools/images/http-ppnt-intellij.png with 100% similarity]
docs/development/devtools/installation/images/k8s-ppnt-intellij.png [moved from docs/development/devtools/images/k8s-ppnt-intellij.png with 100% similarity]
docs/development/devtools/installation/images/kserve-ppnt-intellij.png [moved from docs/development/devtools/images/kserve-ppnt-intellij.png with 100% similarity]
docs/development/devtools/installation/images/policy-api-eclipse.png [moved from docs/development/devtools/images/policy-api-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/policy-api-intellij.png [moved from docs/development/devtools/images/policy-api-intellij.png with 100% similarity]
docs/development/devtools/installation/images/policy-pap-eclipse.png [moved from docs/development/devtools/images/policy-pap-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/policy-pap-intellij.png [moved from docs/development/devtools/images/policy-pap-intellij.png with 100% similarity]
docs/development/devtools/installation/images/policy-ppnt-eclipse.png [moved from docs/development/devtools/images/policy-ppnt-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/policy-ppnt-intellij.png [moved from docs/development/devtools/images/policy-ppnt-intellij.png with 100% similarity]
docs/development/devtools/installation/images/xacml-pdp-eclipse.png [moved from docs/development/devtools/images/xacml-pdp-eclipse.png with 100% similarity]
docs/development/devtools/installation/images/xacml-pdp-intellij.png [moved from docs/development/devtools/images/xacml-pdp-intellij.png with 100% similarity]
docs/development/devtools/installation/local-installation.rst [moved from docs/development/devtools/local-installation.rst with 69% similarity]
docs/development/devtools/installation/microk8s-installation.rst [new file with mode: 0644]

index 75f3443..5f7f843 100644 (file)
@@ -421,12 +421,22 @@ To test these images, CSITs will be run.
 Running Policy Components Locally
 *********************************
 
-The following page outlines how to run the policy framework components locally use IntelliJ, Eclipse and the Command Line.
+The following page outlines how to run the policy framework components locally using IntelliJ, Eclipse and the Command Line.
 
 .. toctree::
    :maxdepth: 1
 
-   local-installation.rst
+   ./installation/local-installation.rst
+
+Running the Policy Framework in Microk8s
+****************************************
+
+The following page outlines how to run the policy framework components using microk8s.
+
+.. toctree::
+   :maxdepth: 1
+
+   ./installation/microk8s-installation.rst
 
 
 Generating Swagger Documentation
@@ -32,7 +32,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 Policy PAP
 **********
@@ -52,7 +52,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 Apex-PDP
 ********
@@ -72,8 +72,8 @@ Command Line
 
     .. code-block:: bash
 
-    cd services/services-engine
-    mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.apex.service.engine.main.ApexMain" -Dexec.args="-p /PATH/TO/POLICY_FILE.json"
+        cd services/services-engine
+        mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.apex.service.engine.main.ApexMain" -Dexec.args="-p /PATH/TO/POLICY_FILE.json"
 
 ACM-Runtime
 ***********
@@ -93,7 +93,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 Models Simulators
 *****************
@@ -103,11 +103,11 @@ Command Line
 
     .. code-block:: bash
 
-    mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json"
+        mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.pdp.PdpSimulatorMain" -Dexec.args="-c /PATH/TO/OnapPfConfig.json"
 
     .. code-block:: bash
 
-    mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.dmaap.startstop.Main" -Dexec.args="-c /PATH/TO/DefaultConfig.json"
+        mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.models.sim.dmaap.startstop.Main" -Dexec.args="-c /PATH/TO/DefaultConfig.json"
 
 XACML-PDP
 *********
@@ -127,8 +127,8 @@ Command Line
 
     .. code-block:: bash
 
-    cd main
-    mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.pdpx.main.startstop.Main" -Dexec.args="-c /PATH/TO/XacmlPdpConfigParameters.json"
+        cd main
+        mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.pdpx.main.startstop.Main" -Dexec.args="-c /PATH/TO/XacmlPdpConfigParameters.json"
 
 Drools-PDP
 **********
@@ -148,8 +148,8 @@ Command Line
 
     .. code-block:: bash
 
-    cd policy-management
-    mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.drools.system.Main"
+        cd policy-management
+        mvn -q -e clean compile exec:java -Dexec.mainClass="org.onap.policy.drools.system.Main"
 
 Policy Participant
 ******************
@@ -169,7 +169,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 Http Participant
 ****************
@@ -189,7 +189,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 Kubernetes Participant
 **********************
@@ -209,7 +209,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 A1 Participant
 **************
@@ -229,7 +229,7 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
 
 Kserve Participant
 ******************
@@ -249,4 +249,4 @@ Command Line
 
     .. code-block:: bash
 
-    mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
\ No newline at end of file
+        mvn spring-boot:run -Dspring-boot.run.arguments=”–server.port=8082”
diff --git a/docs/development/devtools/installation/microk8s-installation.rst b/docs/development/devtools/installation/microk8s-installation.rst
new file mode 100644 (file)
index 0000000..360c5b2
--- /dev/null
@@ -0,0 +1,47 @@
+.. _local-policy-label:
+
+.. toctree::
+   :maxdepth: 2
+
+Policy Framework Component Microk8s Installation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This page will explain how to install the policy in a microk8s environment.
+The intention of this page is to outline the process to spin up a kubernetes cluster using microk8s.
+
+These instructions are for development purposes only.
+
+Process
+*******
+
+In the latest release of the Policy Framework, the  ability to run the Policy Framework CSITs in a kubernetes environment was introduced.
+As part of this work, a script has been added to the policy/docker repo to bring up a kubernetes environment and deploy the Policy Framework helm charts.
+This makes installation of the Policy Framework easier for developers.
+
+Steps
+-----
+
+1. Clone the policy/docker repo.
+
+    .. code-block:: bash
+
+        git clone https://github.com/onap/policy-docker
+
+2. Invoke the microk8s installation script (docker/csit/run-k8s-csit.sh)
+
+    .. code-block:: bash
+
+        docker/csit/run-k8s-csit.sh {install} {project_name}
+
+    When the project name is not specified, the script only installs the policy helm charts and will not execute the robot tests. Alternatively, if you want to run the csit tests for a particular project, you can supply the name here.
+
+    This script verifies the microk8s kubernetes cluster is running, deploys the policy helm charts under the default namespace, builds the docker image for the robot framework and deploys the robot framework helm chart
+    in the default namespace, and invokes the robot test(s) for the project supplied by the user. The test results can be viewed from the logs of the policy-csit-robot pod.
+
+3. Teardown the cluster
+
+    .. code-block:: bash
+
+        docker/csit/run-k8s-csit.sh {uninstall}
+
+    To teardown the cluster, the same script can be invoked with the {uninstall} argument. No project name is required.