Installing and Configuring the a9s PostgreSQL for PCF

This topic describes how to install and configure a9s PostgreSQL for Pivotal Cloud Foundry (PCF).

Prerequisites

Before installing a9s PostgreSQL for PCF, ensure that you have installed and configured the products and tiles listed in Requirements.

Install a9s PostgreSQL for PCF

To install a9s PostgreSQL for PCF, perform the following steps:

  1. Download the product file from the Pivotal Network.

  2. Navigate to the Ops Manager Installation Dashboard and click Import a Product to upload the product file.

  3. Click Add next to the uploaded a9s PostgreSQL for PCF tile in the Ops Manager Available Products view to add it to your staging area.

  4. Click the new tile, then click Settings to review the configuration settings for each tab. See the following sections for more information on how to configure the properties on each side-tab:

  5. Click Apply Changes to deploy the service.

After you install the a9s PostgreSQL for PCF, it is available in the list of marketplace services. For more information, see Using a9s MongoDB for PCF.

Assign AZs and Networks

Use Assign AZs and Networks to configure the location of service instance jobs. You should configure your network to balance cluster jobs between as many AZs as possible.

Az and networks

Configure BOSH Errands

Use Errands to configure the BOSH Errands used by a9s PostgreSQL for PCF. For more information, see the Understanding Lifecycle Errands topic.

Post-Deploy Errands

  • Run BOSH Configurator: This errand configures a9s BOSH for PCF so that it can provision PostgreSQL service instances. When enabled, this errand uploads the required releases in the a9s BOSH Director. Disabling this errand may speed up the deployment of all tiles.

    Note: To ensure your configuration remains up-to-date, disable this errand only when necessary.

  • Run Template Uploader: This errand is required to configure generic components that are included in a9s PostgreSQL for PCF with MPostgreSQLongoDB configurations. Disabling this errand may speed up the deployment of all tiles.

    Note: To ensure your configuration remains up-to-date, disable this errand only when necessary.

  • Run Broker Registrar: This errand registers the a9s PostgreSQL for PCF service broker at the Elastic Runtime. This makes the service available in the Elastic Runtime marketplace.

  • Run Smoke Tests: This errand runs a series of basic tests against your a9s PostgreSQL for PCF installation to ensure that it is configured properly. Those tests may take a while, probably over 30 minutes.

Pre-Delete Errands

  • Delete all a9s PostgreSQL instances: This errand deletes all a9s PostgreSQL instances which were created with cf create-service by PCF end users.

    Attention: This is an absolutly destructive task and can’t be undone. All VMs of the service instances will be deleted irrecoverably. In the case a service instance is bound to an app or service keys are existing, the errand will fail.

  • Run Broker Deregistrar: This will deregister the a9s PostgreSQL for PCF service broker in Elastic Runtime. This errand removes the a9s PostgreSQL service from the Elastic Runtime marketplace.

Configure Service Plans

The size and types of VMs used to provision service instances of a given service plan are specified in the IaaS Settings of the a9s BOSH for PCF tile. For more information, see the a9s BOSH for PCF documentation.

Each service plan is defined in the following fields:

Plan Specs Field
postgresql-single-small Virtual Machine
Persistent Disk
Cloud properties for the VM Type Small
Cloud properties for the Disk Type Small
postgresql-cluster-small Virtual Machines
Persistent Disks
Cloud properties for the VM Type Small
Cloud properties for the Disk Type Small
postgresql-single-big Virtual Machine
Persistent Disk
Cloud properties for the VM Type Large
Cloud properties for the Disk Type Big
postgresql-cluster-big Virtual Machines
Persistent Disks
Cloud properties for the VM Type Large
Cloud properties for the Disk Type Big

Configure Stemcells

Use Configure Stemcells enable a different stemcell than the default one. Click Import Stemcell to upload a new stemcell.

Upgrade Existing Service Instances After a Tile Update

This errand automatically updates the stemcell and all provisioned a9s PostgreSQL for PCF service instances to their lastest version after updating the tile.
The errand has to be run manually as explained below.

Note: It is recommended that you run the smoke tests before running this errand.

Note: To use the errand, you must know how to use the Ops Manager Director. For more information, see the Advanced Troubleshooting with the BOSH CLI topic.

  1. SSH into Ops Manager
    $ ssh ubuntu@OPS-MANAGER-FQDN
    Password: ***********
    
  2. Target the BOSH Director
    $ bosh --ca-cert /var/tempest/workspaces/default/root_ca_certificate target OPS-MANAGER-DIRECTOR-IP
    Target set to DIRECTOR_UUID
    
  3. Log into BOSH Director
    $ bosh login
    Your username: director
    Enter password: DIRECTOR_CREDENTIAL
    Logged in as 'director'
    
  4. Locate the a9s PostgreSQL for PCF deployment name.
    $ bosh deployments
    
    The output should look similar to this:
    Acting as user 'director' on 'p-bosh'
    +---------------------------------------------+----------------------------------+-------------
    | Name                                        | Release(s)                       | Stemcell(s)
    +---------------------------------------------+----------------------------------+-------------
    | a9s-bosh-a40c3b10d101faca4fbc               | bosh-aws-cpi/53                  | bosh-vsphere
    | ...
    +---------------------------------------------+----------------------------------+-------------
    | a9s-consul-dns-3f3a49fb941f8c0874cb         | consul/9                         | bosh-vsphere
    | ...
    +---------------------------------------------+----------------------------------+-------------
    | a9s-postgresql-service-94443f82b52dcf333bbd | bosh-configurator-postgresql/8   | bosh-vsphere
    | ...
    +---------------------------------------------+----------------------------------+-------------
    
  5. All deployment manifests are stored in the folder /var/tempest/workspaces/default/deployments/ . Choose the a9s-postgresql-service-... deployment.
    $ bosh deployment /var/tempest/workspaces/default/deployments/a9s-postgresql-service-94443f82b52dcf333bbd.yml
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
    100   352  100   352    0     0  12014      0 --:--:-- --:--:-- --:--:-- 12137
    Deployment set to '/var/tempest/workspaces/default/deployments/a9s-postgresql-service-94443f82b52dcf333bbd.yml'
  6. Run bosh run errand deployment-updater to force a service instances update for all existing a9s PostgreSQL for PCF instances.
    $ bosh run errand deployment-updater
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
    100   352  100   352    0     0  26378      0 --:--:-- --:--:-- --:--:-- 27076
    Acting as user 'director' on deployment 'a9s-postgresql-service-94443f82b52dcf333bbd' on 'p-bosh'
     
    Director task 6533
    Started preparing deployment > Preparing deployment. Done (00:00:01)
     
    ...
     
    Errand 'deployment-updater' completed successfully (exit code 0)
    

    Note: Depending on the number of service instances, the Deployment Updater may take a signification amount of time. While the errand runs, BOSH shows no logging output from the errand.

Create a pull request or raise an issue on the source for this page in GitHub