debe95db96bf4bcbbe113acc3418426e5e1ec8da
[dcaegen2/platform/blueprints.git] / blueprints / k8s-datalake-des.yaml
1 # ============LICENSE_START====================================================
2 # =============================================================================
3 # Copyright (C) 2020 China Mobile
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 # ============LICENSE_END======================================================
17 #author: Kai Lu (lukai@chinamobile.com)
18 tosca_definitions_version: cloudify_dsl_1_3
19 imports:
20   - "https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml"
21   - plugin:k8splugin?version=3.4.2
22 inputs:
23   service_name:
24     type: string
25     default: 'dcae-des'
26   mariadb_address:
27     type: string
28     description: MariaDB URL
29     default: "mariadb-galera"
30   mariadb_port:
31     type: string
32     description: MariaDB port
33     default: "3306"
34   db_username:
35     type: string
36     description: MariaDB Username
37     default: "root"
38   db_password:
39     description: MariaDB password
40     type: string
41     default: "secretpassword"
42   presto_address:
43     type: string
44     description: Presto URL
45     default: "dl-presto"
46   presto_port:
47     type: string
48     description: Presto port
49     default: "9000"
50   presto_username:
51     type: string
52     description: Presto Username
53     default: "user"
54   presto_password:
55     description: Presto password
56     type: string
57     default: "test"
58   image_name:
59     description: des image URL.
60     type: string
61     default: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.datalake.exposure.service:1.1.0
62   dl_hostname:
63     type: string
64     description: dl default des_hostname
65     default: k8s-des
66   container_port:
67     type: string
68     description: exposed container port
69     default: "1681"
70   host_port:
71     type: string
72     description: external port
73     default: "30409"
74 node_templates:
75   datalake:
76     type: dcae.nodes.ContainerizedServiceComponent
77     interfaces:
78       cloudify.interfaces.lifecycle:
79         start:
80           inputs:
81             ports:
82               - '1681:0'
83               - concat: [{get_input: container_port},":",{get_input: host_port}]
84             envs:
85               MYSQL_HOST:
86                 get_input: mariadb_address
87               MYSQL_PORT:
88                 get_input: mariadb_port
89               MYSQL_ROOT_PASSWORD:
90                 get_input: db_password
91               PRESTO_HOST:
92                 get_input: presto_address
93               PRESTO_PORT:
94                 get_input: presto_port
95               PRESTO_USER:
96                 get_input: presto_username
97               PRESTO_PASSWORD:
98                 get_input: presto_password
99     properties:
100       application_config:
101         MYSQL_HOST:
102           get_input: mariadb_address
103         MYSQL_PORT:
104           get_input: mariadb_port
105         MYSQL_ROOT_PASSWORD:
106           get_input: db_password
107         PRESTO_HOST:
108           get_input: presto_address
109         PRESTO_PORT:
110           get_input: presto_port
111         PRESTO_USER:
112           get_input: presto_username
113         PRESTO_PASSWORD:
114           get_input: presto_password
115         HOSTNAME:
116           get_input: dl_hostname
117       image:
118           get_input: image_name
119       docker_config:
120         healthcheck:
121           interval: 90s
122           timeout: 10s
123           type: http
124           endpoint: /datalake/v1/exposure
125       service_component_type: 'dcae-des'
126       service_id: 'dcae-des'
127       service_component_name_override: 'dcae-des'