summaryrefslogtreecommitdiffstats
path: root/docker-compose
diff options
context:
space:
mode:
authorToineSiebelink <toine.siebelink@est.tech>2024-10-01 18:40:39 +0100
committerToineSiebelink <toine.siebelink@est.tech>2024-10-03 13:29:16 +0100
commit77e469b27708d2fabe6281082716a8c086f8107d (patch)
tree1780ac8f935ea4c2d0b9c283088fefaffe91d50e /docker-compose
parent89bfabfda2afeeedd1e6cdcba41705469d406f48 (diff)
Policy Executor: handle errors, part 2
(fighting between IntelliJ and Checkstyle best practices) - non-2xx responses are processed using web client exceptions - handle unknown host exception - upgraded spotbugs (checkstyle and related mvn plugin) - fixed some small spotbugs due to upgrade - added commented instructions in docker compose to enable debugging - added some environment variables for policy executor configuration - extract out Sleeper in stub service to achieve 100% coverage - added cause to Policy Executor exceptions where applicable - ignored (new) spotbug rule about catch NPE because of issue in 3pp - ignored (new) spotbug rule about \n in string due to multiline string block Issue-ID: CPS-2412 Change-Id: I6835a73320c436cbeea12cc7a06f15899eec7bf1 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Diffstat (limited to 'docker-compose')
-rw-r--r--docker-compose/config/nginx/nginx.conf1
-rw-r--r--docker-compose/docker-compose.yml8
2 files changed, 9 insertions, 0 deletions
diff --git a/docker-compose/config/nginx/nginx.conf b/docker-compose/config/nginx/nginx.conf
index 61fed515c3..7d6b997f77 100644
--- a/docker-compose/config/nginx/nginx.conf
+++ b/docker-compose/config/nginx/nginx.conf
@@ -22,6 +22,7 @@ http {
upstream cps-and-ncmp {
least_conn;
server docker-compose-cps-and-ncmp-1:8080;
+ ### DEBUG: Disable next line for easier debugging on 1 instance (see also docker-compose.yml)
server docker-compose-cps-and-ncmp-2:8080;
}
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
index 1e47d47382..fd1df38147 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -23,6 +23,7 @@ services:
### docker-compose --profile dmi-stub --profile tracing up -d -> run CPS with stubbed dmi-plugin (for open telemetry tracing testing make ONAP_TRACING_ENABLED "true" later "http://localhost:16686" can be accessed from browser)
### docker-compose --profile dmi-stub --profile policy-executor-stub up -d -> run CPS with stubbed dmi-plugin and policy executor stub (for policy executor service testing make POLICY_SERVICE_ENABLED "true")
### to disable notifications make notification.enabled to false & comment out kafka/zookeeper services ###
+ ### DEBUG: Look for '### DEBUG' comments to enable CPS-NCMP debugging
dbpostgresql:
container_name: dbpostgresql
@@ -60,10 +61,14 @@ services:
ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT: http://jaeger-service:14250
ONAP_OTEL_EXPORTER_ENDPOINT: http://jaeger-service:4317
POLICY_SERVICE_ENABLED: 'false'
+ POLICY_SERVICE_DEFAULT_DECISION: 'deny from env'
+ ### DEBUG: Uncomment next line to enable java debugging
+ ### DEBUG: JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
restart: unless-stopped
depends_on:
- dbpostgresql
deploy:
+ ### DEBUG: For easier debugging use just 1 instance (also update docker-compose/config/nginx/nginx.conf !)
replicas: 2
resources:
reservations:
@@ -72,6 +77,9 @@ services:
limits:
cpus: '3'
memory: 3G
+ ### DEBUG: Uncomment next 2 lines to enable java debugging (ensure 'ports' aligns with 'deploy')
+ ### DEBUG ports:
+ ### DEBUG - ${CPS_CORE_DEBUG_PORT:-5005}:5005
nginx:
container_name: nginx-loadbalancer