blob: 3c2963491d447f6378a2492a64defa2772d18909 [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
Tommy Carpenterbe128b22017-09-20 10:52:29 -040021tosca_definitions_version: cloudify_dsl_1_3
22
23description: >
24 This blueprint is for managing the CDAP infrastructure
25
26imports:
27 - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
Lusheng Jiab7883e2017-10-10 14:22:53 +000028 - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/cdapcloudify/14/cdapcloudify_types.yaml
29 - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
Hansen, Tony (th1395)68765fc2018-04-27 00:37:31 +000030 - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
Tommy Carpenterbe128b22017-09-20 10:52:29 -040031
32inputs:
33 location_id:
Tommy Carpenter6d5cbab2017-10-09 12:08:22 -040034 type: string
35 default: ""
Tommy Carpenterbe128b22017-09-20 10:52:29 -040036 cdap_cluster_name:
37 type: string
38 default: "cdap"
Tommy Carpenterbe128b22017-09-20 10:52:29 -040039
40node_templates:
41
42 broker_deleter:
43 #does nothing on install, but deletes all registered apps when broker is uninstalled
44 #uninstalling the broker without doing this leaves them in purgatory forever, unless CDAP was also uninstalled, but that may or may not be true or in the same blueprint.
45 type: dcae.nodes.broker_deleter
Tommy Carpenterbe128b22017-09-20 10:52:29 -040046 interfaces:
47 cloudify.interfaces.lifecycle:
48 delete:
49 inputs:
50 connected_broker_dns_name: { get_property: [cdap_broker, name] }
51 relationships:
52 - type: cloudify.relationships.depends_on
53 target: cdap_broker
54
55 cdap_broker:
56 type: dcae.nodes.DockerContainerForPlatforms
57 properties:
58 name: 'cdap_broker'
59 application_config:
60 bindingttw: 5
61 hcinterval: 60s
62 autoderegisterafter: 10m
63 pipelinehealthlimit: 2
64 host_port: 7777
65 container_port: 7777
66 docker_config:
67 healthcheck:
68 type: "http"
69 #broker has a semi healthcheck endpoint at root right now, TODO would be to add a real /healtcheck endpoint
70 endpoint: "/"
71 interval: "120s"
72 timeout: "60s"
Lusheng Ji4865d6d2017-11-14 22:39:50 -050073 image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.platform.cdapbroker:v4.0.0"
Tommy Carpenterbe128b22017-09-20 10:52:29 -040074 interfaces:
75 cloudify.interfaces.lifecycle:
76 start:
77 inputs:
78 envs:
79 CDAP_CLUSTER_TO_MANAGE: { get_input: cdap_cluster_name }
80 volumes:
81 - host:
82 path: '/tmp/log/cdapbroker/'
83 container:
84 bind: '/tmp/log/cdapbroker/' #Broker EELF log directory
85 mode: 'rw'
86 relationships:
87 - type: dcae.relationships.component_contained_in
88 target: docker_host
89
90 docker_host:
91 type: dcae.nodes.SelectedDockerHost
92 properties:
93 location_id:
94 { get_input: location_id }
95 docker_host_override:
96 'platform_dockerhost'
97 #WARNING: ASSUMES THIS EXISTS AND IS ALREADY REGISTERED