Installing and Configuring a9s Redis for PCF

This topic describes how to install and configure a9s Redis for PCF.

Prerequisites

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

This comprises the a9s Consul DNS for PCF tile and the a9s BOSH for PCF tile.

The a9s Consul DNS for PCF tile is required because it is responsible for providing an internal DNS system to the other a9s service tiles, the a9s Redis for PCF included. For more information about this tile, see The Purpose of the a9s Consul DNS for PCF Tile.

The a9s BOSH for PCF tile is required because it is used by the a9s service tiles, for the provisioning and lifecycle management of their VM. For more information about this tile, see a9s BOSH for PCF Use Case.

Install and Configure a9s Redis for PCF

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

  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 Redis for PCF tile in the Ops Manager Available Products view to add it to your staging area.

  4. Click the newly added tile, and then click Settings to review the configuration settings. See the following sections for more information on how to configure the properties in each settings pane:

  5. Click Apply Changes to deploy the service.

After you installing the a9s Redis for PCF, it is available in the list of marketplace services. For more information, see Using a9s Redis 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 across as many availability zones (AZs) as possible.

Az and networks

Configure the Backup Manager

Use Backup Settings to enter the credentials of the AWS account where the backup will be uploaded. This feature only supports Amazon S3 at the moment. Leave those fields empty if you don’t want to backup your data with the a9s Redis for PCF tile.

You can also modify the default values for the backup task and the Cron job that is used to schedule the backups.

Backup settings

Configure Errands

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

A9s redis for pcf errands

Post-Deploy Errands

  • Run BOSH Configurator: This errand configures a9s BOSH for PCF so that it can provision Redis service instances. When enabled, this errand uploads the required releases in the a9s BOSH Director. Disabling this errand might 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 Redis for PCF with Redis configurations. Disabling this errand might 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 Redis for PCF service broker with 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 Redis for PCF installation to ensure that it is configured properly. The tests can take over 30 minutes.

Pre-Delete Errands

  • Delete all a9s Redis instances: This errand deletes all a9s Redis instances that were created with cf create-service.

    WARNING: This task cannot be undone. All VMs of the service instances are permanently deleted. If a service instance is bound to an app or has existing service keys, the errand fails.

  • Run Broker Deregistrar: This errand unregisters the a9s Redis for PCF service broker in Elastic Runtime. It also removes the a9s Redis service from the Elastic Runtime marketplace.

Configure Resources

You can configure the dimensions of the VMs that host the a9s Redis for PCF components. This configuration does not cover the dedicated Redis 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.

A9s redis resource config

Configure Stemcells

If you want to use a stemcell other than the default, click Stemcell, and then click Import Stemcell to upload the stemcell.

Stemcell tab

Configure Service Plans

The sizes and types of VMs used to provision service instances of a given service plan are specified in the Cloud Config pane of the a9s BOSH for PCF tile. See the Cloud Config section of the a9s BOSH for PCF installation documentation that corresponds to your IaaS.

The table below lists available service plans:

This plan… Uses these a9s BOSH for PCF settings to determine VM and disk size
redis-single-small Cloud properties for the VM Type Small
Cloud properties for the Disk Type Small
redis-single-big Cloud properties for the VM Type Large
Cloud properties for the Disk Type Big

Update Existing Service Instances

After updating the a9s Redis 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 log in to the Ops Manager 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. 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 in to the BOSH Director:

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

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

    $ bosh deployments
    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-redis-service-94443f82b52dcf333bbd   | bosh-configurator-redis/1     | bosh-vsphere
    | ...
    +------------------------------------------+-------------------------------+-------------
    

  5. Switch the CLI to operate on the a9s Redis for PCF deployment by running bosh deployment /var/tempest/workspaces/default/deployments/DEPLOYMENT-NAME.yml with the a9s-redis-service-... name from the previous step:

    $ bosh deployment /var/tempest/workspaces/default/deployments/a9s-redis-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-redis-service-94443f82b52dcf333bbd.yml'

  6. (Optional) Run bosh run errand redis-smoke-­tests to ensure that your a9s Redis for PCF installation is configured properly.

  7. Run bosh run errand deployment-updater to force the update for all existing a9s Redis 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-redis-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 significant time to finish running. BOSH shows no logging output while the errand runs.

Trigger Backups and Restores on Demand

Note: Note that the backup service uploads a copy of your .rdb file to AWS, therefore backup only works if your have RDB configured. See Change RDB Persistence Settings for more information.

Only PCF administrators can interact with the Backup Manager endpoints to trigger immediate backups and restores of backups.

To backup, perform the following steps:

  1. Navigate to the Status tab of the tile and record the IP address of one of the Backup Manager instances.

    Status tab

  2. On the Credentials tab, find the credentials of the service under backup-manager > Backup Manager Credentials.

    Credentials tab

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

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

To restore, perform the following steps:

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

    $ curl backup:@172.28.9.29:3000/instances
    
    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 that 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:@172.28.9.29:3000/backup_agent/restores -d "backup_id=5" -d "instance_id=1"
    

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