Merge "Update Cloudify types file version"
[dcaegen2/services/pm-mapper.git] / dpo / blueprints / k8s-pm-mapper.yaml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 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/R5/k8splugin/1.6.0/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
103 node_templates:
104   pm-feed:
105     type: ccsdk.nodes.Feed
106     properties:
107       feed_name: { get_input: feed_name }
108
109   pm-topic:
110     type: ccsdk.nodes.Topic
111     properties:
112       topic_name: { get_input: topic_name }
113
114   pm-mapper:
115     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
116     interfaces:
117       cloudify.interfaces.lifecycle:
118         create:
119           inputs:
120             ports:
121               - '8443:0'
122               - '8081:0'
123
124     relationships:
125       - type: ccsdk.relationships.subscribe_to_files
126         target: pm-feed
127       - type: ccsdk.relationships.publish_events
128         target: pm-topic
129
130     properties:
131       service_component_type: 'dcae-pm-mapper'
132       service_component_name_override: 'dcae-pm-mapper'
133       application_config:
134         trust_store_path: '/opt/app/pm-mapper/etc/cert/trust.jks.b64'
135         trust_store_pass_path: '/opt/app/pm-mapper/etc/cert/trust.pass'
136         key_store_path: '/opt/app/pm-mapper/etc/cert/cert.jks.b64'
137         key_store_pass_path: '/opt/app/pm-mapper/etc/cert/jks.pass'
138         pm-mapper-filter: { get_input: filter }
139         enable_http: { get_input: enable_http }
140         dmaap_dr_delete_endpoint: { concat: ['https://',{ get_input: dmaap_dr_service_host },':',{ get_input: dmaap_dr_service_port },'/delete'] }
141         aaf_identity: { get_input: client_id }
142         aaf_password: { get_input: client_password }
143         streams_subscribes:
144           dmaap_subscriber:
145             type: data_router
146             dmaap_info: <<pm-feed>>
147         streams_publishes:
148           dmaap_publisher:
149             type: message_router
150             dmaap_info: <<pm-topic>>
151       docker_config:
152         healthcheck:
153           endpoint: /healthcheck
154           interval: 15s
155           timeout: 1s
156           type: https
157       streams_publishes:
158         - name: pm-topic
159           location: { get_input: dcae_location }
160           client_role: { get_input: client_role }
161           type: message-router
162       streams_subscribes:
163         - name: pm-feed
164           location: { get_input: dcae_location }
165           client_role: { get_input: client_role }
166           username: { get_input: dmaap_dr_username }
167           password: { get_input: dmaap_dr_password }
168           scheme: { get_input: pm_mapper_service_protocol }
169           route: delivery
170           delivery_url: ''
171           privileged: true
172           decompress: true
173           type: data_router
174       image: { get_input: tag_version }
175       replicas: { get_input: replicas }
176       log_info:
177         log_directory: '/var/log/ONAP/dcaegen2/services/pm-mapper'
178       tls_info:
179         cert_directory: '/opt/app/pm-mapper/etc/cert/'
180         use_tls: true