aboutsummaryrefslogtreecommitdiffstats
path: root/compose/README.md
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-03-16 16:31:11 +0000
committeradheli.tavares <adheli.tavares@est.tech>2023-03-31 10:01:43 +0100
commit5980fb4d758c2ee55fad90661d039920dcc0ebe6 (patch)
treee208f346bd7b25a62c8beaa4bad3e114562f6f81 /compose/README.md
parente4ff7e58336dfb4fa6699e0a37dbbb298a129ada (diff)
Improvements to scripts and test configuration
- reduced csit image for k8s test from 1gb to 230mb - fixed some small hindrances with start-compose.sh - added README for how to use and configure compose script - cleaning of Chart.lock as it fails helm install if outdated even after running helm dependencies update Issue-ID: POLICY-4125 Change-Id: If1711523bb836c212f27a032a46cc18d68766478 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'compose/README.md')
-rw-r--r--compose/README.md100
1 files changed, 100 insertions, 0 deletions
diff --git a/compose/README.md b/compose/README.md
new file mode 100644
index 00000000..ada34e1c
--- /dev/null
+++ b/compose/README.md
@@ -0,0 +1,100 @@
+# Policy Framework Docker Compose
+
+The PF docker compose starts a small instance of docker containers for PF components.
+
+## Features
+
+- Starts all components, including Prometheus/Grafana dashboard and GUI (ACM and Apex)
+- Can start specific components
+- Expose fixed ports so all the REST endpoints can be called with localhost:component_port
+
+## Tech
+
+Things to be installed beforehand:
+
+- Linux VM if using Windows
+- Docker
+- Docker compose
+- Any editor
+
+## Installation
+
+Assuming the docker repository has been cloned and workdir is ../docker/compose
+
+- Install all PF components (excluding GUI)
+```sh
+./start-compose.sh
+```
+
+- Install all PF components + GUI
+
+```sh
+./start-compose.sh --gui
+```
+
+- Install an specific PF component
+(accepted options: api pap apex-pdp distribution drools-pdp drools-apps xacml-pdp
+policy-clamp-runtime-acm)
+
+
+```sh
+./start-compose.sh component
+
+# that will start apex-pdp and its dependencies (pap, api, db, simulator)
+./start-compose.sh apex-pdp
+```
+
+- Install an specific PF component with Grafana dashboard
+(accepted options: api pap apex-pdp distribution drools-pdp drools-apps xacml-pdp
+policy-clamp-runtime-acm)
+
+
+```sh
+./start-compose.sh component --grafana
+
+# that will start apex-pdp and its dependencies (pap, api, db, simulator) + grafana and prometheus server
+./start-compose.sh apex-pdp --grafana
+```
+
+## Docker image localization
+
+The docker images are always downloaded from nexus repository, but if needed to build a local
+image, edit the ``export-ports.sh`` script and change the variable ``CONTAINER_LOCATION``
+to be empty.
+
+
+## Docker image versions
+
+The start-compose script is always looking for the latest SNAPSHOT version available (will
+look locally first, then download from nexus if not available).
+Note: if latest Policy-API docker image is 2.8-SNAPSHOT-latest, but on nexus it was released
+2 days ago and in local environment it's 3 months old - it will use the 3 months old image,
+so it's recommended to keep an eye on it.
+
+If needed, the version can be edited on docker-compose.yml and docker-compose.gui.yml
+
+i.e: need to change db-migrator version
+from docker-compose.yml:
+``image: ${CONTAINER_LOCATION}onap/policy-db-migrator:${POLICY_DOCKER_VERSION}``
+
+replace the ${POLICY_DOCKER_VERSION} for the specific version needed
+
+
+## Logs
+
+To collect the docker-compose logs, simply run the following:
+
+```sh
+./start-compose.sh logs
+```
+Note: these are logs for installation only, not actual application usage
+
+It will generate a ``docker-compose.log`` file with the result.
+
+## Uninstall
+
+Simply run the ``stop-compose.sh`` script.
+
+```sh
+./stop-compose.sh
+```