From bf35ec5f9707280c457eac763b4c29653ec52791 Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Fri, 22 Apr 2022 13:19:55 +0100 Subject: Document changes for PAP spring boot migration Change-Id: I0f551169c43fd01cad537dcddebf379e8dd173e8 Issue-ID: POLICY-3861 Signed-off-by: a.sreekumar --- docs/development/devtools/devtools.rst | 14 ++++++++++++++ docs/pap/pap.rst | 9 ++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/development/devtools/devtools.rst b/docs/development/devtools/devtools.rst index 9012caf8..5b75d328 100644 --- a/docs/development/devtools/devtools.rst +++ b/docs/development/devtools/devtools.rst @@ -265,6 +265,20 @@ An example of running the api using a docker compose script is located in the Po `Policy CSIT API Docker Compose `_ +Running the PAP component standalone ++++++++++++++++++++++++++++++++++++++ + +Once you have successfully built the PAP codebase, a running MariaDb database and DMaaP instance will also be required to start up the application. +For MariaDb instance, the easiest way is to run the docker image, please see the mariadb documentation for the latest +information on doing so. For DMaaP, the easiest way during development is to run the DMaaP simulator which is explained in the below sections. +Once the mariadb and DMaaP are running, a configuration file must be provided to the PAP component in order for it to know how to +connect to the mariadb and DMaaP along with other relevant configuration details. You can locate the default configuration file in the packaging of the PAP component: + +`Default PAP Configuration `_ + +Update the fields related to MariaDB, DMaaP and the RestServer for the application as per your local environment settings. +Then to start the application, just run the Spring Boot application using IDE or command line. + Running the Smoke Tests *********************** diff --git a/docs/pap/pap.rst b/docs/pap/pap.rst index 074947bd..1af62617 100644 --- a/docs/pap/pap.rst +++ b/docs/pap/pap.rst @@ -387,14 +387,17 @@ Here is a sample response: 3 Configuration ================= +The *PolicyAdministration* component (PAP) is initialized using a configuration file: `papParameters.yaml +`_ + +The configuration file is a YAML file containing the relevant fields for configuring the REST server, Database and DMaaP connectivity and so on. + 3.1 Disable collection of PDP Statistics ======================================== This configuration is to inform PAP to not save the PDP statistics in the database. -In `config.json -`_, -add or change the property savePdpStatisticsInDb to false. +In *papParameters.yaml*, add or change the property savePdpStatisticsInDb to false. .. note:: By default, if the property is not present, it will be considered as false and -- cgit 1.2.3-korg