[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 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/3.4/types.yaml"
25   - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml"
26
27 inputs:
28   tag_version:
29     type: string
30     description: Docker image to be used
31     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:latest"
32   replicas:
33     type: integer
34     description: Number of instances
35     default: 1
36   aaf_username:
37     type: string
38     description: AAF user name
39     default: "username"
40   aaf_password:
41     type: string
42     description: AAF password
43     default: "password"
44   client_role:
45     type: string
46     description: Client role to request secure access to topic
47     default: "org.onap.dmaap.mr.PM_MAPPER.pub"
48   client_id:
49     type: string
50     description: Client id for given AAF client
51     default: "dcae@dcae.onap.org"
52   dmaap_dr_username:
53     type: string
54     description: DMAAP Data Router user name
55     default: "username"
56   dmaap_dr_password:
57     type: string
58     description: DMAAP Data Router password
59     default: "password"
60   dcae_location:
61     type: string
62     description: DCAE location for the subscriber, used to set up routing
63     default: "san-francisco"
64   subscriber_id:
65     type: string
66     description: Subscriber id in Data Router
67     default: "1"
68   pm_mapper_service_protocol:
69     type: string
70     description: PM Mapper protocol
71     default: "https"
72   pm_mapper_service_port:
73     type: string
74     description: PM Mapper host port
75     default: "8443"
76   dmaap_dr_service_host:
77     type: string
78     description: DMAAP Data Router host address
79     default: "dmaap-dr-node"
80   dmaap_dr_service_port:
81     type: string
82     description: DMAAP Data Router host port
83     default: "8443"
84   dmaap_mr_service_protocol:
85     type: string
86     description: DMAAP Message Router protocol
87     default: "https"
88   dmaap_mr_service_host:
89     type: string
90     description: DMAAP Message Router host address
91     default: "dmaap-mr"
92   dmaap_mr_service_port:
93     type: string
94     description: DMAAP Message Router host port
95     default: "3905"
96   filter:
97     type: string
98     description: PM Mapper filter on measInfo, measInfoId, measType, instanceId
99     default: { "filters":[]}
100   enable_http:
101     type: boolean
102     description: Option to turn on HTTP connections
103     default: false
104
105 node_templates:
106   pm-mapper:
107     interfaces:
108       cloudify.interfaces.lifecycle:
109         start:
110           inputs:
111             ports:
112               - '8443:0'
113               - '8081:0'
114     properties:
115       application_config:
116         enable_http:
117           { get_input: enable_http }
118         trust_store_path: "/opt/app/pm-mapper/etc/cert/trust.jks.b64"
119         trust_store_pass_path: "/opt/app/pm-mapper/etc/cert/trust.pass"
120         key_store_path: "/opt/app/pm-mapper/etc/cert/cert.jks.b64"
121         key_store_pass_path: "/opt/app/pm-mapper/etc/cert/jks.pass"
122         dmaap_dr_feed_name: "bulk_pm_feed"
123         dmaap_dr_delete_endpoint:
124           { concat: ["https://", { get_input: dmaap_dr_service_host },
125                      ":", { get_input: dmaap_dr_service_port},"/delete"]}
126         pm-mapper-filter:
127           get_input: filter
128         streams_subscribes:
129           dmaap_subscriber:
130             type:
131               "data_router"
132             dmaap_info:
133               username:
134                 get_input: dmaap_dr_username
135               password:
136                 get_input: dmaap_dr_password
137               location:
138                 get_input: dcae_location
139               subscriber_id:
140                 get_input: subscriber_id
141               delivery_url:
142                 { concat: [{ get_input: pm_mapper_service_protocol },"://dcae-pm-mapper:",{ get_input: pm_mapper_service_port },"/delivery"]}
143         streams_publishes:
144           dmaap_publisher:
145             aaf_username:
146               get_input: aaf_username
147             aaf_password:
148               get_input: aaf_password
149             type:
150               "message_router"
151             dmaap_info:
152               client_role:
153                 get_input: client_role
154               client_id:
155                 get_input: client_id
156               topic_url:
157                 { concat: [{ get_input: dmaap_mr_service_protocol },"://",{ get_input: dmaap_mr_service_host },
158                            ":",{ get_input: dmaap_mr_service_port },"/events/PM_MAPPER"]}
159               location:
160                 get_input: dcae_location
161       docker_config:
162         healthcheck:
163           endpoint: /healthcheck
164           interval: 15s
165           timeout: 1s
166           type: https
167       image:
168         get_input: tag_version
169       replicas: { get_input: replicas }
170       name: "dcae-pm-mapper"
171       dns_name: "dcae-pm-mapper"
172       log_info:
173         log_directory: "/var/log/ONAP/dcaegen2/services/pm-mapper"
174       tls_info:
175         cert_directory: "/opt/app/pm-mapper/etc/cert/"
176         use_tls: true
177     type: dcae.nodes.ContainerizedPlatformComponent