blob: c427f8c16a5ad3fd754c8dfdf096268f238ce09c [file] [log] [blame]
Tony Hansen749bc2d2017-10-03 02:51:42 +00001# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2#
3# ============LICENSE_START====================================================
4# org.onap.dcae
5# =============================================================================
6# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7# =============================================================================
8# Licensed under the Apache License, Version 2.0 (the "License");
9# you may not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS,
16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
19# ============LICENSE_END======================================================
20
Michael Hwangc74aad52017-09-11 13:49:15 -040021tosca_definitions_version: cloudify_dsl_1_3
22
23description: >
24 This blueprint is used to install and to uninstall DCAE inventory and DCAE service change
25 handler which are platform services. These applications are Docker containers. This blueprint
26 depends upon the deployment of a Docker host and the deployment of a central postgres that is
27 registered with Consul.
28
29imports:
30 - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
Hansen, Tony (th1395)68765fc2018-04-27 00:37:31 +000031 - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
Lusheng Ji1a5f66b2017-10-10 17:02:52 +000032 - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
Michael Hwangc74aad52017-09-11 13:49:15 -040033
34inputs:
35
36 location_id:
37 description: Location of where to deploy to
38
39 docker_host_override:
40 description: Target docker host to deploy applications to
Michael Hwangae66f942018-04-05 23:50:26 -040041 sdc_address:
Michael Hwangc74aad52017-09-11 13:49:15 -040042 description: SDC host
Michael Hwangae66f942018-04-05 23:50:26 -040043 sdc_uri:
Michael Hwangc74aad52017-09-11 13:49:15 -040044 description: SDC url
Michael Hwangae66f942018-04-05 23:50:26 -040045 sdc_msg_bus_address:
46 description: Message router hostname that SDC will send distribution events through
47 sdc_user:
Michael Hwangc74aad52017-09-11 13:49:15 -040048 description: SDC username
Michael Hwangae66f942018-04-05 23:50:26 -040049 sdc_password:
Michael Hwangc74aad52017-09-11 13:49:15 -040050 description: SDC password
Michael Hwangae66f942018-04-05 23:50:26 -040051 sdc_environment_name:
Michael Hwangc74aad52017-09-11 13:49:15 -040052 description: SDC environment name
Michael Hwangae66f942018-04-05 23:50:26 -040053 sdc_use_secure_https:
Michael Hwang881b4c22017-10-27 15:50:01 -040054 description: Boolean to toggle whether to do certificate validation for https calls to SDC API
55 type: boolean
56 default: false
Michael Hwangae66f942018-04-05 23:50:26 -040057 sdc_use_https_dmaap:
Michael Hwang881b4c22017-10-27 15:50:01 -040058 description: Boolean to toggle whether to use https for calls to message router API
59 type: boolean
60 default: false
Michael Hwangc74aad52017-09-11 13:49:15 -040061
62 postgres_user_inventory:
63 description: Postgres user for inventory
64 postgres_password_inventory:
65 description: Postgres password for inventory
66
67 service_change_handler_image:
68 description: Full uri to service change handler Docker image
69 inventory_image:
70 description: Full uri to inventory Docker image
71
72node_templates:
73
74 service-change-handler:
75 type: dcae.nodes.DockerContainerForPlatforms
76 properties:
77 name:
78 "service-change-handler"
79 application_config:
80 asdcDistributionClient:
Michael Hwangae66f942018-04-05 23:50:26 -040081 asdcAddress: { get_input: sdc_address }
82 asdcUri: { get_input: sdc_uri }
83 msgBusAddress: { get_input: sdc_msg_bus_address }
84 user: { get_input: sdc_user }
85 password: { get_input: sdc_password }
Michael Hwangc74aad52017-09-11 13:49:15 -040086 pollingInterval: 20
87 pollingTimeout: 20
88 consumerGroup: dcae
89 consumerId: dcae-sch
Michael Hwangae66f942018-04-05 23:50:26 -040090 environmentName: { get_input: sdc_environment_name }
Michael Hwangc74aad52017-09-11 13:49:15 -040091 keyStorePath:
92 keyStorePassword:
Michael Hwangae66f942018-04-05 23:50:26 -040093 activateServerTLSAuth: { get_input: sdc_use_secure_https }
94 useHttpsWithDmaap: { get_input: sdc_use_https_dmaap }
Michael Hwangc74aad52017-09-11 13:49:15 -040095 isFilterInEmptyResources: false
96 dcaeInventoryClient:
97 uri: http://inventory:8080
Michael Hwang68b32f42017-10-17 12:14:28 -040098 docker_config:
99 healthcheck:
100 type: "docker"
101 interval: "30s"
102 timeout: "3s"
103 script: "/opt/health.sh"
Michael Hwangc74aad52017-09-11 13:49:15 -0400104 image:
105 { get_input: service_change_handler_image }
106 relationships:
107 - type: cloudify.relationships.depends_on
108 target: inventory
109 - type: dcae.relationships.component_contained_in
110 target: docker_host
111
112 inventory:
113 type: dcae.nodes.DockerContainerForPlatforms
114 properties:
115 name:
116 "inventory"
117 application_config:
118 database:
119 driverClass: org.postgresql.Driver
120 user: { get_input: postgres_user_inventory }
121 password: { get_input: postgres_password_inventory }
Michael Hwang7b5d1872017-09-12 15:12:00 -0400122 # NOTE: The database name here has been changed to the default "postgres" database
123 # to use the private postgres instance and not the central postgres database.
124 url: jdbc:postgresql://pstg-write:5432/postgres
Michael Hwangc74aad52017-09-11 13:49:15 -0400125 properties:
126 charSet: UTF-8
127 maxWaitForConnection: 1s
128 validationQuery: "/* MyService Health Check */ SELECT 1"
129 minSize: 2
130 maxSize: 8
131 initialSize: 2
132 checkConnectionWhileIdle: false
133 evictionInterval: 10s
134 minIdleTime: 1 minute
Michael Hwangc74aad52017-09-11 13:49:15 -0400135 databusControllerConnection:
136 host: databus-controller-hostname
137 port: 8443
138 mechId:
139 password:
140 required: false
141 httpClient:
142 minThreads: 1
143 maxThreads: 128
144 gzipEnabled: false
145 gzipEnabledForRequests: false
146 timeout: 5000milliseconds
147 connectionTimeout: 5000milliseconds
148 docker_config:
149 healthcheck:
150 type: "http"
151 interval: "30s"
152 timeout: "3s"
153 endpoint: "/dcae-service-types"
154 image:
155 { get_input: inventory_image }
156 host_port:
157 8080
158 container_port:
159 8080
160 relationships:
161 - type: dcae.relationships.component_contained_in
162 target: docker_host
Michael Hwang7b5d1872017-09-12 15:12:00 -0400163 - type: cloudify.relationships.depends_on
164 target: postgres
165
166 postgres:
167 type: dcae.nodes.DockerContainer
168 properties:
169 name:
170 "pstg-write"
171 image:
172 "postgres:9.5.2"
173 relationships:
174 - type: dcae.relationships.component_contained_in
175 target: docker_host
176 interfaces:
177 cloudify.interfaces.lifecycle:
178 start:
179 inputs:
180 envs:
181 PGDATA:
182 "/var/lib/postgresql/data/pgdata"
183 POSTGRES_PASSWORD:
184 { get_input: postgres_password_inventory }
185 SERVICE_NAME:
186 "pstg-write"
187 ports:
188 - "5432:5432"
Michael Hwangc74aad52017-09-11 13:49:15 -0400189
190 docker_host:
191 type: dcae.nodes.SelectedDockerHost
192 properties:
193 location_id:
194 { get_input: location_id }
195 docker_host_override:
196 { get_input: docker_host_override }