summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/dpo
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2020-08-05 10:12:04 +0100
committerefiacor <fiachra.corcoran@est.tech>2020-08-13 11:22:39 +0100
commit38ccb471732faaad6a25defee0753c1c5ac60cf0 (patch)
tree6b8fd360895ec5cc621d89ab35af7c14a4c05caf /components/pm-subscription-handler/dpo
parent66f25c47daae80fe0ebc57bfec32596608d0be5d (diff)
Refactor and bug fixes
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I8fe91bfdd2f1a2c8a6ca914e52d82dce04bffc0e Issue-ID: DCAEGEN2-2146
Diffstat (limited to 'components/pm-subscription-handler/dpo')
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml184
-rwxr-xr-xcomponents/pm-subscription-handler/dpo/spec/pmsh-component-spec.json18
2 files changed, 18 insertions, 184 deletions
diff --git a/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml b/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
deleted file mode 100755
index e3f7987c..00000000
--- a/components/pm-subscription-handler/dpo/blueprints/k8s-pmsh.yaml
+++ /dev/null
@@ -1,184 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# Copyright (C) 2020 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=========================================================
-#
-
-tosca_definitions_version: cloudify_dsl_1_3
-
-imports:
- - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
- - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml'
- - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml'
- - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml'
- - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/clamppolicyplugin/1.1.0/clamppolicyplugin_types.yaml'
-
-inputs:
- tag_version:
- type: string
- description: Docker image to be used
- default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pmsh:latest'
- replicas:
- type: integer
- description: Number of instances
- default: 1
- policy_model_id:
- type: 'string'
- default: 'onap.policies.monitoring.dcae-pm-subscription-handler'
- policy_id:
- type: 'string'
- default: 'onap.policies.monitoring.dcae-pm-subscription-handler'
- operational_policy_name:
- type: string
- default: 'pmsh-operational-policy'
- control_loop_name:
- type: string
- pmsh_publish_topic_name:
- type: string
- default: 'unauthenticated.DCAE_CL_OUTPUT'
- policy_feedback_topic_name:
- type: string
- default: 'PMSH_CL_INPUT'
- aai_notification_topic_name:
- type: string
- default: 'AAI-EVENT'
- publisher_client_role:
- type: string
- description: Client role to request secure access to topic
- default: 'org.onap.dcae.pmPublisher'
- subscriber_client_role:
- type: string
- description: Client role to request secure access to topic
- default: 'org.onap.dcae.pmSubscriber'
- client_id:
- type: string
- description: Client id for given AAF client
- default: 'dcae@dcae.onap.org'
- client_password:
- type: string
- description: Password for AAF client provided as client_id
- dcae_location:
- type: string
- description: DCAE location for the subscriber, used to set up routing
- default: 'san-francisco'
- cpu_limit:
- type: string
- default: '1000m'
- cpu_request:
- type: string
- default: '1000m'
- memory_limit:
- type: string
- default: '1024Mi'
- memory_request:
- type: string
- default: '1024Mi'
- pgaas_cluster_name:
- type: string
- default: 'dcae-pg-primary.onap'
-node_templates:
- pgaasvm:
- type: dcae.nodes.pgaas.database
- properties:
- writerfqdn: { get_input: pgaas_cluster_name }
- name: 'pmsh'
- pm_subscribe_topic:
- type: ccsdk.nodes.Topic
- properties:
- topic_name: { get_input: policy_feedback_topic_name }
- pmsh:
- type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
- interfaces:
- cloudify.interfaces.lifecycle:
- create:
- inputs:
- ports:
- - '8443:0'
- envs:
- PMSH_PG_URL:
- { get_attribute: [ pgaasvm, admin, host ] }
- PMSH_PG_PASSWORD:
- { get_attribute: [ pgaasvm, admin, password ] }
- PMSH_PG_USERNAME:
- { get_attribute: [ pgaasvm, admin, user ] }
- PMSH_DB_NAME:
- { get_attribute: [ pgaasvm, admin, database ] }
-
- relationships:
- - type: ccsdk.relationships.subscribe_to_events
- target: pm_subscribe_topic
- - type: cloudify.relationships.depends_on
- target: pgaasvm
- - type: cloudify.relationships.depends_on
- target: pmsh-policy
-
- properties:
- service_component_type: 'dcae-pmsh'
- service_component_name_override: 'dcae-pmsh'
- application_config:
- aaf_identity: { get_input: client_id }
- aaf_password: { get_input: client_password }
- operational_policy_name: { get_input: operational_policy_name }
- control_loop_name: { get_input: control_loop_name }
- cert_path: '/opt/app/pmsh/etc/certs/cert.pem'
- key_path: '/opt/app/pmsh/etc/certs/key.pem'
- ca_cert_path: '/opt/app/pmsh/etc/certs/cacert.pem'
- streams_publishes:
- policy_pm_publisher:
- type: message_router
- dmaap_info:
- topic_url: {concat: ["https://message-router:3905/events/", { get_input: pmsh_publish_topic_name }]}
- streams_subscribes:
- policy_pm_subscriber:
- type: message_router
- dmaap_info: <<pm_subscribe_topic>>
- aai_subscriber:
- type: message_router
- dmaap_info:
- topic_url: {concat: ["https://message-router:3905/events/", { get_input: aai_notification_topic_name }]}
- resource_config:
- limits:
- cpu: { get_input: cpu_limit }
- memory: { get_input: memory_limit }
- requests:
- cpu: { get_input: cpu_request }
- memory: { get_input: memory_request }
- docker_config:
- healthcheck:
- endpoint: /healthcheck
- interval: 15s
- timeout: 1s
- type: https
- streams_subscribes:
- - name: pm_subscribe_topic
- location: { get_input: dcae_location }
- client_role: { get_input: subscriber_client_role }
- type: message-router
- image: { get_input: tag_version }
- replicas: { get_input: replicas }
- log_info:
- log_directory: '/var/log/ONAP/dcaegen2/services/pmsh'
- tls_info:
- cert_directory: '/opt/app/pmsh/etc/certs'
- use_tls: true
- pmsh-policy:
- type: clamp.nodes.policy
- properties:
- policy_model_id:
- get_input: policy_model_id
- policy_id:
- get_input: policy_id \ No newline at end of file
diff --git a/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json b/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
index 43028857..69513bce 100755
--- a/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
+++ b/components/pm-subscription-handler/dpo/spec/pmsh-component-spec.json
@@ -100,6 +100,24 @@
"designer_editable": false
},
{
+ "name": "enable_tls",
+ "value": true,
+ "description": "Boolean to (en|dis)able TLS",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": true,
+ "type": "boolean"
+ },
+ {
+ "name": "protocol",
+ "value": "https",
+ "type": "string",
+ "description": "Protocol PMSH api will use. If enable_tls is disabled, set protocol to http",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": true
+ },
+ {
"name": "policy_model_id",
"value": "onap.policies.monitoring.dcae-pm-initiation-handler",
"description": "PMSH monitoring policy model id",