summaryrefslogtreecommitdiffstats
path: root/compose/config
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-08-15 12:39:19 +0100
committerAdheli Tavares <adheli.tavares@est.tech>2024-08-26 08:21:39 +0000
commitd802fd9a6c6aaffa330a30b68f7896ffebaa4fcd (patch)
tree823eb915f6322a38477d971273a0e43713ce0d06 /compose/config
parent10cf66cdd2cca12dad9f299714e6294ae35752a7 (diff)
Change default database to PostgreSQL
Issue-ID: POLICY-5118 Change-Id: I22ece93aca3cbc5e406e4942ce5255a7b7b60761 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'compose/config')
-rw-r--r--compose/config/api/apiParameters.yaml30
-rw-r--r--compose/config/api/apiParametersPostgres.yaml84
-rw-r--r--compose/config/clamp/AcRuntimeParameters.yaml27
-rw-r--r--compose/config/clamp/policy-clamp-create-tables.sql275
-rwxr-xr-xcompose/config/db-migrator/init.sh19
-rwxr-xr-xcompose/config/db-migrator/init_pg.sh23
-rw-r--r--compose/config/db-pg/db-pg.conf11
-rwxr-xr-xcompose/config/db-pg/db-pg.sh7
-rwxr-xr-xcompose/config/db/db.sh3
-rw-r--r--compose/config/drools-applications/env/base-mariadb.conf (renamed from compose/config/drools-applications/env/base.conf)1
-rw-r--r--compose/config/drools-applications/env/base-postgres.conf148
-rw-r--r--compose/config/drools-pdp/env/base-mariadb.conf (renamed from compose/config/drools-pdp/env/base.conf)0
-rw-r--r--compose/config/drools-pdp/env/base-postgres.conf138
-rw-r--r--compose/config/pap/papParameters.yaml25
-rw-r--r--compose/config/pap/papParametersPostgres.yaml88
-rw-r--r--compose/config/policy-gui/application.yaml37
-rw-r--r--compose/config/policy-gui/groups.json137
-rw-r--r--compose/config/policy-gui/logback.xml119
-rw-r--r--compose/config/xacml-pdp/xacml-mariadb.properties54
-rw-r--r--compose/config/xacml-pdp/xacml-postgres.properties54
20 files changed, 497 insertions, 783 deletions
diff --git a/compose/config/api/apiParameters.yaml b/compose/config/api/apiParameters.yaml
index 51e7f368..3d8de256 100644
--- a/compose/config/api/apiParameters.yaml
+++ b/compose/config/api/apiParameters.yaml
@@ -10,10 +10,9 @@ spring:
name: policyadmin
password: zb!XztG34
mvc.converters.preferred-json-mapper: gson
-
datasource:
- url: jdbc:mariadb://mariadb:3306/policyadmin
- driverClassName: org.mariadb.jdbc.Driver
+ url: jdbc:postgresql://postgres:5432/policyadmin
+ driverClassName: org.postgresql.Driver
username: policy_user
password: policy_user
jpa:
@@ -30,8 +29,8 @@ policy-api:
database:
name: PolicyProviderParameterGroup
implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl
- driver: org.mariadb.jdbc.Driver
- url: jdbc:mariadb://mariadb:3306/policyadmin
+ driver: org.postgresql.Driver
+ url: jdbc:postgresql://postgres:5432/policyadmin
user: policy_user
password: policy_user
persistenceUnit: PolicyDb
@@ -82,3 +81,24 @@ management:
path-mapping:
-metrics: plain-metrics
-prometheus: metrics
+
+---
+
+spring:
+ config:
+ activate:
+ on-profile: mariadb
+ datasource:
+ url: jdbc:mariadb://mariadb:3306/policyadmin
+ driverClassName: org.mariadb.jdbc.Driver
+ username: policy_user
+ password: policy_user
+
+database:
+ name: PolicyProviderParameterGroup
+ implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl
+ driver: org.mariadb.jdbc.Driver
+ url: jdbc:mariadb://mariadb:3306/policyadmin
+ user: policy_user
+ password: policy_user
+ persistenceUnit: PolicyDb
diff --git a/compose/config/api/apiParametersPostgres.yaml b/compose/config/api/apiParametersPostgres.yaml
deleted file mode 100644
index c0b23e94..00000000
--- a/compose/config/api/apiParametersPostgres.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
-server:
- port: 6969
- ssl:
- enabled: false
- servlet:
- context-path: /policy/api/v1
-
-spring:
- security.user:
- name: policyadmin
- password: zb!XztG34
- mvc.converters.preferred-json-mapper: gson
-
- datasource:
- url: jdbc:postgresql://postgres:5432/policyadmin
- driverClassName: org.postgresql.Driver
- username: policy_user
- password: policy_user
- jpa:
- hibernate:
- ddl-auto: none
- naming:
- physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
- implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
-
-policy-api:
- name: ApiGroup
- aaf: false
-
-database:
- name: PolicyProviderParameterGroup
- implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl
- driver: org.postgresql.Driver
- url: jdbc:postgresql://postgres:5432/policyadmin
- user: policy_user
- password: policy_user
- persistenceUnit: PolicyDb
-
-policy-preload:
- policyTypes:
- - policytypes/onap.policies.monitoring.tcagen2.yaml
- - policytypes/onap.policies.monitoring.tcagen2.v2.yaml
- - policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml
- - policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml
- - policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml
- - policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml
- - policytypes/onap.policies.Optimization.yaml
- - policytypes/onap.policies.optimization.Resource.yaml
- - policytypes/onap.policies.optimization.Service.yaml
- - policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml
- - policytypes/onap.policies.optimization.resource.DistancePolicy.yaml
- - policytypes/onap.policies.optimization.resource.HpaPolicy.yaml
- - policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml
- - policytypes/onap.policies.optimization.resource.PciPolicy.yaml
- - policytypes/onap.policies.optimization.service.QueryPolicy.yaml
- - policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml
- - policytypes/onap.policies.optimization.resource.Vim_fit.yaml
- - policytypes/onap.policies.optimization.resource.VnfPolicy.yaml
- - policytypes/onap.policies.controlloop.guard.Common.yaml
- - policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml
- - policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml
- - policytypes/onap.policies.controlloop.guard.common.MinMax.yaml
- - policytypes/onap.policies.controlloop.guard.common.Filter.yaml
- - policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml
- - policytypes/onap.policies.Naming.yaml
- - policytypes/onap.policies.Match.yaml
- - policytypes/onap.policies.native.Drools.yaml
- - policytypes/onap.policies.native.Xacml.yaml
- - policytypes/onap.policies.native.Apex.yaml
- - policytypes/onap.policies.controlloop.operational.Common.yaml
- - policytypes/onap.policies.controlloop.operational.common.Apex.yaml
- - policytypes/onap.policies.controlloop.operational.common.Drools.yaml
- policies:
- - policies/sdnc.policy.naming.input.tosca.yaml
-
-management:
- endpoints:
- web:
- base-path: /
- exposure:
- include: health,metrics,prometheus
- path-mapping:
- -metrics: plain-metrics
- -prometheus: metrics
diff --git a/compose/config/clamp/AcRuntimeParameters.yaml b/compose/config/clamp/AcRuntimeParameters.yaml
index f2ef511a..387e6ffe 100644
--- a/compose/config/clamp/AcRuntimeParameters.yaml
+++ b/compose/config/clamp/AcRuntimeParameters.yaml
@@ -9,8 +9,8 @@ spring:
converters:
preferred-json-mapper: gson
datasource:
- url: jdbc:mariadb://${mariadb.host:mariadb}:${mariadb.port:3306}/clampacm
- driverClassName: org.mariadb.jdbc.Driver
+ url: jdbc:postgresql://postgres:5432/policyadmin
+ driverClassName: org.postgresql.Driver
username: policy_user
password: policy_user
hikari:
@@ -20,7 +20,7 @@ spring:
maximumPoolSize: 10
jpa:
hibernate:
- ddl-auto: none
+ ddl-auto: update
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
@@ -96,26 +96,19 @@ metrics:
# Tracing can be configured for grpc or http - default is http
-#tracing:
-# enabled: true
-# exporter:
-# endpoint: http://jaeger:4317
-# protocol: grpc
-# sampler:
-# jaeger-remote:
-# endpoint: http://jaeger:14250
tracing:
enabled: true
exporter:
endpoint: http://jaeger:4318/v1/traces
protocol: http
+# protocol: grpc
sampler:
jaeger-remote:
endpoint: http://jaeger:14250
-# legacy config
---
+# legacy config
spring:
config:
@@ -144,3 +137,13 @@ runtime:
acmParameters:
toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement
toscaCompositionName: org.onap.policy.clamp.acm.AutomationComposition
+
+---
+# mariadb config
+spring:
+ config:
+ activate:
+ on-profile: mariadb
+ datasource:
+ url: jdbc:mariadb://${mariadb.host:mariadb}:${mariadb.port:3306}/clampacm
+ driverClassName: org.mariadb.jdbc.Driver
diff --git a/compose/config/clamp/policy-clamp-create-tables.sql b/compose/config/clamp/policy-clamp-create-tables.sql
deleted file mode 100644
index 5d655ad5..00000000
--- a/compose/config/clamp/policy-clamp-create-tables.sql
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2022 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=========================================================
- */
-
-create table if not exists dictionary (
- name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- dictionary_second_level integer,
- dictionary_type varchar(255),
- primary key (name)
- ) engine=InnoDB;
-
-create table if not exists dictionary_elements (
- short_name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- description varchar(255) not null,
- name varchar(255) not null,
- subdictionary_name varchar(255),
- type varchar(255) not null,
- primary key (short_name)
- ) engine=InnoDB;
-
-create table if not exists dictionary_to_dictionaryelements (
- dictionary_name varchar(255) not null,
- dictionary_element_short_name varchar(255) not null,
- primary key (dictionary_name, dictionary_element_short_name)
- ) engine=InnoDB;
-
-create table if not exists hibernate_sequence (
- next_val bigint
-) engine=InnoDB;
-
-insert into hibernate_sequence values ( 1 );
-
-create table if not exists loop_element_models (
- name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- blueprint_yaml MEDIUMTEXT,
- dcae_blueprint_id varchar(255),
- loop_element_type varchar(255) not null,
- short_name varchar(255),
- primary key (name)
- ) engine=InnoDB;
-
-create table if not exists loop_logs (
- id bigint not null,
- log_component varchar(255) not null,
- log_instant datetime(6) not null,
- log_type varchar(255) not null,
- message MEDIUMTEXT not null,
- loop_id varchar(255) not null,
- primary key (id)
- ) engine=InnoDB;
-
-create table if not exists loop_templates (
- name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- allowed_loop_type varchar(255),
- blueprint_yaml MEDIUMTEXT,
- dcae_blueprint_id varchar(255),
- maximum_instances_allowed integer,
- svg_representation MEDIUMTEXT,
- unique_blueprint boolean default false,
- service_uuid varchar(255),
- primary key (name)
- ) engine=InnoDB;
-
-create table if not exists loopelementmodels_to_policymodels (
- loop_element_name varchar(255) not null,
- policy_model_type varchar(255) not null,
- policy_model_version varchar(255) not null,
- primary key (loop_element_name, policy_model_type, policy_model_version)
- ) engine=InnoDB;
-
-create table if not exists loops (
- name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- dcae_deployment_id varchar(255),
- dcae_deployment_status_url varchar(255),
- global_properties_json json,
- last_computed_state varchar(255) not null,
- svg_representation MEDIUMTEXT,
- loop_template_name varchar(255) not null,
- service_uuid varchar(255),
- primary key (name)
- ) engine=InnoDB;
-
-create table if not exists loops_to_microservicepolicies (
- loop_name varchar(255) not null,
- microservicepolicy_name varchar(255) not null,
- primary key (loop_name, microservicepolicy_name)
- ) engine=InnoDB;
-
-create table if not exists looptemplates_to_loopelementmodels (
- loop_element_model_name varchar(255) not null,
- loop_template_name varchar(255) not null,
- flow_order integer not null,
- primary key (loop_element_model_name, loop_template_name)
- ) engine=InnoDB;
-
-create table if not exists micro_service_policies (
- name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- configurations_json json,
- json_representation json not null,
- pdp_group varchar(255),
- pdp_sub_group varchar(255),
- context varchar(255),
- dcae_blueprint_id varchar(255),
- dcae_deployment_id varchar(255),
- dcae_deployment_status_url varchar(255),
- device_type_scope varchar(255),
- shared bit not null,
- loop_element_model_id varchar(255),
- policy_model_type varchar(255),
- policy_model_version varchar(255),
- primary key (name)
- ) engine=InnoDB;
-
-create table if not exists operational_policies (
- name varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- configurations_json json,
- json_representation json not null,
- pdp_group varchar(255),
- pdp_sub_group varchar(255),
- loop_element_model_id varchar(255),
- policy_model_type varchar(255),
- policy_model_version varchar(255),
- loop_id varchar(255) not null,
- primary key (name)
- ) engine=InnoDB;
-
-create table if not exists policy_models (
- policy_model_type varchar(255) not null,
- version varchar(255) not null,
- created_by varchar(255),
- created_timestamp datetime(6) not null,
- updated_by varchar(255),
- updated_timestamp datetime(6) not null,
- policy_acronym varchar(255),
- policy_tosca MEDIUMTEXT,
- policy_pdp_group json,
- primary key (policy_model_type, version)
- ) engine=InnoDB;
-
-create table if not exists services (
- service_uuid varchar(255) not null,
- name varchar(255) not null,
- resource_details json,
- service_details json,
- version varchar(255),
- primary key (service_uuid)
- ) engine=InnoDB;
-
-alter table dictionary_to_dictionaryelements
- add constraint FK68hjjinnm8nte2owstd0xwp23
- foreign key (dictionary_element_short_name)
- references dictionary_elements (short_name);
-
-alter table dictionary_to_dictionaryelements
- add constraint FKtqfxg46gsxwlm2gkl6ne3cxfe
- foreign key (dictionary_name)
- references dictionary (name);
-
-alter table loop_logs
- add constraint FK1j0cda46aickcaoxqoo34khg2
- foreign key (loop_id)
- references loops (name);
-
-alter table loop_templates
- add constraint FKn692dk6281wvp1o95074uacn6
- foreign key (service_uuid)
- references services (service_uuid);
-
-alter table loopelementmodels_to_policymodels
- add constraint FK23j2q74v6kaexefy0tdabsnda
- foreign key (policy_model_type, policy_model_version)
- references policy_models (policy_model_type, version);
-
-alter table loopelementmodels_to_policymodels
- add constraint FKjag1iu0olojfwryfkvb5o0rk5
- foreign key (loop_element_name)
- references loop_element_models (name);
-
-alter table loops
- add constraint FK844uwy82wt0l66jljkjqembpj
- foreign key (loop_template_name)
- references loop_templates (name);
-
-alter table loops
- add constraint FK4b9wnqopxogwek014i1shqw7w
- foreign key (service_uuid)
- references services (service_uuid);
-
-alter table loops_to_microservicepolicies
- add constraint FKle255jmi7b065fwbvmwbiehtb
- foreign key (microservicepolicy_name)
- references micro_service_policies (name);
-
-alter table loops_to_microservicepolicies
- add constraint FK8avfqaf7xl71l7sn7a5eri68d
- foreign key (loop_name)
- references loops (name);
-
-alter table looptemplates_to_loopelementmodels
- add constraint FK1k7nbrbugvqa0xfxkq3cj1yn9
- foreign key (loop_element_model_name)
- references loop_element_models (name);
-
-alter table looptemplates_to_loopelementmodels
- add constraint FKj29yxyw0x7ue6mwgi6d3qg748
- foreign key (loop_template_name)
- references loop_templates (name);
-
-alter table micro_service_policies
- add constraint FKqvvdypacbww07fuv8xvlvdjgl
- foreign key (loop_element_model_id)
- references loop_element_models (name);
-
-alter table micro_service_policies
- add constraint FKn17j9ufmyhqicb6cvr1dbjvkt
- foreign key (policy_model_type, policy_model_version)
- references policy_models (policy_model_type, version);
-
-alter table operational_policies
- add constraint FKi9kh7my40737xeuaye9xwbnko
- foreign key (loop_element_model_id)
- references loop_element_models (name);
-
-alter table operational_policies
- add constraint FKlsyhfkoqvkwj78ofepxhoctip
- foreign key (policy_model_type, policy_model_version)
- references policy_models (policy_model_type, version);
-
-alter table operational_policies
- add constraint FK1ddoggk9ni2bnqighv6ecmuwu
- foreign key (loop_id)
- references loops (name);
diff --git a/compose/config/db-migrator/init.sh b/compose/config/db-migrator/init.sh
index 047d947e..a8eb25a3 100755
--- a/compose/config/db-migrator/init.sh
+++ b/compose/config/db-migrator/init.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# ============LICENSE_START====================================================
-# Copyright (C) 2021 Nordix Foundation.
+# Copyright (C) 2021, 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.
@@ -22,14 +22,21 @@ export SQL_USER=${MYSQL_USER}
export SQL_PASSWORD=${MYSQL_PASSWORD}
export SCRIPT_DIRECTORY=sql
-/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB}
+for schema in ${SQL_DB}; do
+ echo "Initializing $schema..."
+ /opt/app/policy/bin/prepare_upgrade.sh ${schema}
-/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report
+ /opt/app/policy/bin/db-migrator -s ${schema} -o report
-/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade
-rc=$?
+ /opt/app/policy/bin/db-migrator -s ${schema} -o upgrade
+ rc=$?
-/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report
+ /opt/app/policy/bin/db-migrator -s ${schema} -o report
+
+ if [ "$rc" != 0 ]; then
+ break
+ fi
+done
nc -l -p 6824
diff --git a/compose/config/db-migrator/init_pg.sh b/compose/config/db-migrator/init_pg.sh
index 9b5f38e1..712d0d23 100755
--- a/compose/config/db-migrator/init_pg.sh
+++ b/compose/config/db-migrator/init_pg.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# ============LICENSE_START====================================================
-# Copyright (C) 2022 Nordix Foundation.
+# Copyright (C) 2022, 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.
@@ -18,18 +18,25 @@
# ============LICENSE_END======================================================
export POLICY_HOME=/opt/app/policy
-export SQL_USER=${MYSQL_USER}
-export SQL_PASSWORD=${MYSQL_PASSWORD}
+export SQL_USER=${PGSQL_USER}
+export SQL_PASSWORD=${PGSQL_PASSWORD}
export SCRIPT_DIRECTORY=postgres
-/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB}
+for schema in ${SQL_DB}; do
+ echo "Initializing $schema..."
+ /opt/app/policy/bin/prepare_upgrade.sh ${schema}
-/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o report
+ /opt/app/policy/bin/db-migrator-pg -s ${schema} -o report
-/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o upgrade
-rc=$?
+ /opt/app/policy/bin/db-migrator-pg -s ${schema} -o upgrade
+ rc=$?
-/opt/app/policy/bin/db-migrator-pg -s ${SQL_DB} -o report
+ /opt/app/policy/bin/db-migrator-pg -s ${schema} -o report
+
+ if [ "$rc" != 0 ]; then
+ break
+ fi
+done
nc -l -p 6824
diff --git a/compose/config/db-pg/db-pg.conf b/compose/config/db-pg/db-pg.conf
index d4d58cec..ee26454e 100644
--- a/compose/config/db-pg/db-pg.conf
+++ b/compose/config/db-pg/db-pg.conf
@@ -1,4 +1,4 @@
-# Copyright 2022 Nordix Foundation. All rights reserved
+# Copyright (C) 2022, 2024 Nordix Foundation. 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.
@@ -11,7 +11,8 @@
# 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.
-MYSQL_ROOT_PASSWORD=secret
-MYSQL_USER=policy_user
-MYSQL_PASSWORD=policy_user
-PGPASSWORD=policy_user \ No newline at end of file
+PGSQL_ROOT_PASSWORD=secret
+PGSQL_USER=policy_user
+PGSQL_PASSWORD=policy_user
+PGPASSWORD=policy_user
+POSTGRES_PASSWORD=policy_user
diff --git a/compose/config/db-pg/db-pg.sh b/compose/config/db-pg/db-pg.sh
index 14816f08..681191f9 100755
--- a/compose/config/db-pg/db-pg.sh
+++ b/compose/config/db-pg/db-pg.sh
@@ -1,5 +1,5 @@
#!/bin/bash -xv
-# Copyright 2022 Nordix Foundation. All rights reserved
+# Copyright (C) 2022, 2024 Nordix Foundation. 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.
@@ -13,10 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-psql -U postgres -d postgres --command "CREATE USER ${MYSQL_USER} WITH PASSWORD '${MYSQL_PASSWORD}';"
+psql -U postgres -d postgres --command "CREATE USER ${PGSQL_USER} WITH PASSWORD '${PGSQL_PASSWORD}';"
for db in migration pooling policyadmin policyclamp operationshistory clampacm
do
psql -U postgres -d postgres --command "CREATE DATABASE ${db};"
- psql -U postgres -d postgres --command "GRANT ALL PRIVILEGES ON DATABASE ${db} TO ${MYSQL_USER} ;"
+ psql -U postgres -d postgres --command "ALTER DATABASE ${db} OWNER TO ${PGSQL_USER} ;"
+ psql -U postgres -d postgres --command "GRANT ALL PRIVILEGES ON DATABASE ${db} TO ${PGSQL_USER} ;"
done \ No newline at end of file
diff --git a/compose/config/db/db.sh b/compose/config/db/db.sh
index 0363ed8a..a916abc0 100755
--- a/compose/config/db/db.sh
+++ b/compose/config/db/db.sh
@@ -1,6 +1,6 @@
#!/bin/bash -xv
# Copyright 2019,2021 AT&T Intellectual Property. All rights reserved
-# Modifications Copyright (c) 2022 Nordix Foundation.
+# Modifications Copyright (c) 2022, 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.
@@ -21,4 +21,3 @@ do
done
mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
-mysql -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -f policyclamp < /tmp/policy-clamp-create-tables.sql
diff --git a/compose/config/drools-applications/env/base.conf b/compose/config/drools-applications/env/base-mariadb.conf
index 4ac3330c..b7e2c8f7 100644
--- a/compose/config/drools-applications/env/base.conf
+++ b/compose/config/drools-applications/env/base-mariadb.conf
@@ -53,6 +53,7 @@ SQL_PASSWORD=policy_user
SQL_PORT=3306
JDBC_URL=jdbc:mariadb://mariadb:3306/
JDBC_OPTS=
+JDBC_DRIVER=org.mariadb.jdbc.Driver
MYSQL_CMD=
# HTTP Servers
diff --git a/compose/config/drools-applications/env/base-postgres.conf b/compose/config/drools-applications/env/base-postgres.conf
new file mode 100644
index 00000000..1e82d0e2
--- /dev/null
+++ b/compose/config/drools-applications/env/base-postgres.conf
@@ -0,0 +1,148 @@
+# ============LICENSE_START==================================================
+# Copyright (C) 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====================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# SYSTEM software configuration
+
+DEBUG=y
+POLICY_HOME=/opt/app/policy
+POLICY_LOGS=/var/log/onap/policy/pdpd
+KEYSTORE_PASSWD=Pol1cy_0nap
+TRUSTSTORE_PASSWD=Pol1cy_0nap
+
+# Telemetry credentials
+
+TELEMETRY_PORT=9696
+TELEMETRY_HOST=0.0.0.0
+TELEMETRY_USER=demo@people.osaaf.org
+TELEMETRY_PASSWORD=demo123456!
+
+# nexus repository
+
+SNAPSHOT_REPOSITORY_ID=
+SNAPSHOT_REPOSITORY_URL=
+RELEASE_REPOSITORY_ID=
+RELEASE_REPOSITORY_URL=
+REPOSITORY_USERNAME=
+REPOSITORY_PASSWORD=
+REPOSITORY_OFFLINE=true
+
+# Relational (SQL) DB access
+
+SQL_HOST=postgres
+SQL_USER=policy_user
+SQL_PASSWORD=policy_user
+SQL_PORT=5432
+JDBC_URL=jdbc:postgresql://postgres:5432/
+JDBC_OPTS=
+JDBC_DRIVER=org.postgresql.Driver
+
+# HTTP Servers
+
+HTTP_SERVER_HTTPS=false
+PROMETHEUS=true
+
+# kafka server
+
+KAFKA_SERVERS=kafka:9092
+KAFKA_HTTPS=false
+
+# LIVENESS Checks
+
+LIVENESS_CONTROLLERS=*
+
+# PDP-D Kafka configuration channel
+
+PDPD_CONFIGURATION_TOPIC=pdpd-configuration
+PDPD_CONFIGURATION_SERVERS=kafka:9092
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
+PDPD_CONFIGURATION_CONSUMER_GROUP=
+PDPD_CONFIGURATION_CONSUMER_INSTANCE=
+PDPD_CONFIGURATION_PARTITION_KEY=
+
+# PAP-PDP configuration channel
+
+POLICY_PDP_PAP_TOPIC=policy-pdp-pap
+POLICY_PDP_PAP_API_KEY=
+POLICY_PDP_PAP_API_SECRET=
+POLICY_PDP_PAP_POLICYTYPES=onap.policies.controlloop.operational.common.Drools
+
+# PAP
+
+PAP_HOST=policy-pap
+PAP_USERNAME=policyadmin
+PAP_PASSWORD=zb!XztG34
+
+# PDP-X
+
+GUARD_DISABLED=false
+PDP_HOST=policy-xacml-pdp
+PDP_PORT=6969
+PDP_CONTEXT_URI=policy/pdpx/v1/
+PDP_USERNAME=policyadmin
+PDP_PASSWORD=zb!XztG34
+PDP_HTTPS=false
+
+# DCAE Kafka
+
+DCAE_TOPIC=unauthenticated.dcae_cl_output
+DCAE_SERVERS=kafka:9092
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# AAI
+
+AAI_HOST=aai-sim
+AAI_PORT=6666
+AAI_CONTEXT_URI=
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+AAI_HTTPS=false
+
+# MSO
+
+SO_HOST=so-sim
+SO_PORT=6669
+SO_CONTEXT_URI=
+SO_URL=http://so-sim:6669/
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD='password1$'
+
+# VFC
+
+VFC_HOST=vfc-sim
+VFC_PORT=6670
+VFC_CONTEXT_URI=
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_HOST=sdnc-sim
+SDNC_PORT=6668
+SDNC_CONTEXT_URI=
+SDNC_USERNAME=
+SDNC_PASSWORD=
+
+# CDS
+
+CDS_GRPC_HOST=grpc-sim
+CDS_GRPC_PORT=6680
+CDS_GRPC_USERNAME="ccsdkapps"
+CDS_GRPC_PASSWORD="ccsdkapps"
diff --git a/compose/config/drools-pdp/env/base.conf b/compose/config/drools-pdp/env/base-mariadb.conf
index 0e0156bd..0e0156bd 100644
--- a/compose/config/drools-pdp/env/base.conf
+++ b/compose/config/drools-pdp/env/base-mariadb.conf
diff --git a/compose/config/drools-pdp/env/base-postgres.conf b/compose/config/drools-pdp/env/base-postgres.conf
new file mode 100644
index 00000000..a883f3f8
--- /dev/null
+++ b/compose/config/drools-pdp/env/base-postgres.conf
@@ -0,0 +1,138 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+# Modification Copyright 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=========================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# SYSTEM software configuration
+
+DEBUG=y
+POLICY_HOME=/opt/app/policy
+POLICY_LOGS=/var/log/onap/policy/pdpd
+KEYSTORE_PASSWD=Pol1cy_0nap
+TRUSTSTORE_PASSWD=Pol1cy_0nap
+
+# Telemetry credentials
+
+TELEMETRY_PORT=9696
+TELEMETRY_HOST=0.0.0.0
+TELEMETRY_USER=demo@people.osaaf.org
+TELEMETRY_PASSWORD=demo123456!
+
+# nexus repository
+
+SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots
+SNAPSHOT_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/snapshots/
+RELEASE_REPOSITORY_ID=policy-nexus-releases
+RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/
+REPOSITORY_USERNAME=admin
+REPOSITORY_PASSWORD=admin123
+REPOSITORY_OFFLINE=false
+
+# Relational (SQL) DB access
+
+SQL_HOST=postgres
+SQL_USER=policy_user
+SQL_PASSWORD=policy_user
+SQL_PORT=5432
+JDBC_URL=jdbc:postgresql://postgres:5432/
+JDBC_OPTS=
+JDBC_DRIVER=org.postgresql.Driver
+
+# HTTP Servers
+
+HTTP_SERVER_HTTPS=false
+PROMETHEUS=true
+
+# PDP-D Kafka configuration channel
+
+PDPD_CONFIGURATION_TOPIC=pdpd-configuration
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
+PDPD_CONFIGURATION_CONSUMER_GROUP=
+PDPD_CONFIGURATION_CONSUMER_INSTANCE=
+PDPD_CONFIGURATION_PARTITION_KEY=
+
+# PAP-PDP configuration channel
+
+POLICY_PDP_PAP_TOPIC=policy-pdp-pap
+POLICY_PDP_PAP_API_KEY=
+POLICY_PDP_PAP_API_SECRET=
+
+# PAP
+
+PAP_HOST=
+PAP_USERNAME=
+PAP_PASSWORD=
+
+# PDP-X
+
+PDP_HOST=
+PDP_PORT=
+PDP_CONTEXT_URI=policy/pdpx/v1/
+PDP_USERNAME=
+PDP_PASSWORD=
+PDP_CLIENT_USERNAME=
+PDP_CLIENT_PASSWORD=
+PDP_ENVIRONMENT=
+GUARD_DISABLED=false
+
+# DCAE Kafka
+
+DCAE_TOPIC=unauthenticated.dcae_cl_output
+DCAE_SERVERS=
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# kafka server
+
+KAFKA_SERVERS=kafka:9092
+KAFKA_HTTPS=false
+
+# AAI
+
+AAI_HOST=aai.api.simpledemo.onap.org
+AAI_PORT=8443
+AAI_CONTEXT_URI=
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+
+# MSO
+
+SO_HOST=vm1.mso.simpledemo.onap.org
+SO_PORT=8080
+SO_CONTEXT_URI=onap/so/infra/
+SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD='password1$'
+
+# VFC
+
+VFC_HOST=
+VFC_PORT=
+VFC_CONTEXT_URI=api/nslcm/v1/
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_HOST=
+SDNC_PORT=
+SDNC_CONTEXT_URI=restconf/operations/
+SDNC_USERNAME=
+SDNC_PASSWORD=
diff --git a/compose/config/pap/papParameters.yaml b/compose/config/pap/papParameters.yaml
index 5b6c640e..57b540bb 100644
--- a/compose/config/pap/papParameters.yaml
+++ b/compose/config/pap/papParameters.yaml
@@ -7,8 +7,8 @@ spring:
converters:
preferred-json-mapper: gson
datasource:
- url: jdbc:mariadb://mariadb:3306/policyadmin
- driverClassName: org.mariadb.jdbc.Driver
+ url: jdbc:postgresql://postgres:5432/policyadmin
+ driverClassName: org.postgresql.Driver
username: policy_user
password: policy_user
jpa:
@@ -85,3 +85,24 @@ management:
path-mapping:
-metrics: plain-metrics
-prometheus: metrics
+
+---
+
+spring:
+ config:
+ activate:
+ on-profile: mariadb
+ datasource:
+ url: jdbc:mariadb://mariadb:3306/policyadmin
+ driverClassName: org.mariadb.jdbc.Driver
+ username: policy_user
+ password: policy_user
+
+database:
+ name: PolicyProviderParameterGroup
+ implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl
+ driver: org.mariadb.jdbc.Driver
+ url: jdbc:mariadb://mariadb:3306/policyadmin
+ user: policy_user
+ password: policy_user
+ persistenceUnit: PolicyDb
diff --git a/compose/config/pap/papParametersPostgres.yaml b/compose/config/pap/papParametersPostgres.yaml
deleted file mode 100644
index 30ef7751..00000000
--- a/compose/config/pap/papParametersPostgres.yaml
+++ /dev/null
@@ -1,88 +0,0 @@
-spring:
- security:
- user:
- name: policyadmin
- password: zb!XztG34
- http:
- converters:
- preferred-json-mapper: gson
- datasource:
- url: jdbc:postgresql://postgres:5432/policyadmin
- driverClassName: org.postgresql.Driver
- username: policy_user
- password: policy_user
- jpa:
- hibernate:
- ddl-auto: none
- naming:
- physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
- implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
-
-server:
- port: 6969
- servlet:
- context-path: /policy/pap/v1
- ssl:
- enabled: false
-
-pap:
- name: PapGroup
- aaf: false
- topic:
- pdp-pap.name: policy-pdp-pap
- notification.name: policy-notification
- heartbeat.name: policy-heartbeat
- pdpParameters:
- heartBeatMs: 120000
- updateParameters:
- maxRetryCount: 1
- maxWaitMs: 30000
- stateChangeParameters:
- maxRetryCount: 1
- maxWaitMs: 30000
- savePdpStatisticsInDb: true
- topicParameterGroup:
- topicSources:
- - topic: ${pap.topic.pdp-pap.name}
- servers:
- - kafka:9092
- topicCommInfrastructure: kafka
- useHttps: false
- fetchTimeout: 15000
- - topic: ${pap.topic.heartbeat.name}
- effectiveTopic: ${pap.topic.pdp-pap.name}
- consumerGroup: policy-pap
- servers:
- - kafka:9092
- topicCommInfrastructure: kafka
- useHttps: false
- fetchTimeout: 15000
- topicSinks:
- - topic: ${pap.topic.pdp-pap.name}
- servers:
- - kafka:9092
- topicCommInfrastructure: kafka
- useHttps: false
- - topic: ${pap.topic.notification.name}
- servers:
- - kafka:9092
- topicCommInfrastructure: kafka
- useHttps: false
- healthCheckRestClientParameters:
- - clientName: api
- hostname: policy-api
- port: 6969
- userName: policyadmin
- password: zb!XztG34
- useHttps: false
- basePath: policy/api/v1/healthcheck
-
-management:
- endpoints:
- web:
- base-path: /
- exposure:
- include: health, metrics, prometheus
- path-mapping:
- -metrics: plain-metrics
- -prometheus: metrics
diff --git a/compose/config/policy-gui/application.yaml b/compose/config/policy-gui/application.yaml
deleted file mode 100644
index 30de64bf..00000000
--- a/compose/config/policy-gui/application.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# ===========LICENSE_START====================================================
-# Copyright (C) 2022 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=====================================================
-#
-server:
- port: 2445
- ssl:
- enabled: false
-
-clamp:
- url: http://policy-clamp-be:8445
- disable-ssl-validation: true
- disable-ssl-hostname-check: true
-
-apex-editor:
- upload-url:
- upload-userid:
-
-management:
- endpoints:
- web:
- exposure:
- include: health, metrics, prometheus
-
diff --git a/compose/config/policy-gui/groups.json b/compose/config/policy-gui/groups.json
deleted file mode 100644
index 6ee30e1c..00000000
--- a/compose/config/policy-gui/groups.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "groups": [
- {
- "name": "defaultGroup",
- "version": "1.0.0",
- "description": "The default group that registers all supported policy types and pdps.",
- "pdpGroupState": "ACTIVE",
- "pdpSubgroups": [
- {
- "pdpType": "xacml",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.common.MinMax",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.common.Blacklist",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.common.Filter",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.monitoring.*",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.*",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.AffinityPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.DistancePolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.HpaPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.OptimizationPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.PciPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.service.QueryPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.service.SubscriberPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.Vim_fit",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.VnfPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.Xacml",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.Naming",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.match.*",
- "version": "1.0.0"
- }
- ],
- "currentInstanceCount": 0,
- "desiredInstanceCount": 1,
- "policies": [
- {
- "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
- "version": "1.0.0"
- }
- ]
- },
- {
- "pdpType": "drools",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.operational.common.Drools",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.drools.Controller",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.drools.Artifact",
- "version": "1.0.0"
- }
- ],
- "currentInstanceCount": 0,
- "desiredInstanceCount": 1,
- "policies": []
- },
- {
- "pdpType": "apex",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.operational.common.Apex",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.Apex",
- "version": "1.0.0"
- }
- ],
- "currentInstanceCount": 0,
- "desiredInstanceCount": 1,
- "policies": []
- }
- ]
- }
- ]
-}
diff --git a/compose/config/policy-gui/logback.xml b/compose/config/policy-gui/logback.xml
deleted file mode 100644
index 04bc5671..00000000
--- a/compose/config/policy-gui/logback.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<!--
- ============LICENSE_START=======================================================
- policy-gui
- ================================================================================
- Copyright (C) 2021-2022 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=========================================================
- -->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
- <property name="logDir" value="${POLICY_LOGS}" />
-
- <property name="errorLog" value="error" />
- <property name="debugLog" value="debug" />
- <property name="networkLog" value="network" />
-
- <property name="debugPattern"
- value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
- <property name="errorPattern" value="${debugPattern}" />
- <property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
-
- <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${errorLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>WARN</level>
- </filter>
- <encoder>
- <pattern>${errorPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="ErrorOut" />
- </appender>
-
- <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${debugLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${debugPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="DebugOut" />
- </appender>
-
- <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${networkLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${networkPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="NetworkOut" />
- </appender>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="STDOUT" />
- </appender>
-
- <logger name="network" level="INFO" additivity="false">
- <appender-ref ref="AsyncNetworkOut" />
- <appender-ref ref="AsyncStdOut" />
- </logger>
-
- <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
- <appender-ref ref="AsyncNetworkOut" />
- <appender-ref ref="AsyncStdOut" />
- </logger>
-
- <logger name="org.eclipse.jetty" level="ERROR" />
-
- <root level="INFO">
- <appender-ref ref="AsyncDebugOut" />
- <appender-ref ref="AsyncErrorOut" />
- <appender-ref ref="AsyncStdOut" />
- </root>
-
-</configuration> \ No newline at end of file
diff --git a/compose/config/xacml-pdp/xacml-mariadb.properties b/compose/config/xacml-pdp/xacml-mariadb.properties
new file mode 100644
index 00000000..ede93c70
--- /dev/null
+++ b/compose/config/xacml-pdp/xacml-mariadb.properties
@@ -0,0 +1,54 @@
+#
+# Properties that the embedded PDP engine uses to configure and load
+#
+# Standard API Factories
+#
+xacml.dataTypeFactory=com.att.research.xacml.std.StdDataTypeFactory
+xacml.pdpEngineFactory=com.att.research.xacmlatt.pdp.ATTPDPEngineFactory
+xacml.pepEngineFactory=com.att.research.xacml.std.pep.StdEngineFactory
+xacml.pipFinderFactory=com.att.research.xacml.std.pip.StdPIPFinderFactory
+xacml.traceEngineFactory=com.att.research.xacml.std.trace.LoggingTraceEngineFactory
+#
+# AT&T PDP Implementation Factories
+#
+xacml.att.evaluationContextFactory=com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory
+xacml.att.combiningAlgorithmFactory=com.att.research.xacmlatt.pdp.std.StdCombiningAlgorithmFactory
+xacml.att.functionDefinitionFactory=com.att.research.xacmlatt.pdp.std.StdFunctionDefinitionFactory
+#
+# ONAP PDP Implementation Factories
+#
+xacml.att.policyFinderFactory=org.onap.policy.pdp.xacml.application.common.OnapPolicyFinderFactory
+
+#
+# Use a root combining algorithm
+#
+xacml.att.policyFinderFactory.combineRootPolicies=urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides
+
+#
+# PIP Engine Definitions
+#
+count-recent-operations.classname=org.onap.policy.pdp.xacml.application.common.operationshistory.CountRecentOperationsPip
+count-recent-operations.issuer=urn:org:onap:xacml:guard:count-recent-operations
+count-recent-operations.name=CountRecentOperations
+count-recent-operations.description=Returns operation counts based on time window
+count-recent-operations.persistenceunit=OperationsHistoryPU
+
+get-operation-outcome.classname=org.onap.policy.pdp.xacml.application.common.operationshistory.GetOperationOutcomePip
+get-operation-outcome.issuer=urn:org:onap:xacml:guard:get-operation-outcome
+get-operation-outcome.name=GetOperationOutcome
+get-operation-outcome.description=Returns operation outcome
+get-operation-outcome.persistenceunit=OperationsHistoryPU
+
+#
+# Make pips available to finder
+#
+xacml.pip.engines=count-recent-operations,get-operation-outcome
+
+#
+# JPA Properties
+#
+eclipselink.target-database=MySQL
+jakarta.persistence.jdbc.driver=org.mariadb.jdbc.Driver
+jakarta.persistence.jdbc.url=jdbc:mariadb://mariadb:3306/operationshistory
+jakarta.persistence.jdbc.user=policy_user
+jakarta.persistence.jdbc.password=policy_user
diff --git a/compose/config/xacml-pdp/xacml-postgres.properties b/compose/config/xacml-pdp/xacml-postgres.properties
new file mode 100644
index 00000000..a3446c4c
--- /dev/null
+++ b/compose/config/xacml-pdp/xacml-postgres.properties
@@ -0,0 +1,54 @@
+#
+# Properties that the embedded PDP engine uses to configure and load
+#
+# Standard API Factories
+#
+xacml.dataTypeFactory=com.att.research.xacml.std.StdDataTypeFactory
+xacml.pdpEngineFactory=com.att.research.xacmlatt.pdp.ATTPDPEngineFactory
+xacml.pepEngineFactory=com.att.research.xacml.std.pep.StdEngineFactory
+xacml.pipFinderFactory=com.att.research.xacml.std.pip.StdPIPFinderFactory
+xacml.traceEngineFactory=com.att.research.xacml.std.trace.LoggingTraceEngineFactory
+#
+# AT&T PDP Implementation Factories
+#
+xacml.att.evaluationContextFactory=com.att.research.xacmlatt.pdp.std.StdEvaluationContextFactory
+xacml.att.combiningAlgorithmFactory=com.att.research.xacmlatt.pdp.std.StdCombiningAlgorithmFactory
+xacml.att.functionDefinitionFactory=com.att.research.xacmlatt.pdp.std.StdFunctionDefinitionFactory
+#
+# ONAP PDP Implementation Factories
+#
+xacml.att.policyFinderFactory=org.onap.policy.pdp.xacml.application.common.OnapPolicyFinderFactory
+
+#
+# Use a root combining algorithm
+#
+xacml.att.policyFinderFactory.combineRootPolicies=urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides
+
+#
+# PIP Engine Definitions
+#
+count-recent-operations.classname=org.onap.policy.pdp.xacml.application.common.operationshistory.CountRecentOperationsPip
+count-recent-operations.issuer=urn:org:onap:xacml:guard:count-recent-operations
+count-recent-operations.name=CountRecentOperations
+count-recent-operations.description=Returns operation counts based on time window
+count-recent-operations.persistenceunit=OperationsHistoryPU
+
+get-operation-outcome.classname=org.onap.policy.pdp.xacml.application.common.operationshistory.GetOperationOutcomePip
+get-operation-outcome.issuer=urn:org:onap:xacml:guard:get-operation-outcome
+get-operation-outcome.name=GetOperationOutcome
+get-operation-outcome.description=Returns operation outcome
+get-operation-outcome.persistenceunit=OperationsHistoryPU
+
+#
+# Make pips available to finder
+#
+xacml.pip.engines=count-recent-operations,get-operation-outcome
+
+#
+# JPA Properties
+#
+eclipselink.target-database=PostgreSQL
+jakarta.persistence.jdbc.driver=org.postgresql.Driver
+jakarta.persistence.jdbc.url=jdbc:postgresql://postgres:5432/operationshistory
+jakarta.persistence.jdbc.user=policy_user
+jakarta.persistence.jdbc.password=policy_user