Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 1 | # -*- indent-tabs-mode: nil -*- # vi: set expandtab: |
Tony Hansen | 749bc2d | 2017-10-03 02:51:42 +0000 | [diff] [blame] | 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====================================================== |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 20 | |
| 21 | tosca_definitions_version: cloudify_dsl_1_3 |
| 22 | |
Tony Hansen | 6b903fe | 2017-09-29 17:29:52 +0000 | [diff] [blame] | 23 | description: |- |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 24 | This blueprint is used to install and to uninstall the cinder volumes for |
| 25 | a central postgres as a platform service. |
| 26 | This blueprint depends upon the deployment of Consul and the pgaas_plugin. |
| 27 | This blueprint is part of a suite of three blueprints that allow a PGaaS |
| 28 | cluster to be created that has persistent databases stored in Cinder. |
| 29 | pgaas-disk allocates the cinder volumes. It must be run first. |
| 30 | pgaas-cluster creates the PG service and attaches the cinder volumes. It must be run second. |
| 31 | pgaas-database creates a database. It must be run third, for each persistent database. |
| 32 | If the cluster is uninstalled, the persistent databases are unaffected. |
| 33 | If a database blueprint is uninstalled, the persistent database goes away. |
| 34 | If the disk blueprint is uninstalled, all persistent databases go away, along with the server instance. |
| 35 | |
| 36 | imports: |
| 37 | - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml |
| 38 | - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml |
| 39 | - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml |
| 40 | |
Tony Hansen | 1d01367 | 2017-10-06 21:01:05 +0000 | [diff] [blame] | 41 | - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml" |
Tony Hansen | 6b903fe | 2017-09-29 17:29:52 +0000 | [diff] [blame] | 42 | - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml" |
Hansen, Tony (th1395) | 68765fc | 2018-04-27 00:37:31 +0000 | [diff] [blame] | 43 | - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml" |
Hansen, Tony (th1395) | b936fb4 | 2018-03-29 14:28:59 +0000 | [diff] [blame] | 44 | - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml" |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 45 | |
| 46 | inputs: |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 47 | blueprint_version: |
| 48 | type: string |
Hansen, Tony (th1395) | 68765fc | 2018-04-27 00:37:31 +0000 | [diff] [blame] | 49 | default: '2018-04-27T00:31:38+0000' |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 50 | |
| 51 | # pgaas-specific info |
| 52 | pgaas_cluster_name: |
| 53 | type: string |
| 54 | default: pgcl |
Tony Hansen | 6b903fe | 2017-09-29 17:29:52 +0000 | [diff] [blame] | 55 | cinder_volume_size: |
| 56 | type: string |
| 57 | default: 300 |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 58 | |
Tony Hansen | f5e39dd | 2017-10-11 18:08:57 +0000 | [diff] [blame] | 59 | {{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }} |
| 60 | |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 61 | node_templates: |
| 62 | key_pair: |
| 63 | type: cloudify.openstack.nodes.KeyPair |
| 64 | properties: |
| 65 | private_key_path: { get_input: key_filename } |
| 66 | use_external_resource: True |
| 67 | resource_id: { get_input: keypair } |
| 68 | openstack_config: &open_conf |
| 69 | get_input: openstack |
| 70 | |
| 71 | sharedsshkey_pgrs: |
Tony Hansen | f5e39dd | 2017-10-11 18:08:57 +0000 | [diff] [blame] | 72 | type: ccsdk.nodes.ssh.keypair |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 73 | |
| 74 | private_net: |
| 75 | type: cloudify.openstack.nodes.Network |
| 76 | properties: |
| 77 | use_external_resource: True |
| 78 | resource_id: { get_input: private_net } |
| 79 | openstack_config: *open_conf |
| 80 | |
| 81 | security_group: |
| 82 | type: cloudify.openstack.nodes.SecurityGroup |
| 83 | properties: |
| 84 | use_external_resource: True |
| 85 | resource_id: { get_input: security_group } |
| 86 | openstack_config: *open_conf |
| 87 | |
| 88 | volume_pgrs00: |
| 89 | type: cloudify.openstack.nodes.Volume |
| 90 | properties: |
| 91 | resource_id: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00' ] } |
| 92 | openstack_config: *open_conf |
| 93 | interfaces: |
| 94 | cloudify.interfaces.lifecycle: |
| 95 | create: |
| 96 | inputs: |
| 97 | args: |
| 98 | size: { get_input: cinder_volume_size } |
| 99 | |
| 100 | volume_pgrs01: |
| 101 | type: cloudify.openstack.nodes.Volume |
| 102 | properties: |
| 103 | resource_id: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01' ] } |
| 104 | openstack_config: *open_conf |
| 105 | interfaces: |
| 106 | cloudify.interfaces.lifecycle: |
| 107 | create: |
| 108 | inputs: |
| 109 | args: |
| 110 | size: { get_input: cinder_volume_size } |
| 111 | |
| 112 | pgaas_cluster: |
| 113 | type: dcae.nodes.pgaas.cluster |
| 114 | properties: |
| 115 | writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] } |
| 116 | readerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '.', { get_input: location_domain } ] } |
| 117 | relationships: |
| 118 | - type: dcae.relationships.pgaas_cluster_uses_sshkeypair |
| 119 | target: sharedsshkey_pgrs |
| 120 | |
| 121 | outputs: |
Tony Hansen | f5e39dd | 2017-10-11 18:08:57 +0000 | [diff] [blame] | 122 | blueprint_version: |
Tony Hansen | a795b59 | 2017-09-29 01:15:29 +0000 | [diff] [blame] | 123 | value: { get_input: blueprint_version } |