# # ============LICENSE_START======================================================= # Copyright (C) 2019 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/3.4/types.yaml" - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R3/k8splugin/1.4.4/k8splugin_types.yaml" inputs: service_name: type: string description: Name of the serice default: "pm-mapper" tag_version: type: string description: Docker image to be used default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.0-SNAPSHOT" replicas: type: integer description: Number of instances default: 1 aaf_username: type: string description: AAF user name default: "username" aaf_password: type: string description: AAF password default: "password" client_role: type: string description: Client role to request secure access to topic default: "ves-publisher" client_id: type: string description: Client id for given AAF client default: "ves-pub-1" dmaap_dr_username: type: string description: dmaap datarouter user name default: "username" dmaap_dr_password: type: string description: dmaap datarouter password default: "password" dcae_location: type: string description: DCAE location for the subscriber, used to set up routing default: "location" subscriber_id: type: string description: Subscriber id in Data Router default: "" dmaap_buscontroller_service_host: type: string description: DMAAP Bus Controller host address default: "dmaap-bc.onap.svc.cluster.local" dmaap_buscontroller_service_port: type: string description: DMAAP bus Controller host port default: "8080" dmaap_dr_feed_id: type: string description: ID of the data router feed that the PM Mapper will subscribe to default: "1" dmaap_dr_service_host: type: string description: DMAAP Data Router host address default: "dmaap-dr-node.onap.svc.cluster.local" dmaap_dr_service_port: type: string description: DMAAP Data Router host port default: "8443" dmaap_mr_service_host: type: string description: DMAAP Data Router host address default: "message-router.onap.svc.cluster.local" dmaap_mr_service_port: type: string description: DMAAP Data Router host port default: "3904" dmaap_mr_topic_name: type: string description: Name of MR topic events will be published to default: "pm-mapper-ves" filter: type: string description: PM mapper filter on measInfo, measInfoId, measType, instanceId default: "{ \"filters\":[]}" node_templates: pm-mapper: interfaces: cloudify.interfaces.lifecycle: start: inputs: ports: - '8080:0' properties: application_config: buscontroller_feed_subscription_endpoint: { concat: ["http://", { get_input: dmaap_buscontroller_service_host }, ":", { get_input: dmaap_buscontroller_service_port}, "/webapi/dr_subs"]} dmaap_dr_feed_id: get_input: dmaap_dr_feed_id dmaap_dr_delete_endpoint: { concat: ["http://", { get_input: dmaap_dr_service_host }, ":", { get_input: dmaap_dr_service_port}, "/delete"]} filters: get_input: filter streams_subscribes: dmaap_subscriber: type: "data_router" dmaap_info: username: get_input: dmaap_dr_username password: get_input: dmaap_dr_password location: get_input: dcae_location subscriber_id: get_input: subscriber_id delivery_url: { concat: ["http://", { get_input: service_name }, ".onap.svc.cluster.local", ":8081/delivery"]} streams_publishes: dmaap_publisher: aaf_username: get_input: aaf_username aaf_password: get_input: aaf_password type: "message_router" dmaap_info: client_role: get_input: client_role client_id: get_input: client_id topic_url: { concat: ["http://", { get_input: dmaap_mr_service_host }, ":", { get_input: dmaap_mr_service_port }, "/events/", { get_input: dmaap_mr_topic_name }]} location: get_input: dcae_location docker_config: healthcheck: endpoint: /healthcheck interval: 15s timeout: 1s type: http image: get_input: tag_version replicas: { get_input: replicas } name: { get_input: service_name } dns_name: { get_input: service_name } log_info: log_directory: "/var/log/ONAP/dcaegen2/services/pm-mapper" type: dcae.nodes.ContainerizedPlatformComponent