[DCAEGEN2] Release dcaegen2-collectors-datafile container
[dcaegen2/collectors/datafile.git] / datafile-app-server / dpo / blueprints / k8s-datafile.yaml
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   changeIdentifier:
60     type: string
61     description: type of different files
62     default: "PM_MEAS_FILES"
63
64 node_templates:
65   bulk_pm_feed:
66     type: ccsdk.nodes.Feed
67     properties:
68       feed_name: { get_input: feedName }
69       feed_description: { get_input: feedDescription }
70
71   datafile-collector:
72     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
73
74     relationships:
75       - type: ccsdk.relationships.publish_files
76         target: bulk_pm_feed
77
78     interfaces:
79       cloudify.interfaces.lifecycle:
80         start:
81           inputs:
82             ports:
83               - concat: ["8100:0"]
84               - concat: ["8433:0"]
85
86     properties:
87       service_component_type: 'dcae-datafile'
88       application_config:
89         dmaap.ftpesConfig.keyCert: "/opt/app/datafile/config/dfc.jks"
90         dmaap.ftpesConfig.keyPassword: "secret"
91         dmaap.ftpesConfig.trustedCa: "/opt/app/datafile/config/ftp.jks"
92         dmaap.ftpesConfig.trustedCaPassword: "secret"
93         dmaap.security.trustStorePath: "/opt/app/datafile/etc/cert/trust.jks"
94         dmaap.security.trustStorePasswordPath: "/opt/app/datafile/etc/cert/trust.pass"
95         dmaap.security.keyStorePath: "/opt/app/datafile/etc/cert/key.p12"
96         dmaap.security.keyStorePasswordPath: "/opt/app/datafile/etc/cert/key.pass"
97         dmaap.security.enableDmaapCertAuth: { get_input: secureEnableCert }
98         dmaap.dmaapProducerConfiguration:
99           changeIdentifier: {get_input: changeIdentifier}
100           feedName: {get_input: feedName}
101         streams_subscribes:
102           dmaap_subscriber:
103             type:
104               "message_router"
105             dmmap_info:
106               topic_url:
107                 { concat: [{ get_input: dmaap_mr_protocol },"://",{ get_input: dmaap_mr_host },
108                            ":",{ get_input: dmaap_mr_port },"/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"]}
109       streams_publishes:
110         - name: bulk_pm_feed
111           type: data_router
112           location: "loc00"
113       docker_config:
114         healthcheck:
115           endpoint: /heartbeat
116           interval: 15s
117           timeout: 1s
118           type: http
119       image:
120         get_input: tag_version
121       replicas: {get_input: replicas}
122       log_info:
123         log_directory: "/var/log/ONAP"
124       tls_info:
125         cert_directory: '/opt/app/datafile/etc/cert/'
126         use_tls: true
127