Tony Hansen | 749bc2d | 2017-10-03 02:51:42 +0000 | [diff] [blame] | 1 | # -*- 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 Carpenter | be128b2 | 2017-09-20 10:52:29 -0400 | [diff] [blame] | 21 | tosca_definitions_version: cloudify_dsl_1_3 |
| 22 | |
| 23 | description: > |
| 24 | This blueprint is for managing the CDAP infrastructure |
| 25 | |
| 26 | imports: |
| 27 | - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml |
Lusheng Ji | ab7883e | 2017-10-10 14:22:53 +0000 | [diff] [blame] | 28 | - {{ 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) | 68765fc | 2018-04-27 00:37:31 +0000 | [diff] [blame] | 30 | - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml |
Tommy Carpenter | be128b2 | 2017-09-20 10:52:29 -0400 | [diff] [blame] | 31 | |
| 32 | inputs: |
| 33 | location_id: |
Tommy Carpenter | 6d5cbab | 2017-10-09 12:08:22 -0400 | [diff] [blame] | 34 | type: string |
| 35 | default: "" |
Tommy Carpenter | be128b2 | 2017-09-20 10:52:29 -0400 | [diff] [blame] | 36 | cdap_cluster_name: |
| 37 | type: string |
| 38 | default: "cdap" |
Tommy Carpenter | be128b2 | 2017-09-20 10:52:29 -0400 | [diff] [blame] | 39 | |
| 40 | node_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 Carpenter | be128b2 | 2017-09-20 10:52:29 -0400 | [diff] [blame] | 46 | 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 Ji | 4865d6d | 2017-11-14 22:39:50 -0500 | [diff] [blame] | 73 | image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.platform.cdapbroker:v4.0.0" |
Tommy Carpenter | be128b2 | 2017-09-20 10:52:29 -0400 | [diff] [blame] | 74 | 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 |