enable dfc blueprint to get dynamic configurtions
[dcaegen2/platform/blueprints.git] / blueprints / reference_templates / k8s-datafile-collector.yaml-template
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # =============================================================================
5 # Copyright (c) 2018-2019 AT&T Intellectual Property, 2019 Nordix Foundation. All rights reserved.
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.13/k8splugin_types.yaml"
25   - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml"
26
27 inputs:
28   dmaap_mr_host:
29     type: string
30     description: dmaap messagerouter host
31     default: message-router.onap.svc.cluster.local
32   dmaap_mr_port:
33     type: integer
34     description: dmaap messagerouter port
35     default: 3904
36   dmaap_mr_protocol:
37     type: string
38     description: dmaap messagerouter protocol
39     default: "http"
40   tag_version:
41     type: string
42     description: DFC image tag/version
43     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.2.0"
44   replicas:
45     type: integer
46     description: number of instances
47     default: 1
48   secureEnableCert:
49     type: boolean
50     description: enable certificate base connection with PNF and DMaap
51     default: false
52   feedName:
53     type: string
54     description: feed name for dmaap producerconfiguration
55     default: "bulk_pm_feed"
56   feedDescription:
57     type: string
58     default: "Feed for Bulk PM files"
59
60 node_templates:
61   bulk_pm_feed:
62     type: ccsdk.nodes.Feed
63     properties:
64       feed_name: { get_input: feedName }
65       feed_description: { get_input: feedDescription }
66
67   datafile-collector:
68     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
69
70     relationships:
71       - type: ccsdk.relationships.publish_files
72         target: bulk_pm_feed
73
74     interfaces:
75       cloudify.interfaces.lifecycle:
76         start:
77           inputs:
78             ports:
79               - concat: ["8100:0"]
80               - concat: ["8433:0"]
81
82     properties:
83       service_component_type: 'dcae-datafile'
84       application_config:
85         dmaap.ftpesConfig.keyCert: "/opt/app/datafile/config/dfc.jks"
86         dmaap.ftpesConfig.keyPassword: "secret"
87         dmaap.ftpesConfig.trustedCa: "/opt/app/datafile/config/ftp.jks"
88         dmaap.ftpesConfig.trustedCaPassword: "secret"
89         dmaap.security.trustStorePath: "/opt/app/datafile/etc/cert/trust.jks"
90         dmaap.security.trustStorePasswordPath: "/opt/app/datafile/etc/cert/trust.pass"
91         dmaap.security.keyStorePath: "/opt/app/datafile/etc/cert/key.p12"
92         dmaap.security.keyStorePasswordPath: "/opt/app/datafile/etc/cert/key.pass"
93         dmaap.security.enableDmaapCertAuth: { get_input: secureEnableCert }
94         streams_publishes:
95           PM_MEAS_FILES:
96             dmaap_info: <<bulk_pm_feed>>
97             type: data_router
98         streams_subscribes:
99           dmaap_subscriber:
100             type:
101               "message_router"
102             dmaap_info:
103               topic_url:
104                 { concat: [{ get_input: dmaap_mr_protocol },"://",{ get_input: dmaap_mr_host },
105                            ":",{ get_input: dmaap_mr_port },"/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"]}
106       streams_publishes:
107         - name: bulk_pm_feed
108           type: data_router
109           location: "loc00"
110       docker_config:
111         healthcheck:
112           endpoint: /heartbeat
113           interval: 15s
114           timeout: 1s
115           type: http
116       image:
117         get_input: tag_version
118       replicas: {get_input: replicas}
119       log_info:
120         log_directory: "/var/log/ONAP"
121       tls_info:
122         cert_directory: '/opt/app/datafile/etc/cert/'
123         use_tls: true
124