LATEST VERSION: 2.0 - CHANGELOG
MySQL for PCF v2.0

Installing and Configuring MySQL for PCF

This topic provides instructions to operators of Pivotal Cloud Foundry (PCF) about how to install, configure, and deploy the MySQL for PCF v2.0 tile. The MySQL for PCF v2.0 service lets PCF developers create and use their own MySQL service instances on demand.

Prepare Your Ops Manager and PCF Installation for MySQL for PCF

Before you download and install the MySQL for PCF tile, complete the following procedures:

Create an Application Security Group for MySQL for PCF

To allow the MySQL for PCF service to have network access, you must create an Application Security Group (ASG). Creating an ASG enables apps running in Cloud Foundry external access to communicate with the MySQL service network.

The example below follows this procedure to create an ASG.

To create an ASG for MySQL for PCF, do the following:

  1. Navigate to the Ops Manager Installation Dashboard and click the Ops Manager Director tile.

  2. Click Create Networks.
    Create Networks page

  3. Find the network that has Service Network checked, and find the CIDR that you can use in your ASGs.
    Reserved IP Ranges

  4. Using the CIDR that you found in the above step, create a JSON file mysql-asg.json with the configuration below:

    [
      {
        "protocol": "tcp",
        "destination": "CIDR",
        "ports": "3306"
      }
    ]
    
  5. Use the CF CLI and the JSON file that you created to create an ASG called p.mysql:

    $ cf create-security-group p.mysql ./mysql-asg.json
    
  6. Bind the ASG to the appropriate space or, to give all started apps access, bind to the default-running ASG set:

    $ cf bind-running-security-group p.mysql
    

Enable the Ops Manager Resurrector

The Ops Manager Resurrector increases the availability of MySQL for PCF by restarting and resuming MySQL service in the following ways:

  • Reacts to hardware failure and network disruptions by restarting VMs on active, stable hosts
  • Detects operating system failures by continuously monitoring VMs and restarting them as required
  • Continuously monitors the BOSH Agent running on each service instance VM and restarts the VM as required

Pivotal recommends enabling the Ops Manager Resurrector when installing MySQL for PCF. To enable the Ops Manager Resurrector, do the following:

  1. Navigate to the Ops Manager Installation Dashboard and click the Ops Manager Director tile.

  2. Click Director Config.

  3. Select the Enable VM Resurrector Plugin checkbox.

  4. Click Save.

For general information about the Ops Manager Resurrector, see Using Ops Manager Resurrector

Download and Install the Tile

  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. Under the Import a Product button, click + next to the version number of MySQL for PCF. This adds the tile to your staging area.

  4. Click the newly-added MySQL for PCF tile to open its configuration panes.

    AZ and Network Assignments pane

Configure the Tile

Follow the steps below to configure the MySQL for PCF service. MySQL for PCF v2.0 has five service plans that deploy dedicated MySQL service instances on demand.

By default, MySQL for PCF has three active plans. The fourth and fifth plans are not active by default.

Important:In order to re-define plans later, you must leave broker de-registrar checked.

Configure AZs and Networks

Follow the steps below to choose an Availability Zone (AZ) to run the service broker and to select networks.

  1. Click Assign AZs and Networks.

  2. Configure the fields as follows:

    FieldInstructions
    Place singleton jobs in Select the AZ that you want the MySQL broker VM to run in. The broker runs as a singleton job.
    Balance other jobs in Ignore; not used.
    Network Select a subnet for the MySQL broker. This is typically the same subnet that includes the Elastic Runtime component VMs.
    This network is represented by the Default Network in this picture.
    Service Network Select the subnet for the on-demand service instances, the Services Network in this picture.
    If you are adding IPsec to encrypt MySQL communication, Pivotal recommends that you deploy MySQL to its own network to avoid conflicts with services that are not IPsec compatible.

    IMPORTANT: You cannot change the regions or networks after you click Apply Changes in the final step below.

  3. Click Save.

Configure Active Service Plans

Follow the steps below for each plan that you want to be active and used in your PCF deployment:

  1. Click a plan side-tab, for example, Plan 1.

  2. Click Active.

    plan-1-tab-v2.0.0

  3. Configure the fields as follows:

    FieldInstructions
    Service Plan Access Accept the default to enable access to all organizations in your PCF deployment. Select Disable to disable creating new services instances of this plan for all organizations. Select Manual to manually control service access with the cf CLI.
    Plan Name Accept the default or enter a name. This is the name that appears in the PCF Marketplace for developers.
    Plan Description Accept the default or enter a description to help developers understand plan features. Pivotal recommends adding VM type details and disk size to this field.
    Plan Quota Enter the maximum number of service instances that can exist at one time.
    MySQL VM Type Select a VM type. The plan creates service instances of this size.
    MySQL Persistent Disk Select a disk size. This disk stores the MySQL messages.

    Note: If you intend to enable backups, choose a persistent disk type that is three times as large as you intend to provide to developers. For more information, see Backing Up and Restoring On-Demand MySQL.

    MySQL Availability Zone Select one AZ for the single node. The plan creates all service instance VMs in this AZ. Choose a different AZ than the one that the broker is in.

  4. Click Save.

Configure Inactive Service Plans

Follow the steps below for each plan that you want to be inactive:

  1. Click a plan side-tab, for example, Plan 2.

  2. Click Inactive.

    plan-inactive-tab-v2.0.0

    IMPORTANT: You cannot inactivate a plan that currently has existing service instances. Disable the plan and delete existing service instances before deactivating.

  3. Click Save.

Configure Global Settings

Follow the steps below to determine if service instances are assigned public IP addresses and to set the total number of service instances allowed across all plans.

  1. Click Settings.

    global-settings

  2. Configure the fields as follows:

    FieldInstructions
    Provide public IP addresses to all Service VMs Select this checkbox:
    • If the service instances need an external backup, blobstore, or syslog storage
    • If you have configured BOSH to use an external blobstore.
    Maximum service instances Enter the global quota for all on-demand instances summed across every on-demand plan. For information about determining global quotas, see Service Plan Recommended Usage and Limitations.

  3. Click Save.

Configure Monitoring

Follow the steps below to enable different types of monitoring and logging available in the MySQL service.

  1. Click Monitoring.

    monitoring

  2. Configure the fields as follows:

    FieldInstructions
    Enable User Statistics Logging Select this checkbox to better understand server activity and identify sources of load on a MySQL server. For more information about user statistics, see User Statistics Documentation.
    Enable Server Activity Logging Select this checkbox to record who connects to the servers and what queries are processed using the Percona Audit Log Plugin. For more information, see the Percona Documentation.

  3. Click Save.

Configure System Logging

Follow the steps below to enable system logging for the MySQL broker and service instance VMs.

  1. Click Syslog.

  2. Click Yes.

    syslog

  3. Configure the fields as follows:

    FieldInstructions
    Address Enter the address or host of the syslog server for sending logs, for example, logmanager.example.com.
    Port Enter the port of the syslog server for sending logs, for example, 29279.
    Transport Protocol Select the protocol over which you want system logs. Pivotal recommends using TCP.
    Enable TLS If you select TCP, you can also select to send logs encrypted over TLS.
    Permitted Peer Enter either the accepted fingerprint, in SHA1, or the name of the remote peer, for example, *.example.com
    SSL Certificate Enter the SSL Certificate(s) for the syslog server. This ensures the logs are transported securely.

    IMPORTANT: If your syslog server is external to PCF, you might need to select Provide public IP addresses to all Service VMs on the Settings page.

  4. Click Save.

Verify Stemcell Version and Apply All Changes

  1. Click Stemcell.

  2. Verify and, if necessary, import a new stemcell version.
    For more information, see about importing the stemcell for your IaaS: AWS, Azure, GCP, or vSphere.

  3. Click Save.

  4. Return to the Ops Manager Installation Dashboard and click Apply Changes.

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