Update PM Mapper to 1.5.0
[dcaegen2/platform/blueprints.git] / blueprints / k8s-pm-mapper.yaml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019-2020 Nordix Foundation.
4 #  Copyright (C) 2020 Nokia
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the 'License');
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an 'AS IS' BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20 #
21
22 tosca_definitions_version: cloudify_dsl_1_3
23
24 imports:
25   - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
26   - plugin:k8splugin?version=3.4.3
27   - plugin:dmaap?version=1.5.0
28
29 inputs:
30   filter:
31     type: string
32     description: PM Mapper filter on measInfo, measInfoId, measType, instanceId
33     default: "{ \"filters\":[] }"
34   enable_http:
35     type: boolean
36     description: Option to turn on HTTP connections
37     default: false
38   tag_version:
39     type: string
40     description: Docker image to be used
41     default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.5.0'
42   replicas:
43     type: integer
44     description: Number of instances
45     default: 1
46   feed_name:
47     type: string
48     default: 'bulk_pm_feed'
49   topic_name:
50     type: string
51     default: 'PERFORMANCE_MEASUREMENTS'
52   client_role:
53     type: string
54     description: Client role to request secure access to topic
55     default: 'org.onap.dcae.pmPublisher'
56   client_id:
57     type: string
58     description: Client id for given AAF client
59     default: 'dcae@dcae.onap.org'
60   client_password:
61     type: string
62     description: Password for AAF client provided as client_id
63     default: 'demo123456!'
64   dmaap_dr_username:
65     type: string
66     description: DMAAP Data Router user name
67     default: 'username'
68   dmaap_dr_password:
69     type: string
70     description: DMAAP Data Router password
71     default: 'password'
72   dcae_location:
73     type: string
74     description: DCAE location for the subscriber, used to set up routing
75     default: 'san-francisco'
76   pm_mapper_service_protocol:
77     type: string
78     description: PM Mapper protocol
79     default: 'https'
80   pm_mapper_service_port:
81     type: string
82     description: PM Mapper host port
83     default: '8443'
84   dmaap_dr_service_host:
85     type: string
86     description: DMAAP Data Router host address
87     default: 'dmaap-dr-node'
88   dmaap_dr_service_port:
89     type: string
90     description: DMAAP Data Router host port
91     default: '8443'
92   dmaap_mr_service_protocol:
93     type: string
94     description: DMAAP Message Router protocol
95     default: 'https'
96   dmaap_mr_service_host:
97     type: string
98     description: DMAAP Message Router host address
99     default: 'message-router'
100   dmaap_mr_service_port:
101     type: string
102     description: DMAAP Message Router host port
103     default: '3905'
104   cpu_limit:
105     type: string
106     default: '1000m'
107   cpu_request:
108     type: string
109     default: '1000m'
110   memory_limit:
111     type: string
112     default: '1024Mi'
113   memory_request:
114     type: string
115     default: '1024Mi'
116
117 node_templates:
118   pm-feed:
119     type: dcaegen2.nodes.Feed
120     properties:
121       feed_name: { get_input: feed_name }
122       useExisting: true
123
124   pm-topic:
125     type: dcaegen2.nodes.Topic
126     properties:
127       topic_name: { get_input: topic_name }
128
129   pm-mapper:
130     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
131     interfaces:
132       cloudify.interfaces.lifecycle:
133         create:
134           inputs:
135             ports:
136               - '8443:0'
137               - '8081:0'
138
139     relationships:
140       - type: dcaegen2.relationships.subscribe_to_files
141         target: pm-feed
142       - type: dcaegen2.relationships.publish_events
143         target: pm-topic
144
145     properties:
146       service_component_type: 'dcae-pm-mapper'
147       service_component_name_override: 'dcae-pm-mapper'
148       application_config:
149         trust_store_path: '/opt/app/pm-mapper/etc/cert/trust.jks'
150         trust_store_pass_path: '/opt/app/pm-mapper/etc/cert/trust.pass'
151         key_store_path: '/opt/app/pm-mapper/etc/cert/cert.jks'
152         key_store_pass_path: '/opt/app/pm-mapper/etc/cert/jks.pass'
153         pm-mapper-filter: { get_input: filter }
154         enable_http: { get_input: enable_http }
155         dmaap_dr_delete_endpoint: { concat: ['https://',{ get_input: dmaap_dr_service_host },':',{ get_input: dmaap_dr_service_port },'/delete'] }
156         aaf_identity: { get_input: client_id }
157         aaf_password: { get_input: client_password }
158         streams_subscribes:
159           dmaap_subscriber:
160             type: data_router
161             dmaap_info: <<pm-feed>>
162         streams_publishes:
163           dmaap_publisher:
164             type: message_router
165             dmaap_info: <<pm-topic>>
166       resource_config:
167         limits:
168           cpu: { get_input: cpu_limit }
169           memory: { get_input: memory_limit }
170         requests:
171           cpu: { get_input: cpu_request }
172           memory: { get_input: memory_request }
173       docker_config:
174         healthcheck:
175           endpoint: /healthcheck
176           interval: 15s
177           timeout: 1s
178           type: https
179       streams_publishes:
180         - name: pm-topic
181           location: { get_input: dcae_location }
182           client_role: { get_input: client_role }
183           type: message-router
184       streams_subscribes:
185         - name: pm-feed
186           location: { get_input: dcae_location }
187           client_role: { get_input: client_role }
188           username: { get_input: dmaap_dr_username }
189           password: { get_input: dmaap_dr_password }
190           scheme: { get_input: pm_mapper_service_protocol }
191           route: delivery
192           delivery_url: ''
193           privileged: true
194           decompress: true
195           type: data_router
196       image: { get_input: tag_version }
197       replicas: { get_input: replicas }
198       log_info:
199         log_directory: '/var/log/ONAP/dcaegen2/services/pm-mapper'
200       tls_info:
201         cert_directory: '/opt/app/pm-mapper/etc/cert/'
202         use_tls: true