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