Update blueprints to use k8splugin 3.4.3
[dcaegen2/platform/blueprints.git] / blueprints / k8s-bbs-event-processor.yaml
1 # ============LICENSE_START====================================================\r
2 # =============================================================================\r
3 # Copyright (c) 2019 AT&T, NOKIA\r
4 # =============================================================================\r
5 # Licensed under the Apache License, Version 2.0 (the "License");\r
6 # you may not use this file except in compliance with the License.\r
7 # You may obtain a copy of the License at\r
8 #\r
9 #      http://www.apache.org/licenses/LICENSE-2.0\r
10 #\r
11 # Unless required by applicable law or agreed to in writing, software\r
12 # distributed under the License is distributed on an "AS IS" BASIS,\r
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 # See the License for the specific language governing permissions and\r
15 # limitations under the License.\r
16 # ============LICENSE_END======================================================\r
17 \r
18 tosca_definitions_version: cloudify_dsl_1_3\r
19 \r
20 imports:\r
21   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml\r
22   - plugin:k8splugin?version=3.4.3\r
23 \r
24 inputs:\r
25   aai_enrichment_host:\r
26     type: string\r
27     default: "aai.onap"\r
28   aai_enrichment_port:\r
29     type: integer\r
30     default: 8443\r
31   aai_enrichment_protocol:\r
32     type: string\r
33     default: "https"\r
34   aai_secure_enable_cert:\r
35     type: boolean\r
36     description: enable certificates-based connection with AAI\r
37     default: true\r
38   tag_version:\r
39     type: string\r
40     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:2.0.0"\r
41   replicas:\r
42     type: integer\r
43     description: number of instances\r
44     default: 1\r
45   pnf_reregistration_url:\r
46     type: string\r
47     default: "https:message-router:3905/events/unauthenticated.PNF_UPDATE"\r
48   cpe_authentication_url:\r
49     type: string\r
50     default: "https:message-router:3905/events/unauthenticated.CPE_AUTHENTICATION"\r
51   close_loop_url:\r
52     type: string\r
53     default: "https:message-router:3905/events/unauthenticated.DCAE_CL_OUTPUT"\r
54   application_policy_version:\r
55     description: Policy version value for building CL events\r
56     type: string\r
57     default: "1.0.0.5"\r
58   application_cl_target_type:\r
59     description: Close Loop target type value for building CL events\r
60     type: string\r
61     default: "VM"\r
62   application_cl_event_status:\r
63     description: Close Loop event status value for building CL events\r
64     type: string\r
65     default: "ONSET"\r
66   application_cl_version:\r
67     description: Close Loop version value for building CL events\r
68     type: string\r
69     default: "1.0.2"\r
70   application_cl_target:\r
71     description: Close Loop target value for building CL events\r
72     type: string\r
73     default: "vserver.vserver-name"\r
74   application_cl_originator:\r
75     description: Close Loop originator value for building CL events\r
76     type: string\r
77     default: "DCAE-BBS-ep"\r
78   application_rereg_policy_scope:\r
79     description: Policy Scope value for building PNF relocation CL event\r
80     type: string\r
81     default: "policyScopeReReg"\r
82   application_rereg_cl_control_name:\r
83     description: Close Loop control name value for building PNF relocation CL event\r
84     type: string\r
85     default: "clControlNameReReg"\r
86   application_cpeAuth_policy_scope:\r
87     description: Policy Scope value for building CPE Authentication CL event\r
88     type: string\r
89     default: "policyScopeCpeAuth"\r
90   application_cpeAuth_cl_control_name:\r
91     description: Close Loop control name value for building CPE Authentication CL event\r
92     type: string\r
93     default: "clControlNameCpeAuth"\r
94   application_cbs_polling_interval_sec:\r
95     type: integer\r
96     default: 120\r
97   application_logging_level:\r
98     type: string\r
99     default: "INFO"\r
100   dmaap_username:\r
101     type: string\r
102     default: "admin"\r
103   dmaap_password:\r
104     type: string\r
105     default: "admin"\r
106   dmaap_consumer_id:\r
107     type: string\r
108     default: "c12"\r
109   dmaap_consumer_group:\r
110     type: string\r
111     default: "OpenDcae-c12"\r
112   dmaap_secure_enable_cert:\r
113     type: boolean\r
114     description: enable certificates-based connection with DMaaP\r
115     default: true\r
116   internal_port:\r
117     type: string\r
118     description: Internal port on which BBS-ep is exposed\r
119     default: "8100"\r
120   external_port:\r
121     type: string\r
122     description: External port on which BBS-ep is exposed\r
123     default: "30413"\r
124 node_templates:\r
125   bbs-event-processor:\r
126     type: dcae.nodes.ContainerizedServiceComponent\r
127     properties:\r
128       application_config:\r
129         streams_subscribes:\r
130           pnf_reregistration:\r
131             type: message_router\r
132             aaf_username: { get_input: dmaap_username }\r
133             aaf_password: { get_input: dmaap_password }\r
134             dmaap_info:\r
135               topic_url: { get_input: pnf_reregistration_url }\r
136           cpe_authentication:\r
137             type: message_router\r
138             aaf_username: { get_input: dmaap_username }\r
139             aaf_password: { get_input: dmaap_password }\r
140             dmaap_info:\r
141               topic_url: { get_input: cpe_authentication_url }\r
142         streams_publishes:\r
143           close_loop:\r
144             type: message_router\r
145             aaf_username: { get_input: dmaap_username }\r
146             aaf_password: { get_input: dmaap_password }\r
147             dmaap_info:\r
148               topic_url: { get_input: close_loop_url }\r
149         dmaap.protocol: "https"\r
150         dmaap.contentType: "application/json"\r
151         dmaap.consumer.consumerId: { get_input: dmaap_consumer_id }\r
152         dmaap.consumer.consumerGroup: { get_input: dmaap_consumer_group }\r
153         dmaap.messageLimit: -1\r
154         dmaap.timeoutMs: -1\r
155         aai.host: { get_input: aai_enrichment_host }\r
156         aai.port: { get_input: aai_enrichment_port }\r
157         aai.protocol: { get_input: aai_enrichment_protocol }\r
158         aai.username: "AAI"\r
159         aai.password: "AAI"\r
160         aai.aaiIgnoreSslCertificateErrors: true\r
161         application.pipelinesPollingIntervalSec: 25\r
162         application.pipelinesTimeoutSec: 15\r
163         application.cbsPollingIntervalSec: { get_input: application_cbs_polling_interval_sec }\r
164         application.policyVersion: { get_input: application_policy_version }\r
165         application.clTargetType: { get_input: application_cl_target_type }\r
166         application.clEventStatus: { get_input: application_cl_event_status }\r
167         application.clVersion: { get_input: application_cl_version }\r
168         application.clTarget: { get_input: application_cl_target }\r
169         application.clOriginator: { get_input: application_cl_originator }\r
170         application.reregistration.policyScope: { get_input: application_rereg_policy_scope }\r
171         application.reregistration.clControlName: { get_input: application_rereg_cl_control_name }\r
172         application.cpe.authentication.policyScope: { get_input: application_cpeAuth_policy_scope }\r
173         application.cpe.authentication.clControlName: { get_input: application_cpeAuth_cl_control_name }\r
174         application.reregistration.configKey: "pnf_reregistration"\r
175         application.cpeAuth.configKey: "cpe_authentication"\r
176         application.closeLoop.configKey: "close_loop"\r
177         application.loggingLevel: { get_input: application_logging_level }\r
178         application.ssl.keyStorePath: "/opt/app/bbs-event-processor/etc/cert/cert.jks"\r
179         application.ssl.keyStorePasswordPath: "/opt/app/bbs-event-processor/etc/cert/jks.pass"\r
180         application.ssl.trustStorePath: "/opt/app/bbs-event-processor/etc/cert/trust.jks"\r
181         application.ssl.trustStorePasswordPath: "/opt/app/bbs-event-processor/etc/cert/trust.pass"\r
182         application.ssl.enableAaiCertAuth: { get_input: aai_secure_enable_cert }\r
183         application.ssl.enableDmaapCertAuth: { get_input: dmaap_secure_enable_cert }\r
184       docker_config:\r
185         healthcheck:\r
186           endpoint: /heartbeat\r
187           interval: 180s\r
188           timeout: 5s\r
189           type: http\r
190       image:\r
191         { get_input: tag_version }\r
192       replicas: {get_input: replicas}\r
193       service_component_type: 'bbs-event-processor'\r
194       log_info:\r
195         log_directory: "/opt/app/bbs-event-processor/logs"\r
196       tls_info:\r
197         cert_directory: '/opt/app/bbs-event-processor/etc/cert'\r
198         use_tls: true\r
199     interfaces:\r
200       cloudify.interfaces.lifecycle:\r
201         start:\r
202           inputs:\r
203             ports:\r
204               - concat: [{get_input: internal_port},":",{get_input: external_port}]\r