aboutsummaryrefslogtreecommitdiffstats
path: root/compose/config/clamp
diff options
context:
space:
mode:
Diffstat (limited to 'compose/config/clamp')
-rw-r--r--compose/config/clamp/AcRuntimeParameters.yaml56
-rw-r--r--compose/config/clamp/HttpParticipantParameters.yaml26
-rw-r--r--compose/config/clamp/KubernetesParticipantParameters.yaml28
-rw-r--r--compose/config/clamp/PolicyParticipantParameters.yaml28
-rw-r--r--compose/config/clamp/SimulatorParticipantParameters.yaml28
-rw-r--r--compose/config/clamp/policy-clamp-create-tables.sql275
6 files changed, 154 insertions, 287 deletions
diff --git a/compose/config/clamp/AcRuntimeParameters.yaml b/compose/config/clamp/AcRuntimeParameters.yaml
index dbcbc562..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,20 +96,54 @@ 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
+
+spring:
+ config:
+ activate:
+ on-profile: legacy
+runtime:
+ participantParameters:
+ heartBeatMs: 20000
+ maxStatusWaitMs: 200000
+ topicParameterGroup:
+ topicSources:
+ -
+ topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ useHttps: false
+ topicSinks:
+ -
+ topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ useHttps: false
+ 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/HttpParticipantParameters.yaml b/compose/config/clamp/HttpParticipantParameters.yaml
index 62e309c3..9f9e2f0f 100644
--- a/compose/config/clamp/HttpParticipantParameters.yaml
+++ b/compose/config/clamp/HttpParticipantParameters.yaml
@@ -73,3 +73,29 @@ tracing:
sampler:
jaeger-remote:
endpoint: http://jaeger:14250
+
+# legacy config
+---
+
+spring:
+ config:
+ activate:
+ on-profile: legacy
+participant:
+ intermediaryParameters:
+ reportingTimeIntervalMs: 120000
+ participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01
+ clampAutomationCompositionTopics:
+ topicSources:
+ - topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ useHttps: false
+ topicSinks:
+ - topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ useHttps: false
diff --git a/compose/config/clamp/KubernetesParticipantParameters.yaml b/compose/config/clamp/KubernetesParticipantParameters.yaml
index 76ae9696..ab96f51c 100644
--- a/compose/config/clamp/KubernetesParticipantParameters.yaml
+++ b/compose/config/clamp/KubernetesParticipantParameters.yaml
@@ -87,3 +87,31 @@ logging:
chart:
api:
enabled: false
+
+# legacy config
+---
+
+spring:
+ config:
+ activate:
+ on-profile: legacy
+participant:
+ intermediaryParameters:
+ reportingTimeIntervalMs: 120000
+ participantId: 101c62b3-8918-41b9-a747-d21eb79c6c02
+ clampAutomationCompositionTopics:
+ topicSources:
+ -
+ topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ useHttps: false
+ topicSinks:
+ -
+ topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ useHttps: false
diff --git a/compose/config/clamp/PolicyParticipantParameters.yaml b/compose/config/clamp/PolicyParticipantParameters.yaml
index a65eeb03..c7af9dd1 100644
--- a/compose/config/clamp/PolicyParticipantParameters.yaml
+++ b/compose/config/clamp/PolicyParticipantParameters.yaml
@@ -84,3 +84,31 @@ server:
enabled: false
servlet:
context-path: /onap/policy/clamp/acm/policyparticipant
+
+# legacy config
+---
+
+spring:
+ config:
+ activate:
+ on-profile: legacy
+participant:
+ intermediaryParameters:
+ reportingTimeIntervalMs: 120000
+ participantId: 101c62b3-8918-41b9-a747-d21eb79c6c03
+ clampAutomationCompositionTopics:
+ topicSources:
+ -
+ topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ useHttps: false
+ topicSinks:
+ -
+ topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ useHttps: false
diff --git a/compose/config/clamp/SimulatorParticipantParameters.yaml b/compose/config/clamp/SimulatorParticipantParameters.yaml
index 6f6a5131..996404f4 100644
--- a/compose/config/clamp/SimulatorParticipantParameters.yaml
+++ b/compose/config/clamp/SimulatorParticipantParameters.yaml
@@ -77,4 +77,30 @@ tracing:
protocol: http
sampler:
jaeger-remote:
- endpoint: http://jaeger:14250 \ No newline at end of file
+ endpoint: http://jaeger:14250
+
+# legacy config
+---
+
+spring:
+ config:
+ activate:
+ on-profile: legacy
+participant:
+ intermediaryParameters:
+ reportingTimeIntervalMs: 120000
+ participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c90}
+ clampAutomationCompositionTopics:
+ topicSources:
+ - topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ useHttps: false
+ topicSinks:
+ - topic: policy-acruntime-participant
+ servers:
+ - ${topicServer:kafka:9092}
+ topicCommInfrastructure: kafka
+ useHttps: false
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);