Installing and Configuring a9s MySQL for PCF

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

Install a9s MySQL for PCF

To install a9s MySQL for PCF, do the following:

  1. Download the product file from Pivotal Network.

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

  3. Click Add or + (depending on the PCF version) next to the uploaded a9s MySQL 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. For more information on how to configure the properties on each side-tab, see the following:

  5. Click Apply Changes to deploy the service.

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

Assign AZs and Networks

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

Assign azs and networks

Plan Configuration

Define the AZ placement where the service instances will be deployed, as well as the VM and persistent disk types.

VM and persistent disk types will be used in the service instance deployments. Disk size and VM size (CPUs and memory) can be configured independently, to create your desired plans, however you must consider that moving from a lager disk to a smaller disk is likely to fail.

Minimum System Requirements

Disk nano: 2 GB Disk small: 5 GB Disk medium: 20 GB Disk large: 50 GB VM nano: 1 CPU, 1 GB RAM, 8 GB Disk VM small: 2 CPU, 2 GB RAM, 4 GB Disk VM medium: 2 CPU, 4 GB RAM, 8 GB Disk VM large: 2 CPU, 8 GB RAM, 30 GB Disk

Plan configuration

Backup Configuration

Use Backup Configuration to configure the backup endpoints. You can choose between a S3 compliant endpoint or an Azure blob store.

Backup configuration


a9s MySQL makes it possible to stream the logs of the service components to a syslog endpoint. This has no effect on the service instances itself.


Service Configuration

At this page a default endpoint for Graphite and syslog can be configured. This endpoint cannot be deleted or updated by the user. For example, for syslog.

Service configuration

Configure Errands

Use Errands to configure the lifecycle errands that run when you install or uninstall a9s MySQL for PCF. The list below describes each errand. For more information, see Understanding Lifecycle Errands.


Post-Deploy Errands

  • Run Template Uploader: This errand is required to configure generic components that are included in a9s MySQL for PCF with MySQL 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 MySQL for PCF service broker with Elastic Runtime. This makes the service available in the Marketplace.

  • Run Smoke Tests: This errand runs a series of basic tests against your a9s MySQL 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 MySQL instances: This errand deletes all a9s MySQL instances which were created with cf create-service by PCF end users.

    WARNING: This is an absolutly destructive task and cannot be undone. All VMs of the service instances will be deleted irrecoverably. If a service instance is bound to an app or service keys are existing, the errand will fail.

  • Run Broker Deregistrar: This will unregisters the a9s MySQL for PCF service broker in Elastic Runtime. This errand removes the a9s MySQL service from the Marketplace.

Configure Resources

You can configure the dimensions of the VMs that host the a9s MySQL for PCF components. This configuration does not cover the dedicated MySQL instances that run on VMs provided by the a9s BOSH tile for PCF. For more information, see Configure Service Plan VMs.

Note: anynines recommends using a VM type of large or greater to support the tile compilation.

Resource config

Update Existing Service Instances

After updating the a9s MySQL for PCF tile, run the Deployment Updater errand to update all provisioned service instances to the new service and stemcell versions.

Note: anynines recommends running the smoke tests before running this errand.

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

  1. SSH into the Ops Manager VM:

    $ ssh ubuntu@OPS-MANAGER-FQDN
    Password: ***********

  2. Log in to the BOSH Director:

    $ bosh login
    Your username: director
    Enter password: DIRECTOR_CREDENTIAL
    Logged in as 'director'

  3. Run bosh deployments and record the name of the a9s MySQL for PCF deployment from the Name column:

    $ bosh deployments
    Using environment '' as client 'ops_manager'

Name Release(s) Stemcell(s) Team(s) Cloud Config a9s-mysql-94443f82b52dcf333bbd a9s-consul/18 bosh-vsphere-esxi-ubuntu-trusty-go_agent/3468.25 - latest ... template-uploader-errand/120 cf-7fcd1f89150a96b381d0 backup-and-restore-sdk/1.2.1 bosh-vsphere-esxi-ubuntu-trusty-go_agent/3468.25 - latest ... uaa/52.7

  1. Run bosh -d a9s-mysql-service-94443f82b52dcf333bbd run errand deployment-updater to force the update for all existing a9s MySQL for PCF instances:
    $ bosh -d a9s-mysql-0476d61a219a39bf0e1b run-errand deployment-updater
    Using environment '' as client 'ops_manager'

Using deployment 'a9s-mysql-0476d61a219a39bf0e1b'

Task 14855

Task 14855 | 12:02:00 | Preparing deployment: Preparing deployment (00:00:00)   ...   Task 14855 Started Tue June 29 12:06:13 UTC 2018 Task 14855 Finished Tue June 29 12:26:22 UTC 2018 Task 14855 Duration 00:01:09 Task 14855 done


Note: Depending on the number of service instances, the Deployment Updater may take significant time to finish running. BOSH shows no logging output while the errand runs.

Trigger Backups and Restores on Demand

PCF administrators can interact with the Backup Manager endpoints to trigger immediate backups and restore backups.

To create a backup, do the following:

  1. Navigate to the Status tab of the tile and record the IP address of one of the a9s Ancillary Service instances.

    Status tab

  2. In the Credentials tab, find the credentials of the service under Backup Manager Password.

  3. Trigger a backup on all instances by calling the /backup_agent/backup_all endpoint:

    $ curl backup:53cr3t@ -d {}
    or on a given instance with its GUID by calling the /backup_agent/backup endpoint:
    $ curl backup:53cr3t@ -d "instance_guid=1c16933a-892f-4fe0-b968-ea0bf90246c9"

To restore, do the following:

  1. Find the ID of the backup and the ID of the instance by listing the instances:

    $ curl backup:53cr3t@
    This command outputs an array composed of objects like this one:
    "restores": [],
    "backups": [
      "backup_agent_task": {
        "updated_at": "2017-05-19T09:01:31.389Z",
        "created_at": "2017-05-19T09:01:16.064Z",
        "status": "done",
        "task_id": 5,
        "id": 5
      "instance_id": 1,
      "id": 5
    "instance_id": "1c16933a-892f-4fe0-b968-ea0bf90246c9",
    "id": 1
    In the example above, backups and restores have been performed for the instance with the instance_id 1c16933a-892f-4fe0-b968-ea0bf90246c9. This ID corresponds to the instance GUID from PCF.

  2. Restore the backup by calling the /backup_agent/restores endpoint with the backup_id and instance_id as data:

    $ curl backup:53cr3t@ -d "backup_id=5" -d "instance_id=1"

Name Resolving With Consul

a9s MySQL for PCF comes with its own highly available Consul cluster for service discovery and service failover procedures.

Consul is a highly available (HA) service discovery and configuration tool, which includes features such as failure detection, an HA key/value store, and an HA DNS service that you can control through a HTTP-based REST interface.

To make use of this feature you must talk to your administrator of your corporates nameservers to setup a delegation of a9s MySQL hostnames. The hostnames of these queries end with a9s-mysql-consul by default and must be delegated to the IP addresses of the consul server within the a9s MySQL tile. To figure out the IP addresses check the status tab of the tile and look for a9s Consul Cluster. Status tab

For general information about Consul, see Consul by HashiCorp.

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