[DCAE] INFO.yaml update
[dcaegen2/platform/blueprints.git] / blueprints / k8s-pgaas-initdb.yaml
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # org.onap.dcae
5 # =============================================================================
6 # Copyright (c) 2017-2020 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
21 tosca_definitions_version: cloudify_dsl_1_3
22
23 description: |-
24   This blueprint is used to take control of a postgres server instance for use by cloudify-managed applications.
25   This blueprint depends upon the deployment of the pgaas_plugin and an existing postgres server instance.
26   This blueprint is part of a suite of three blueprints:
27   k8s-pgaas-initdb takes control of the postgres server instance.
28   k8s-pgaas-database creates a database, roles and credentials associated with the database.
29   k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.
30
31 imports:
32   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
33   - plugin:relationshipplugin?version=1.1.0
34   - plugin:sshkeyshare?version=1.2.0
35   - plugin:pgaas?version=1.3.0
36
37 inputs:
38   blueprint_version:
39     type: string
40     default: '2018-04-27T00:31:38+0000'
41
42   pgaas_cluster_name:
43     type: string
44     default: pghelm
45
46   k8s_pgaas_instance_fqdn:
47     type: string
48
49   k8s_initial_password:
50     type: string
51     default: ''
52
53 node_templates:
54
55   # tie to pgaas_plugin database
56   pgaas_cluster:
57     type: dcae.nodes.pgaas.cluster
58     properties:
59       writerfqdn: { get_input: k8s_pgaas_instance_fqdn }
60       readerfqdn: { get_input: k8s_pgaas_instance_fqdn }
61       initialpassword: { get_input: k8s_initial_password }
62     relationships:
63       - type: dcae.relationships.pgaas_cluster_uses_sshkeypair
64         target: sharedsshkey_pgrs
65
66   sharedsshkey_pgrs:
67     type: dcaegen2.nodes.ssh.keypair
68
69
70 outputs:
71   blueprint_version:
72     value: { get_input: blueprint_version }