4 Cloudify PGaaS plugin description and configuraiton # Description The
5 PGaaS plugin allows users to deploy PostgreSQL application databases,
6 and retrieve access credentials for such databases, as part of a
7 Cloudify blueprint. # Plugin Requirements \* Python versions \* 2.7.x \*
8 System dependencies \* psycopg2
10 Note: These requirements apply to the VM where Cloudify Manager itself
13 Note: The psycopg2 requirement is met by running "yum install
14 python-psycopg2" on the Cloudify Manager VM.
16 Note: Cloudify Manager, itself, requires Python 2.7.x (and Centos 7).
21 dcae.nodes.pgaas.cluster
22 ------------------------
24 **Derived From:** cloudify.nodes.Root
28 - ``writerfqdn`` (required string) The FQDN used for read-write access
29 to the cluster containing the postgres database instance. This is
30 used to identify and access a particular database instance and to
31 record information about that instance on Cloudify Manager.
32 - ``use_existing`` (optional boolean default=false) This is used to
33 reference a database instance, in one blueprint, that was deployed in
34 a different one. If it is ``true``, then the ``readerfqdn`` property
35 must not be set and this node must not have any
36 ``dcae.relationships.pgaas_cluster_uses_sshkeypair`` relationships.
37 If it is ``false``, then this node must have exactly one
38 ``dcae.relationships.pgaas_cluster_uses_sshkeypair`` relationship.
39 - ``readerfqdn`` (optional string default=value of ``writerfqdn``) The
40 FQDN used for read-only access to the cluster containing the postgres
41 database instance, if different than the FQDN used for read-write
42 access. This will be used by viewer roles.
44 **Mapped Operations:**
46 - ``cloudify.interfaces.lifecycle.create`` validates and records
47 information about the cluster on the Cloudify Manager server in
48 /opt/manager/resources/pgaas/``writerfqdn``.
49 - ``cloudify.interfaces.lifecycle.delete`` deletes previously recorded
50 information from the Cloudify Manager server.
52 Note: When ``use_existing`` is ``true``, the create operation validates
53 but does not record, and delete does nothing. Delete also does nothing
54 when validation has failed.
56 **Attributes:** This type has no runtime attributes
58 dcae.nodes.pgaas.database
59 -------------------------
61 **Derived From:** cloudify.nodes.Root
63 **Properties:** \* ``name`` (required string) The name of the
64 application database, in postgres. This name is also used to create the
65 names of the roles used to access the database, and the schema made
66 available to users of the database. \* ``use_existing`` (optional
67 boolean default=false) This is used to reference an application
68 database, in one blueprint, that was deployed in a different one. If
69 true, and this node has a
70 dcae.relationships.database\_runson\_pgaas\_cluster relationship, the
71 dcae.nodes.pgaas.cluster node that is the target of that relationship
72 must also have it's ``use_existing`` property set to true. \*
73 ``writerfqdn`` (optional string) This can be used as an alternative to
74 specifying the cluster, for the application database, with a
75 dcae.relationships.database\_runson\_pgaas\_cluster relationship to a
76 dcae.nodes.pgaas.cluster node. Exactly one of the two options must be
77 used. The relationship method must be used if this blueprint is
78 deploying both the cluster and the application database on the cluster.
80 **Mapped Operations:**
82 - ``cloudify.interfaces.lifecycle.create`` creates the application
83 database, and various roles for admin/user/viewer access to it.
84 - ``cloudify.interfaces.lifecycle.delete`` deletes the application
87 Note: When ``use_existing`` is true, create and delete do not create or
88 delete the application database or associated roles. Create still sets
89 runtime attributes (see below).
93 - ``admin`` a dict containing access information for adminstrative
94 access to the application database.
95 - ``user`` a dict containing access information for user access to the
97 - ``viewer`` a dict containing access information for read-only access
98 to the application database.
100 The keys in the access information dicts are as follows:
102 - ``database`` the name of the application database.
103 - ``host`` the appropriate FQDN for accessing the application database,
104 (writerfqdn or readerfqdn, based on the type of access).
105 - ``user`` the user role for accessing the database.
106 - ``password`` the password corresponding to the user role.
111 dcae.relationships.pgaas\_cluster\_uses\_sshkeypair
112 ---------------------------------------------------
114 **Description:** A relationship for binding a dcae.nodes.pgaas.cluster
115 node to the dcae.nodes.ssh.keypair used by the cluster to initialize the
116 database access password for the postgres role. The password for the
117 postgres role is expected to be the hex representation of the MD5 hash
118 of 'postgres' and the contents of the id\_rsa (private key) file for the
119 ssh keypair. A dcae.nodes.pgaas.cluster node must have such a
120 relationship if and only if it's use\_existing property is false. ##
121 dcae.relationships.dcae.relationships.database\_runson\_pgaas\_cluster
122 **Description:** A relationship for binding a dcae.nodes.pgaas.database
123 node to the dcae.nodes.pgaas.cluster node that contains the application
124 database. A dcae.nodes.pgaas.database node must have either such a
125 relationship or a writerfqdn property. The writerfqdn property cannot be
126 used if the cluster is created in the same blueprint as the application
127 database. ## dcae.relationships.application\_uses\_pgaas\_database
128 **Description:** A relationship for binding a node that needs
129 application database access information to the dcae.nodes.pgaas.database
130 node for that application database.