PostgreSQL as a Service
-============
+=======================
PostgreSQL as a Service (PGaaS) comes in two flavors: all-in-one blueprint, and
separate disk/cluster/database blueprints to separate the management of
the lifetime of those constituent parts. Both are provided for use.
Why Three Flavors?
-------------
+------------------
The reason there are three flavors of blueprints lays in the difference in
lifetime management of the constituent parts and the number of VMs created.
of the applications that are writing to it or reading from it.
Blueprint Files
-------------
+---------------
The Blueprints for PG Services and Cinder
-^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The all-in-one blueprint ``pgaas.yaml`` assumes that the PG servers and Cinder volumes can be allocated and
deallocated together. The ``pgaas.yaml`` blueprint creates a cluster of two VMs named "``pstg``" by default.
redeployed without affecting the data on the Cinder volumes.
The Blueprints for Databases
-^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``pgaas-database.yaml`` blueprint shows how a database can be created separately from any application
that uses it. That database will remain present until the pgaas-database.yaml blueprint is
What is Created by the Blueprints
-^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Each PostgreSQL cluster has a name, represented below as ``${CLUSTER}`` or ``CLNAME``. Each cluster is created
with two VMs, one VM used for the writable master and the other as a cascaded read-only secondary.
To install the PostgreSQL as a Service
-^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Installing the all-in-one blueprint is straightforward: