blob: 3f96bae5194be3e34b0a0b7cfac9b0ef926b3237 [file] [log] [blame]
Tony Hansena795b592017-09-29 01:15:29 +00001# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
Tony Hansen749bc2d2017-10-03 02:51:42 +00002#
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 Hansena795b592017-09-29 01:15:29 +000020
21tosca_definitions_version: cloudify_dsl_1_3
22
Tony Hansen6b903fe2017-09-29 17:29:52 +000023description: |-
Tony Hansena795b592017-09-29 01:15:29 +000024 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
36imports:
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 Hansen1d013672017-10-06 21:01:05 +000041 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
Tony Hansen6b903fe2017-09-29 17:29:52 +000042 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
Hansen, Tony (th1395)68765fc2018-04-27 00:37:31 +000043 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
Hansen, Tony (th1395)b936fb42018-03-29 14:28:59 +000044 - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
Tony Hansena795b592017-09-29 01:15:29 +000045
46inputs:
Tony Hansena795b592017-09-29 01:15:29 +000047 blueprint_version:
48 type: string
Hansen, Tony (th1395)68765fc2018-04-27 00:37:31 +000049 default: '2018-04-27T00:31:38+0000'
Tony Hansena795b592017-09-29 01:15:29 +000050
51 # pgaas-specific info
52 pgaas_cluster_name:
53 type: string
54 default: pgcl
Tony Hansen6b903fe2017-09-29 17:29:52 +000055 cinder_volume_size:
56 type: string
57 default: 300
Tony Hansena795b592017-09-29 01:15:29 +000058
Tony Hansenf5e39dd2017-10-11 18:08:57 +000059{{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }}
60
Tony Hansena795b592017-09-29 01:15:29 +000061node_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 Hansenf5e39dd2017-10-11 18:08:57 +000072 type: ccsdk.nodes.ssh.keypair
Tony Hansena795b592017-09-29 01:15:29 +000073
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
121outputs:
Tony Hansenf5e39dd2017-10-11 18:08:57 +0000122 blueprint_version:
Tony Hansena795b592017-09-29 01:15:29 +0000123 value: { get_input: blueprint_version }