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