From: waynedunican Date: Wed, 3 May 2023 07:18:36 +0000 (+0100) Subject: Add microk8s installation documentation X-Git-Tag: 4.0.1~27 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fparent.git;a=commitdiff_plain;h=c92e128c5d7a1a67f43321d275b6e9d3c8f16e57 Add microk8s installation documentation - 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 --- diff --git a/docs/development/devtools/devtools.rst b/docs/development/devtools/devtools.rst index 75f34434..5f7f8434 100644 --- a/docs/development/devtools/devtools.rst +++ b/docs/development/devtools/devtools.rst @@ -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 diff --git a/docs/development/devtools/images/a1-ppnt-intellij.png b/docs/development/devtools/installation/images/a1-ppnt-intellij.png similarity index 100% rename from docs/development/devtools/images/a1-ppnt-intellij.png rename to docs/development/devtools/installation/images/a1-ppnt-intellij.png diff --git a/docs/development/devtools/images/acm-eclipse.png b/docs/development/devtools/installation/images/acm-eclipse.png similarity index 100% rename from docs/development/devtools/images/acm-eclipse.png rename to docs/development/devtools/installation/images/acm-eclipse.png diff --git a/docs/development/devtools/images/acm-intellij.png b/docs/development/devtools/installation/images/acm-intellij.png similarity index 100% rename from docs/development/devtools/images/acm-intellij.png rename to docs/development/devtools/installation/images/acm-intellij.png diff --git a/docs/development/devtools/images/apex-pdp-eclipse.png b/docs/development/devtools/installation/images/apex-pdp-eclipse.png similarity index 100% rename from docs/development/devtools/images/apex-pdp-eclipse.png rename to docs/development/devtools/installation/images/apex-pdp-eclipse.png diff --git a/docs/development/devtools/images/apex-pdp-intellij.png b/docs/development/devtools/installation/images/apex-pdp-intellij.png similarity index 100% rename from docs/development/devtools/images/apex-pdp-intellij.png rename to docs/development/devtools/installation/images/apex-pdp-intellij.png diff --git a/docs/development/devtools/images/drools-pdp-eclipse.png b/docs/development/devtools/installation/images/drools-pdp-eclipse.png similarity index 100% rename from docs/development/devtools/images/drools-pdp-eclipse.png rename to docs/development/devtools/installation/images/drools-pdp-eclipse.png diff --git a/docs/development/devtools/images/drools-pdp-intellij.png b/docs/development/devtools/installation/images/drools-pdp-intellij.png similarity index 100% rename from docs/development/devtools/images/drools-pdp-intellij.png rename to docs/development/devtools/installation/images/drools-pdp-intellij.png diff --git a/docs/development/devtools/images/http-ppnt-intellij.png b/docs/development/devtools/installation/images/http-ppnt-intellij.png similarity index 100% rename from docs/development/devtools/images/http-ppnt-intellij.png rename to docs/development/devtools/installation/images/http-ppnt-intellij.png diff --git a/docs/development/devtools/images/k8s-ppnt-intellij.png b/docs/development/devtools/installation/images/k8s-ppnt-intellij.png similarity index 100% rename from docs/development/devtools/images/k8s-ppnt-intellij.png rename to docs/development/devtools/installation/images/k8s-ppnt-intellij.png diff --git a/docs/development/devtools/images/kserve-ppnt-intellij.png b/docs/development/devtools/installation/images/kserve-ppnt-intellij.png similarity index 100% rename from docs/development/devtools/images/kserve-ppnt-intellij.png rename to docs/development/devtools/installation/images/kserve-ppnt-intellij.png diff --git a/docs/development/devtools/images/policy-api-eclipse.png b/docs/development/devtools/installation/images/policy-api-eclipse.png similarity index 100% rename from docs/development/devtools/images/policy-api-eclipse.png rename to docs/development/devtools/installation/images/policy-api-eclipse.png diff --git a/docs/development/devtools/images/policy-api-intellij.png b/docs/development/devtools/installation/images/policy-api-intellij.png similarity index 100% rename from docs/development/devtools/images/policy-api-intellij.png rename to docs/development/devtools/installation/images/policy-api-intellij.png diff --git a/docs/development/devtools/images/policy-pap-eclipse.png b/docs/development/devtools/installation/images/policy-pap-eclipse.png similarity index 100% rename from docs/development/devtools/images/policy-pap-eclipse.png rename to docs/development/devtools/installation/images/policy-pap-eclipse.png diff --git a/docs/development/devtools/images/policy-pap-intellij.png b/docs/development/devtools/installation/images/policy-pap-intellij.png similarity index 100% rename from docs/development/devtools/images/policy-pap-intellij.png rename to docs/development/devtools/installation/images/policy-pap-intellij.png diff --git a/docs/development/devtools/images/policy-ppnt-eclipse.png b/docs/development/devtools/installation/images/policy-ppnt-eclipse.png similarity index 100% rename from docs/development/devtools/images/policy-ppnt-eclipse.png rename to docs/development/devtools/installation/images/policy-ppnt-eclipse.png diff --git a/docs/development/devtools/images/policy-ppnt-intellij.png b/docs/development/devtools/installation/images/policy-ppnt-intellij.png similarity index 100% rename from docs/development/devtools/images/policy-ppnt-intellij.png rename to docs/development/devtools/installation/images/policy-ppnt-intellij.png diff --git a/docs/development/devtools/images/xacml-pdp-eclipse.png b/docs/development/devtools/installation/images/xacml-pdp-eclipse.png similarity index 100% rename from docs/development/devtools/images/xacml-pdp-eclipse.png rename to docs/development/devtools/installation/images/xacml-pdp-eclipse.png diff --git a/docs/development/devtools/images/xacml-pdp-intellij.png b/docs/development/devtools/installation/images/xacml-pdp-intellij.png similarity index 100% rename from docs/development/devtools/images/xacml-pdp-intellij.png rename to docs/development/devtools/installation/images/xacml-pdp-intellij.png diff --git a/docs/development/devtools/local-installation.rst b/docs/development/devtools/installation/local-installation.rst similarity index 69% rename from docs/development/devtools/local-installation.rst rename to docs/development/devtools/installation/local-installation.rst index 76520143..861d4650 100644 --- a/docs/development/devtools/local-installation.rst +++ b/docs/development/devtools/installation/local-installation.rst @@ -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 index 00000000..360c5b28 --- /dev/null +++ b/docs/development/devtools/installation/microk8s-installation.rst @@ -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.