+++ /dev/null
-#
-# ===========LICENSE_START====================================================
-# Copyright (C) 2024-2026 OpenInfra Foundation Europe. All rights reserved.
-# ============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=====================================================
-#
-
-include:
- - compose.yaml
-
-services:
- policy-clamp-runtime-acm-replica:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-runtime-acm:${POLICY_CLAMP_VERSION}
- hostname: policy-clamp-runtime-acm
- depends_on:
- - policy-db-migrator
- - apex-pdp
- - kafka
- - jaeger
- - policy-clamp-ac-pf-ppnt
- - policy-clamp-ac-sim-ppnt-1
- - policy-clamp-ac-sim-ppnt-2
- - policy-clamp-ac-sim-ppnt-3
- expose:
- - 6969
- deploy:
- mode: replicated
- replicas: ${REPLICAS:-2}
- restart:
- on-failure:3
- environment:
- RUNTIME_USER: runtimeUser
- RUNTIME_PASSWORD: zb!XztG34
- TIMEZONE: UTC
- SQL_HOST: postgres
- SQL_PORT: 5432
- SQL_USER: policy_user
- SQL_PASSWORD: policy_user
- TOPIC_COMM_INFRASTRUCTURE: kafka
- ALLOW_TRACING: true
- PROMETHEUS_PORT: 6969
- OTEL_SERVICE_NAME: acm-r
- OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
- JAVA_TOOL_OPTIONS: >-
- -Dcom.sun.management.jmxremote.rmi.port=9090
- -Dcom.sun.management.jmxremote=true
- -Dcom.sun.management.jmxremote.port=9090
- -Dcom.sun.management.jmxremote.ssl=false
- -Dcom.sun.management.jmxremote.authenticate=false
- -Dcom.sun.management.jmxremote.local.only=false
- healthcheck:
- test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1"
- interval: 30s
- timeout: 10s
- retries: 5
- start_period: 60s
-
- policy-clamp-ac-http-ppnt-replica:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- hostname: policy-clamp-ac-http-ppnt
- depends_on:
- - kafka
- - jaeger
- expose:
- - 6969
- deploy:
- mode: replicated
- replicas: ${REPLICAS:-2}
- environment:
- HTTP_USER: participantUser
- HTTP_PASSWORD: zb!XztG34
- topicCommInfrastructure: kafka
- allowTracing: true
- OTEL_SERVICE_NAME: http-ppnt
- OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
- SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
- healthcheck:
- test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/httpparticipant/health/readiness | grep UP || exit 1"
- interval: 30s
- timeout: 10s
- retries: 5
- start_period: 60s
-
- policy-clamp-ac-k8s-ppnt-replica:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- hostname: policy-clamp-ac-k8s-ppnt
- depends_on:
- - kafka
- - jaeger
- environment:
- HTTP_USER: participantUser
- HTTP_PASSWORD: zb!XztG34
- topicCommInfrastructure: kafka
- allowTracing: true
- OTEL_SERVICE_NAME: k8s-ppnt
- OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
- SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
- expose:
- - 6969
- deploy:
- mode: replicated
- replicas: ${REPLICAS:-2}
- healthcheck:
- test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/k8sparticipant/health/readiness | grep UP || exit 1"
- interval: 30s
- timeout: 10s
- retries: 5
- start_period: 20s
-
- policy-clamp-ac-pf-ppnt-replica:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- hostname: policy-clamp-ac-pf-ppnt
- depends_on:
- - kafka
- - jaeger
- expose:
- - 6969
- deploy:
- mode: replicated
- replicas: ${REPLICAS:-2}
- environment:
- API_USER: policyadmin
- API_PASSWORD: zb!XztG34
- PAP_USER: policyadmin
- PAP_PASSWORD: zb!XztG34
- HTTP_USER: participantUser
- HTTP_PASSWORD: zb!XztG34
- topicCommInfrastructure: kafka
- allowTracing: true
- OTEL_SERVICE_NAME: policy-ppnt
- OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
- SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
- healthcheck:
- test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/policyparticipant/health/readiness | grep UP || exit 1"
- interval: 30s
- timeout: 10s
- retries: 5
- start_period: 30s
-
- nginx:
- image: ${CONTAINER_LOCATION}library/nginx:latest
- volumes:
- - ./config/nginx/nginx-acm.conf:/etc/nginx/nginx.conf:ro
- depends_on:
- - policy-clamp-runtime-acm-replica
- ports:
- - ${ACM_PORT}:${ACM_PORT}
services:
- simulator:
+ policy-models-simulator:
image: ${CONTAINER_LOCATION}onap/policy-models-simulator:${POLICY_MODELS_VERSION}
- container_name: simulator
- hostname: simulator
+ container_name: policy-models-simulator
+ hostname: policy-models-simulator
networks:
default:
aliases:
ports:
- ${SIMULATOR_PORT}:6666
- policy-clamp-ac-sim-ppnt-1:
+ x-policy-clamp-ac-sim-ppnt-template: &policy-clamp-ac-sim-ppnt-template
image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- container_name: policy-clamp-ac-sim-ppnt-1
- hostname: policy-clamp-ac-sim-ppnt-1
depends_on:
- kafka
- jaeger
- environment:
+ environment: &policy-clamp-ac-sim-ppnt-env
HTTP_USER: participantUser
HTTP_PASSWORD: zb!XztG34
topicCommInfrastructure: kafka
allowTracing: true
- OTEL_SERVICE_NAME: sim-ppnt-1
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+ OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
+
+ policy-clamp-ac-sim-ppnt-1:
+ <<: *policy-clamp-ac-sim-ppnt-template
+ container_name: policy-clamp-ac-sim-ppnt-1
+ hostname: policy-clamp-ac-sim-ppnt-1
+ environment:
+ <<: *policy-clamp-ac-sim-ppnt-env
+ OTEL_SERVICE_NAME: sim-ppnt-1
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
applicationName: sim-ppnt-1
groupId: policy-clamp-ac-sim-ppnt-1
supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
ports:
- ${SIM_PARTICIPANT1_PORT}:6969
policy-clamp-ac-sim-ppnt-2:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+ <<: *policy-clamp-ac-sim-ppnt-template
container_name: policy-clamp-ac-sim-ppnt-2
hostname: policy-clamp-ac-sim-ppnt-2
- depends_on:
- - kafka
- - jaeger
environment:
- HTTP_USER: participantUser
- HTTP_PASSWORD: zb!XztG34
- topicCommInfrastructure: kafka
- allowTracing: true
+ <<: *policy-clamp-ac-sim-ppnt-env
OTEL_SERVICE_NAME: sim-ppnt-2
- OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
- SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c91
applicationName: sim-ppnt-2
groupId: policy-clamp-ac-sim-ppnt-2
supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement2
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
ports:
- ${SIM_PARTICIPANT2_PORT}:6969
policy-clamp-ac-sim-ppnt-3:
- image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-sim-ppnt:${POLICY_CLAMP_PPNT_VERSION}
+ <<: *policy-clamp-ac-sim-ppnt-template
container_name: policy-clamp-ac-sim-ppnt-3
hostname: policy-clamp-ac-sim-ppnt-3
- depends_on:
- - kafka
- - jaeger
environment:
- HTTP_USER: participantUser
- HTTP_PASSWORD: zb!XztG34
- topicCommInfrastructure: kafka
- allowTracing: true
+ <<: *policy-clamp-ac-sim-ppnt-env
OTEL_SERVICE_NAME: sim-ppnt-3
- OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
- OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
- SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c92
applicationName: sim-ppnt-3
groupId: policy-clamp-ac-sim-ppnt-3
supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement3
- OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
ports:
- ${SIM_PARTICIPANT3_PORT}:6969
jaeger:
image: nexus3.onap.org:10001/jaegertracing/all-in-one:1.58
container_name: jaeger
+ hostname: jaeger
ports:
- "4318:4318"
- "4317:4317"
+++ /dev/null
-#
-# ===========LICENSE_START====================================================
-# Copyright (C) 2023-2024 Nordix Foundation.
-# ============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
-#
-
-include:
- - compose.common.yml
- - compose.postgres.yml
-
-services:
- api:
- image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- hostname: policy-api
- depends_on:
- - policy-db-migrator
- ports:
- - ${API_PORT}:6969
- volumes:
- - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
- - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro
- - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
- entrypoint: ./wait_for_port.sh
- command: [
- '-c', './policy-api.sh',
- 'policy-db-migrator', '6824'
- ]
-
- pap:
- image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- hostname: policy-pap
- depends_on:
- - api
- - kafka
- ports:
- - ${PAP_PORT}:6969
- volumes:
- - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
- - ./config/apex-pdp/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
- - ./config/pap/logback.xml:/opt/app/policy/pap/etc/logback.xml:ro
- - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
- entrypoint: ./wait_for_port.sh
- command: [
- '-c', './policy-pap.sh',
- 'api', '6969',
- 'kafka', '9092'
- ]
-
- apexpdp:
- image: ${CONTAINER_LOCATION}onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
- hostname: policy-apex-pdp
- depends_on:
- - simulator
- - kafka
- - pap
- expose:
- - 6969
- - 23324
- deploy:
- mode: replicated
- replicas: ${REPLICAS:-2}
- volumes:
- - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
- - ./config/apex-pdp/logback.xml:/opt/app/policy/apex-pdp/etc/logback.xml:ro
- - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
- entrypoint: /opt/app/policy/bin/wait_for_port.sh
- command: [
- '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
- 'kafka', '9092',
- 'pap', '6969'
- ]
- nginx:
- image: ${CONTAINER_LOCATION}library/nginx:latest
- volumes:
- - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- depends_on:
- - apexpdp
- ports:
- - ${APEX_PORT}:${APEX_PORT}
- - ${APEX_EVENTS_PORT}:${APEX_EVENTS_PORT}
env_file: config/db-pg/db-pg.conf
environment:
POSTGRES_PASSWORD: policy_user
- SQL_DB: ${SCHEMAS_TO_BE_CREATED}
+ SQL_DB: policyadmin operationshistory pooling
SQL_HOST: postgres
volumes:
- ./config/db-migrator/init_pg.sh:/opt/app/policy/bin/db_migrator_policy_init_pg.sh:ro
include:
- compose.common.yml
- - compose.${database:-postgres}.yml
+ - compose.postgres.yml
services:
- api:
+ policy-api:
image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
container_name: policy-api
hostname: policy-api
- ${API_PORT}:6969
environment:
JAVA_TOOL_OPTIONS: >-
- -Dlogging.config="/opt/app/policy/api/etc/logback.xml"
+ -Dlogging.config=/opt/app/policy/api/etc/logback.xml
SPRING_PROFILES_ACTIVE: ${API_PROFILE:-default}
SPRING_CONFIG_LOCATION: /opt/app/policy/api/etc/apiParameters.yaml
volumes:
'policy-db-migrator', '6824'
]
- pap:
+ policy-pap:
image: ${CONTAINER_LOCATION}onap/policy-pap:${POLICY_PAP_VERSION}
container_name: policy-pap
hostname: policy-pap
depends_on:
- - api
+ - policy-api
- kafka
ports:
- ${PAP_PORT}:6969
environment:
JAVA_TOOL_OPTIONS: >-
- -Dlogging.config="/opt/app/policy/pap/etc/logback.xml"
+ -Dlogging.config=/opt/app/policy/pap/etc/logback.xml
SPRING_PROFILES_ACTIVE: ${PAP_PROFILE:-default}
SPRING_CONFIG_LOCATION: /opt/app/policy/pap/etc/papParameters.yaml
volumes:
entrypoint: ./wait_for_port.sh
command: [
'-c', 'java -jar /app/pap.jar --group-config-file=/opt/app/policy/pap/etc/mounted/groups.json',
- 'api', '6969',
+ 'policy-api', '6969',
'kafka', '9092'
]
- apex-pdp:
+ policy-apex-pdp:
image: ${CONTAINER_LOCATION}onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
container_name: policy-apex-pdp
hostname: policy-apex-pdp
depends_on:
- - simulator
+ - policy-models-simulator
- kafka
- - pap
+ - policy-pap
ports:
- ${APEX_PORT}:6969
- ${APEX_EVENTS_PORT}:23324
command: [
'-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
'kafka', '9092',
- 'pap', '6969'
+ 'policy-pap', '6969'
]
- distribution:
+ policy-distribution:
image: ${CONTAINER_LOCATION}onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION}
container_name: policy-distribution
hostname: policy-distribution
depends_on:
- - apex-pdp
+ - policy-apex-pdp
ports:
- ${DIST_PORT}:6969
volumes:
entrypoint: /opt/app/policy/bin/wait_for_port.sh
command: [
'-c', './policy-dist.sh',
- 'apex-pdp', '6969'
+ 'policy-apex-pdp', '6969'
]
- xacml-pdp:
+ policy-xacml-pdp:
image: ${CONTAINER_LOCATION}onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION}
container_name: policy-xacml-pdp
hostname: policy-xacml-pdp
depends_on:
- - pap
+ - policy-pap
- kafka
ports:
- ${XACML_PORT}:6969
- - "30999:3904"
+ - 30999:3904
volumes:
- ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
- ./config/xacml-pdp/logback.xml:/opt/app/policy/pdpx/etc/logback.xml:ro
- - ./config/xacml-pdp/xacml-${database:-postgres}.properties:/opt/app/policy/pdpx/apps/guard/xacml.properties:ro
+ - ./config/xacml-pdp/xacml-postgres.properties:/opt/app/policy/pdpx/apps/guard/xacml.properties:ro
- ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro
entrypoint: ./wait_for_port.sh
command: [
'-c', './policy-pdpx.sh',
- 'pap', '6969',
+ 'policy-pap', '6969',
'kafka', '9092'
]
- opa-pdp:
- image: ${CONTAINER_LOCATION}onap/policy-opa-pdp:${POLICY_OPA_PDP_VERSION}
- container_name: policy-opa-pdp
- depends_on:
- - kafka
- - pap
- hostname: policy-opa-pdp
- volumes:
- - ./config/opa-pdp/config.json:/app/config/config.json:ro
- - ./config/opa-pdp/policy-opa-pdp.sh:/app/policy-opa-pdp.sh:ro
- - ./wait_for_port.sh:/app/wait_for_port.sh
- env_file: "./config/opa-pdp/opa-pdp.env"
- entrypoint: sh wait_for_port.sh
- command: [
- '-c', './policy-opa-pdp.sh',
- 'kafka', '9092',
- 'pap', '6969'
- ]
- ports:
- - ${OPA_PDP_PORT}:8282
+ policy-opa-pdp:
+ image: ${CONTAINER_LOCATION}onap/policy-opa-pdp:${POLICY_OPA_PDP_VERSION}
+ container_name: policy-opa-pdp
+ hostname: policy-opa-pdp
+ depends_on:
+ - kafka
+ - policy-pap
+ ports:
+ - ${OPA_PDP_PORT}:8282
+ volumes:
+ - ./config/opa-pdp/config.json:/app/config/config.json:ro
+ - ./config/opa-pdp/policy-opa-pdp.sh:/app/policy-opa-pdp.sh:ro
+ - ./wait_for_port.sh:/app/wait_for_port.sh:ro
+ env_file:
+ - ./config/opa-pdp/opa-pdp.env
+ entrypoint: ./wait_for_port.sh
+ command: [
+ '-c', './policy-opa-pdp.sh',
+ 'kafka', '9092',
+ 'policy-pap', '6969'
+ ]
- drools-pdp:
+ policy-drools-pdp:
image: ${CONTAINER_LOCATION}onap/policy-drools:${POLICY_DROOLS_PDP_VERSION}
container_name: policy-drools-pdp
hostname: policy-drools-pdp
depends_on:
- - pap
+ - policy-pap
- kafka
ports:
- ${DROOLS_PORT}:6969
- ./config/drools-pdp/custom:/tmp/policy-install/config:ro
- ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
env_file:
- - config/drools-pdp/env/base-${database:-postgres}.conf
+ - config/drools-pdp/env/base-postgres.conf
entrypoint: /opt/app/policy/bin/wait_for_port.sh
command: [
'-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot',
- 'pap', '6969',
+ 'policy-pap', '6969',
'kafka', '9092'
]
- drools-applications:
+ policy-drools-apps:
image: ${CONTAINER_LOCATION}onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION}
container_name: policy-drools-apps
hostname: policy-drools-apps
depends_on:
- - pap
- - xacml-pdp
- - simulator
+ - policy-pap
+ - policy-xacml-pdp
+ - policy-models-simulator
- kafka
ports:
- ${DROOLS_APPS_PORT}:6969
- ./config/drools-applications/custom:/tmp/policy-install/config:ro
- ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
env_file:
- - config/drools-applications/env/base-${database:-postgres}.conf
+ - config/drools-applications/env/base-postgres.conf
- config/drools-applications/env/feature-healthcheck.conf
- config/drools-applications/env/feature-pooling-messages.conf
entrypoint: /opt/app/policy/bin/wait_for_port.sh
command: [
'-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot',
- 'pap', '6969',
+ 'policy-pap', '6969',
'kafka', '9092',
'aai-sim', '6666',
'sdnc-sim', '6668',
policy-clamp-runtime-acm:
image: ${CONTAINER_LOCATION}onap/policy-clamp-runtime-acm:${POLICY_CLAMP_VERSION}
- container_name: policy-clamp-runtime-acm
hostname: policy-clamp-runtime-acm
depends_on:
- - apex-pdp
+ - policy-apex-pdp
- kafka
- jaeger
- policy-clamp-ac-pf-ppnt
- policy-clamp-ac-sim-ppnt-2
- policy-clamp-ac-sim-ppnt-3
ports:
- - ${ACM_PORT}:6969
- restart:
- on-failure:3
+ - ${ACM_PORT}-${ACM_PORT_END}:6969
+ deploy:
+ replicas: ${ACM_REPLICAS:-1}
environment:
RUNTIME_USER: runtimeUser
RUNTIME_PASSWORD: zb!XztG34
policy-clamp-ac-http-ppnt:
image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- container_name: policy-clamp-ac-http-ppnt
hostname: policy-clamp-ac-http-ppnt
depends_on:
- kafka
- jaeger
- ports:
- - "30290:6969"
+ expose:
+ - 6969
+ deploy:
+ replicas: ${ACM_REPLICAS:-1}
environment:
HTTP_USER: participantUser
HTTP_PASSWORD: zb!XztG34
policy-clamp-ac-k8s-ppnt:
image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-k8s-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- container_name: policy-clamp-ac-k8s-ppnt
hostname: policy-clamp-ac-k8s-ppnt
depends_on:
- kafka
- jaeger
+ expose:
+ - 6969
+ deploy:
+ replicas: ${ACM_REPLICAS:-1}
environment:
HTTP_USER: participantUser
HTTP_PASSWORD: zb!XztG34
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
- ports:
- - "30295:6969"
healthcheck:
test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/k8sparticipant/health/readiness | grep UP || exit 1"
interval: 30s
policy-clamp-ac-pf-ppnt:
image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-pf-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- container_name: policy-clamp-ac-pf-ppnt
hostname: policy-clamp-ac-pf-ppnt
depends_on:
- kafka
- - api
+ - policy-api
- jaeger
- ports:
- - ${POLICY_PARTICIPANT_PORT}:6969
+ expose:
+ - 6969
+ deploy:
+ replicas: ${ACM_REPLICAS:-1}
environment:
API_USER: policyadmin
API_PASSWORD: zb!XztG34
policy-clamp-ac-a1pms-ppnt:
image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- container_name: policy-clamp-ac-a1pms-ppnt
hostname: policy-clamp-ac-a1pms-ppnt
depends_on:
- kafka
- jaeger
+ expose:
+ - 6969
+ deploy:
+ replicas: ${ACM_REPLICAS:-1}
environment:
HTTP_USER: participantUser
HTTP_PASSWORD: zb!XztG34
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
- ports:
- - "30296:6969"
healthcheck:
test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/a1pmsparticipant/health/readiness | grep UP || exit 1"
interval: 30s
policy-clamp-ac-kserve-ppnt:
image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-kserve-ppnt:${POLICY_CLAMP_PPNT_VERSION}
- container_name: policy-clamp-ac-kserve-ppnt
hostname: policy-clamp-ac-kserve-ppnt
depends_on:
- kafka
- jaeger
+ expose:
+ - 6969
+ deploy:
+ replicas: ${ACM_REPLICAS:-1}
environment:
HTTP_USER: participantUser
HTTP_PASSWORD: zb!XztG34
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true
- ports:
- - "30297:6969"
healthcheck:
test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/kserveparticipant/health/readiness | grep UP || exit 1"
interval: 30s
+++ /dev/null
-user nginx;
-
-events {
- worker_connections 1000;
-}
-
-http {
- upstream runtime {
- server policy-clamp-runtime-acm-replica:6969;
- }
- server {
- listen 30007;
- location / {
- proxy_pass http://runtime;
- }
- }
-}
+++ /dev/null
-user nginx;
-
-events {
- worker_connections 1000;
-}
-
-http {
- upstream pdps {
- server apexpdp:6969;
- server apexpdp:23324;
- }
- server {
- listen 30001;
- location / {
- proxy_pass http://pdps;
- }
- }
-}
export DROOLS_TELEMETRY_PORT=30216
export DIST_PORT=30006
export ACM_PORT=30007
-export POLICY_PARTICIPANT_PORT=30008
+export ACM_PORT_END=30008
export SIM_PARTICIPANT1_PORT=30011
export SIM_PARTICIPANT2_PORT=30013
export SIM_PARTICIPANT3_PORT=30014
metrics_path: "/onap/policy/clamp/acm/actuator/prometheus"
static_configs:
- targets:
- - "compose-policy-clamp-runtime-acm-replica-1:6969"
- - "compose-policy-clamp-runtime-acm-replica-2:6969"
+ - "compose-policy-clamp-runtime-acm-1:6969"
+ - "compose-policy-clamp-runtime-acm-2:6969"
basic_auth:
username: "runtimeUser"
password: "zb!XztG34"
+++ /dev/null
-#!/bin/bash
-#
-# ============LICENSE_START====================================================
-# Copyright (C) 2025 OpenInfra Foundation Europe.
-# =============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-
-# Usage: --start to run the docker compose with acm replicas
-# --stop to stop the docker compose containers
-# --replicas number of replicas (defaults to 2)
-
-# Initialize variables
-START=false
-REPLICAS=2
-
-# Parse arguments
-while [[ "$#" -gt 0 ]]; do
- case $1 in
- --start)
- START=true
- shift
- ;;
- --stop)
- START=false
- shift
- ;;
- --replicas=*)
- REPLICAS="${1#*=}"
- shift
- ;;
- --grafana)
- grafana=true
- shift
- ;;
- *)
- echo "Unknown option: $1"
- exit 1
- ;;
- esac
-done
-
-if [ -z "${WORKSPACE}" ]; then
- WORKSPACE=$(git rev-parse --show-toplevel)
- export WORKSPACE
-fi
-
-COMPOSE_FOLDER="${WORKSPACE}"/compose
-
-cd ${COMPOSE_FOLDER}
-
-echo "Configuring docker compose..."
-source export-ports.sh > /dev/null 2>&1
-source get-versions.sh > /dev/null 2>&1
-
-export REPLICAS
-
-if [ -z "$PROJECT" ]; then
- export PROJECT=clamp
-fi
-
-export database=postgres
-
-
-if [ "$START" = true ]; then
- if [ "$grafana" = true ]; then
- echo "Starting policy-clamp-runtime-acm using ${database} + Grafana/Prometheus"
- docker compose -f compose.acm.scale.yml up -d nginx grafana --remove-orphans
- echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}"
- echo "Grafana server: http://localhost:${GRAFANA_PORT}"
- else
- docker compose -f compose.acm.scale.yml up -d nginx
- fi
-else
- containers=$(docker compose -f compose.acm.scale.yml ps --all --format '{{.Service}}')
-
- IFS=$'\n' read -d '' -r -a item_list <<< "$containers"
- for item in "${item_list[@]}"
- do
- if [ -n "$item" ]; then
- docker compose -f compose.acm.scale.yml logs $item >> $item.log
- fi
- done
-
- docker compose -f compose.acm.scale.yml down -v --remove-orphans
-fi
-
-cd ${WORKSPACE}
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END======================================================
-#Usage: $0 [policy-component] [OPTIONS]"
-#" OPTIONS:"
-#" --grafana start the docker compose with grafana"
-#" --mariadb start the docker compose using mariadb"
-#" --postgres [default] start the docker compose using postgres db"
-#" no policy-component will start all components"
+usage() {
+ cat << EOF
+Usage: $0 [policy-component] [OPTIONS]
+ OPTIONS:
+ --grafana start docker compose with grafana
+ --local use local images instead of pulling from registry
+ --help display this help message
+
+ If no policy-component is specified, all components will be started
+EOF
+}
if [ -z "${WORKSPACE}" ]; then
WORKSPACE=$(git rev-parse --show-toplevel)
# Set default values for the options
grafana=false
-database=postgres
# Parse the command-line arguments
-while [[ $# -gt 0 ]]
-do
- key="$1"
-
- case $key in
+while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --help|-h)
+ usage
+ exit 0
+ ;;
--grafana)
grafana=true
shift
;;
- --mariadb)
- database=mariadb
- shift
- ;;
- --postgres)
- database=postgres
- shift
- ;;
--local)
export USE_LOCAL_IMAGES=true
shift
esac
done
-cd ${COMPOSE_FOLDER}
+cd "${COMPOSE_FOLDER}"
echo "Configuring docker compose..."
source export-ports.sh > /dev/null 2>&1
export PROJECT=$component
fi
-export database
-
if [ -n "$component" ]; then
if [ "$grafana" = true ]; then
- echo "Starting ${component} using ${database} + Grafana/Prometheus"
- docker compose up -d ${component} ${database} grafana
-
+ docker compose up -d "${component}" postgres grafana
echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}"
echo "Grafana server: http://localhost:${GRAFANA_PORT}"
-
else
- echo "Starting ${component} using ${database}"
- docker compose up -d ${component} ${database}
+ docker compose up -d "${component}" postgres
fi
else
- export PROJECT=api # api has groups.json complete with all 3 pdps
- echo "Starting all components using ${database}"
+ export PROJECT=policy-api # policy-api has groups.json complete with all 3 pdps
docker compose up -d
fi
-cd ${WORKSPACE}
+cd "${WORKSPACE}"
+++ /dev/null
-#!/bin/bash
-#
-# ============LICENSE_START====================================================
-# Copyright (C) 2023-2024 Nordix Foundation.
-# =============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-
-# Usage: --start to run the docker compose with apex-pdp replicas
-# --stop to stop the docker compose containers
-# --replicas number of replicas (defaults to 2)
-
-# Initialize variables
-START=false
-REPLICAS=2
-
-# Parse arguments
-while [[ "$#" -gt 0 ]]; do
- case $1 in
- --start)
- START=true
- shift
- ;;
- --stop)
- START=false
- shift
- ;;
- --replicas=*)
- REPLICAS="${1#*=}"
- shift
- ;;
- *)
- echo "Unknown option: $1"
- exit 1
- ;;
- esac
-done
-
-if [ -z "${WORKSPACE}" ]; then
- WORKSPACE=$(git rev-parse --show-toplevel)
- export WORKSPACE
-fi
-
-COMPOSE_FOLDER="${WORKSPACE}"/compose
-
-cd ${COMPOSE_FOLDER}
-
-source export-ports.sh > /dev/null 2>&1
-source get-versions.sh > /dev/null 2>&1
-
-export REPLICAS
-
-export database=postgres
-
-if [ "$START" = true ]; then
- echo "Configuring docker compose for apex-pdp scaled with ${REPLICAS} replicas..."
- docker compose -f compose.pdp.scale.yml up -d apexpdp nginx grafana postgres
-else
- echo "Collecting logs..."
- containers=$(docker compose -f compose.pdp.scale.yml ps --all --format '{{.Service}}')
-
- IFS=$'\n' read -d '' -r -a item_list <<< "$containers"
- for item in "${item_list[@]}"
- do
- if [ -n "$item" ]; then
- docker compose -f compose.pdp.scale.yml logs $item >> $item.log
- fi
- done
-
- echo "Stopping compose containers..."
- docker compose -f compose.pdp.scale.yml down -v --remove-orphans
-fi
-
-cd ${WORKSPACE}
export WORKSPACE
fi
-database=postgres
-
-while [[ $# -gt 0 ]]
-do
- key="$1"
-
- case $key in
- --mariadb)
- database=mariadb
- shift
- ;;
- --postgres)
- database=postgres
- shift
- ;;
- *)
- component="$1"
- shift
- ;;
- esac
-done
-
-if [ -z "$component" ]; then
- export component=api
-fi
-
COMPOSE_FOLDER="${WORKSPACE}"/compose
cd ${COMPOSE_FOLDER}
do
if [ -n "$item" ]; then
docker compose logs $item >> $item.log
- if [ "${DONT_PRINT_LOGS}" == "false" ]; then
- cat $item.log
- fi
fi
done
CreateNodeTemplate /policy/api/v1/nodetemplates 201 ${postjson} 1
DeployPolicy
Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
+ Sleep 5 seconds
GetKafkaTopic apex-cl-mgt2
TriggerAndVerifyTestPnfPolicy apex-cl-mgt2
+++ /dev/null
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library DateTime
-Library Process
-Library json
-Resource common-library.robot
-Resource apex-pdp-common.robot
-
-*** Test Cases ***
-Healthcheck
- [Documentation] Runs Apex PDP Health check
- ${hcauth}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${APEX_IP} /policy/apex-pdp/v1/healthcheck 200 null ${hcauth}
- Should Be Equal As Strings ${resp.json()['code']} 200
- Set Suite Variable ${pdpName} ${resp.json()['name']}
-
-ValidatePolicyExecutionAndEventRateLowComplexity
- [Documentation] Validate that a moderate complexity policity can be executed in less than 100ms and minimum 100 events triggered per second
- Set Test Variable ${policyName} onap.policies.apex.pnf.metadataSet.Test
- ${postjson}= Get File ${CURDIR}/data/${policyName}.json
- CreatePolicySuccessfully /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies ${postjson} ${policyName} 1.0.0
- ${postjson}= Get File ${CURDIR}/data/onap.pnf.metadataSet.Test.json
- CreateNodeTemplate /policy/api/v1/nodetemplates 201 ${postjson} 1
- DeployPolicy
- Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
- GetKafkaTopic apex-cl-mgt2
- ${data}= Get Binary File ${CURDIR}/data/VesEventForVnfPolicy.json
- ${eventStartTime}= Get Current Date
- ${resp}= Run Process ${CURDIR}/kafka_producer.py unauthenticated.dcae_policy_example_output ${data} ${KAFKA_IP}
- ${eventEndTime}= Get Current Date
- ValidateEventExecution ${eventStartTime} ${eventEndTime} 100
-
-ValidatePolicyExecutionAndEventRateHighComplexity
- [Documentation] Validate that a high complexity policity can be executed in less than 5000ms and minimum 2 events triggered per second
- Set Test Variable ${policyName} onap.policies.native.apex.Sampledomain
- ${postjson}= Get File ${CURDIR}/data/${policyName}.json
- CreatePolicySuccessfully /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies ${postjson} ${policyName} 1.0.0
- DeployPolicy
- Create Session apexSession http://${APEX_EVENTS_IP} max_retries=1
- ${data}= Get Binary File ${CURDIR}/data/event.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- Sleep 60s
- ${eventStartTime}= Get Current Date
- ${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers}
- ${eventEndTime}= Get Current Date
- Should Be Equal As Strings ${resp.status_code} 200
- ValidateEventExecution ${eventStartTime} ${eventEndTime} 2
-
-ValidatePolicyExecutionAndEventRateModerateComplexity
- [Documentation] Validate that a low complexity policity can be executed in less than 1000ms and minimum 10 events triggered per second
- Set Test Variable ${policyName} onap.policies.apex.pnf.Test
- ${postjson}= Get File ${CURDIR}/data/${policyName}.json
- CreatePolicySuccessfully /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies ${postjson} ${policyName} 1.0.0
- DeployPolicy
- Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
- GetKafkaTopic apex-cl-mgt
- ${data}= Get Binary File ${CURDIR}/data/VesEventForPnfPolicy.json
- ${eventStartTime}= Get Current Date
- ${resp}= Run Process ${CURDIR}/kafka_producer.py unauthenticated.dcae_cl_output ${data} ${KAFKA_IP}
- ${eventEndTime}= Get Current Date
- ValidateEventExecution ${eventStartTime} ${eventEndTime} 10
-
-WaitForPrometheusServer
- [Documentation] Sleep time to wait for Prometheus server to gather all metrics
- Sleep 5 seconds
-
-ValidatePolicyExecutionTimes
- [Documentation] Validate policy execution times using prometheus metrics
- ValidatePolicyExecution pdpa_engine_average_execution_time_seconds{engine_instance_id="NSOApexEngine-0:0.0.1", instance="policy-apex-pdp:6969", job="apex-pdp-metrics"} 5000
- ValidatePolicyExecution pdpa_engine_average_execution_time_seconds{engine_instance_id="MyApexEngine-0:0.0.1"} 1000
- ValidatePolicyExecution pdpa_engine_average_execution_time_seconds{engine_instance_id="NSOApexEngine-1:0.0.1", instance="policy-apex-pdp:6969", job="apex-pdp-metrics"} 100
+++ /dev/null
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library DateTime
-Library Process
-Library json
-Resource common-library.robot
-Resource apex-pdp-common.robot
-
-*** Test Cases ***
-Healthcheck
- [Documentation] Runs Apex PDP Health check
- ${hcauth}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${APEX_IP} /policy/apex-pdp/v1/healthcheck 200 null ${hcauth}
- Should Be Equal As Strings ${resp.json()['code']} 200
- Set Suite Variable ${pdpName} ${resp.json()['name']}
-
-ValidatePolicyExecutionAndEventRateLowComplexity
- [Documentation] Validate that a moderate complexity policy can be executed in less than 100ms and minimum 30 events triggered per second
- Set Test Variable ${policyName} onap.policies.apex.pnf.Test
- ${postjson}= Get File ${CURDIR}/data/${policyName}.json
- CreatePolicySuccessfully /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies ${postjson} ${policyName} 1.0.0
- DeployPolicy
- Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
- GetKafkaTopic apex-cl-mgt
- ${data}= Get Binary File ${CURDIR}/data/VesEventForPnfPolicy.json
- ${eventStartTime}= Get Current Date
- ${resp}= Run Process ${CURDIR}/kafka_producer.py unauthenticated.dcae_cl_output ${data} ${KAFKA_IP}
- ${eventEndTime}= Get Current Date
- ValidateEventExecution ${eventStartTime} ${eventEndTime} 30
-
-ValidatePolicyExecutionAndEventRateHighComplexity
- [Documentation] Validate that a high complexity policy can be executed in less than 5000ms and minimum 0.6 events triggered per second
- Set Test Variable ${policyName} onap.policies.apex.pnf.metadataSet.Test
- ${postjson}= Get File ${CURDIR}/data/${policyName}.json
- CreatePolicySuccessfully /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies ${postjson} ${policyName} 1.0.0
- ${postjson}= Get File ${CURDIR}/data/onap.pnf.metadataSet.Test.json
- CreateNodeTemplate /policy/api/v1/nodetemplates 201 ${postjson} 1
- DeployPolicy
- Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
- GetKafkaTopic apex-cl-mgt2
- ${data}= Get Binary File ${CURDIR}/data/VesEventForVnfPolicy.json
- ${eventStartTime}= Get Current Date
- ${resp}= Run Process ${CURDIR}/kafka_producer.py unauthenticated.dcae_policy_example_output ${data} ${KAFKA_IP}
- ${eventEndTime}= Get Current Date
- ValidateEventExecution ${eventStartTime} ${eventEndTime} 0.6
-
-ValidatePolicyExecutionAndEventRateModerateComplexity
- [Documentation] Validate that a low complexity policy can be executed in less than 1000ms and minimum 3 events triggered per second
- Set Test Variable ${policyName} onap.policies.native.apex.Sampledomain
- ${postjson}= Get File ${CURDIR}/data/${policyName}.json
- CreatePolicySuccessfully /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies ${postjson} ${policyName} 1.0.0
- DeployPolicy
- #Wait Until Keyword Succeeds 4 min 5 sec RunEventOnApexEngine
- Create Session apexSession http://${APEX_EVENTS_IP} max_retries=1
- ${data}= Get Binary File ${CURDIR}/data/event.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- Sleep 60s
- ${eventStartTime}= Get Current Date
- ${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
- ${eventEndTime}= Get Current Date
- ValidateEventExecution ${eventStartTime} ${eventEndTime} 3
-
-WaitForPrometheusServer
- [Documentation] Sleep time to wait for Prometheus server to gather all metrics
- Sleep 5 seconds
-
-ValidatePolicyExecutionTimes
- [Documentation] Validate policy execution times using prometheus metrics
- ValidatePolicyExecution pdpa_engine_average_execution_time_seconds{engine_instance_id="NSOApexEngine-0:0.0.1", instance="policy-apex-pdp:6969", job="apex-pdp-metrics"} 5000
- ValidatePolicyExecution pdpa_engine_average_execution_time_seconds{engine_instance_id="MyApexEngine-0:0.0.1"} 1000
- ValidatePolicyExecution pdpa_engine_average_execution_time_seconds{engine_instance_id="NSOApexEngine-1:0.0.1", instance="policy-apex-pdp:6969", job="apex-pdp-metrics"} 100
rm -rf "${CSAR_DIR}"/csar_temp.csar
if [ "${DO_NOT_TEARDOWN}" = false ]; then
- # teardown of compose containers for acm-replicas doesn't work with normal stop-compose script
- if [ "${ACM_REPLICA_TEARDOWN}" = true ]; then
- source "${DOCKER_COMPOSE_DIR}"/start-acm-replica.sh --stop --replicas=2
- elif [ "${APEX_REPLICA_TEARDOWN}" = true ]; then
- source "${DOCKER_COMPOSE_DIR}"/start-multiple-pdp.sh --stop --replicas=2
- else
- source "${DOCKER_COMPOSE_DIR}"/stop-compose.sh "${PROJECT}"
- fi
-
+ source "${DOCKER_COMPOSE_DIR}"/stop-compose.sh "${PROJECT}"
mv "${DOCKER_COMPOSE_DIR}"/*.log "${ROBOT_LOG_DIR}"
fi
fi
}
-function export_clamp_variables() {
+function setup_clamp() {
export ROBOT_FILES="clamp-health-check.robot clamp-db-restore.robot clamp-single-element-test.robot clamp-timeout-test.robot
clamp-migrate-rollback.robot clamp-trace-test.robot clamp-slas.robot"
export TEST_ENV="docker"
export PROJECT="clamp"
- export SCHEMAS_TO_BE_CREATED="policyadmin"
-}
-
-function setup_clamp() {
- export_clamp_variables
- export ACM_REPLICA_TEARDOWN=true
- source "${DOCKER_COMPOSE_DIR}"/start-acm-replica.sh --start --replicas=2 --grafana
- echo "Waiting 2 minutes for the replicas to be started..."
- sleep 120
- # checking on apex-pdp status because acm-r replicas only start after apex-pdp is running
- check_rest_endpoint "${PAP_PORT}"
- check_rest_endpoint "${APEX_PORT}"
- apex_healthcheck
- check_rest_endpoint "${ACM_PORT}"
-}
-
-function setup_clamp_simple() {
- export_clamp_variables
source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-clamp-runtime-acm --grafana
- echo "Waiting 2 minutes acm-runtime and participants to start..."
+ echo "Waiting 2 minutes for the replicas to be started..."
sleep 120
check_rest_endpoint "${ACM_PORT}"
}
function setup_api() {
export ROBOT_FILES="api-test.robot api-slas.robot"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh api --grafana
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-api --grafana
echo "Waiting 1 minute for policy-api to start..."
sleep 60
check_rest_endpoint "${API_PORT}"
function setup_pap() {
export ROBOT_FILES="pap-test.robot pap-slas.robot"
export PROJECT="pap"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh apex-pdp --grafana
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-apex-pdp --grafana
echo "Waiting 1 minute for policy-pap to start..."
sleep 60
check_rest_endpoint "${PAP_PORT}"
function setup_apex() {
export ROBOT_FILES="apex-pdp-test.robot apex-slas.robot"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh apex-pdp --grafana
+ export PROJECT="apex-pdp"
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-apex-pdp --grafana
echo "Waiting 1 minute for apex-pdp to start..."
sleep 60
check_rest_endpoint "${PAP_PORT}"
apex_healthcheck
}
-function setup_apex_medium() {
- export ROBOT_FILES="apex-slas-3.robot"
- export APEX_REPLICA_TEARDOWN=true
- source "${DOCKER_COMPOSE_DIR}"/start-multiple-pdp.sh --start --replicas=3
- echo "Waiting 1 minute for apex-pdp to start..."
- sleep 60
- check_rest_endpoint "${PAP_PORT}"
- check_rest_endpoint "${APEX_PORT}"
- apex_healthcheck
-}
-function setup_apex_large() {
- export ROBOT_FILES="apex-slas-10.robot"
- export APEX_REPLICA_TEARDOWN=true
- source "${DOCKER_COMPOSE_DIR}"/start-multiple-pdp.sh --start --replicas=10
- echo "Waiting 1 minute for apex-pdp to start..."
- sleep 60
- check_rest_endpoint "${PAP_PORT}"
- check_rest_endpoint "${APEX_PORT}"
- apex_healthcheck
-}
function setup_drools_apps() {
export ROBOT_FILES="drools-applications-test.robot drools-applications-slas.robot"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh drools-applications --grafana
+ export PROJECT="drools-applications"
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-drools-apps --grafana
echo "Waiting 1 minute for drools-pdp and drools-applications to start..."
sleep 80
check_rest_endpoint "${PAP_PORT}"
function setup_xacml_pdp() {
export ROBOT_FILES="xacml-pdp-test.robot xacml-pdp-slas.robot"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh xacml-pdp --grafana
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-xacml-pdp --grafana
echo "Waiting 1 minute for xacml-pdp to start..."
sleep 60
check_rest_endpoint "${XACML_PORT}"
function setup_opa_pdp() {
export ROBOT_FILES="opa-pdp-test.robot opa-pdp-slas.robot"
export PROJECT="opa-pdp"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh opa-pdp --grafana
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-opa-pdp --grafana
echo "Waiting 3 minutes for OPA-PDP to start..."
sleep 180
check_rest_endpoint "${PAP_PORT}"
function setup_drools_pdp() {
export ROBOT_FILES="drools-pdp-test.robot"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh drools-pdp --grafana
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-drools-pdp --grafana
echo "Waiting 1 minute for drools-pdp to start..."
sleep 60
check_rest_endpoint "${DROOLS_TELEMETRY_PORT}"
}
function setup_distribution() {
+ # Prepare CSAR file for distribution test
zip -F "${CSAR_DIR}"/sample_csar_with_apex_policy.csar --out "${CSAR_DIR}"/csar_temp.csar -q
- # Remake temp directory
- sudo rm -rf /tmp/distribution
+ # Create clean directory for CSAR files (mounted into policy-distribution container)
+ rm -rf /tmp/distribution
mkdir /tmp/distribution
export ROBOT_FILES="distribution-test.robot"
- source "${DOCKER_COMPOSE_DIR}"/start-compose.sh distribution --grafana
+ source "${DOCKER_COMPOSE_DIR}"/start-compose.sh policy-distribution --grafana
echo "Waiting 1 minute for distribution to start..."
sleep 60
check_rest_endpoint "${DIST_PORT}"
case $PROJECT in
clamp | policy-clamp)
+ export ACM_REPLICAS=2
setup_clamp
;;
clamp-simple | policy-simple)
- setup_clamp_simple
+ export ACM_REPLICAS=1
+ setup_clamp
;;
api | policy-api)
setup_apex
;;
- apex-pdp-medium | policy-apex-pdp-medium)
- setup_apex_medium
- ;;
-
- apex-pdp-large | policy-apex-pdp-large)
- setup_apex_large
- ;;
-
xacml-pdp | policy-xacml-pdp)
setup_xacml_pdp
;;
export CSAR_DIR="${WORKSPACE}/csit/resources/tests/data/csar"
export DOCKER_COMPOSE_DIR="${WORKSPACE}/compose"
export ROBOT_FILES=""
-export ACM_REPLICA_TEARDOWN=false
-export APEX_REPLICA_TEARDOWN=false
-export SCHEMAS_TO_BE_CREATED="policyadmin operationshistory pooling"
cd "${WORKSPACE}" || exit
# recreate the log folder with test results
-sudo rm -rf "${ROBOT_LOG_DIR}"
+rm -rf "${ROBOT_LOG_DIR}"
mkdir -p "${ROBOT_LOG_DIR}"
# log into nexus docker