LATEST VERSION: 1.11 - CHANGELOG
Redis for PCF v1.8

Installing and Upgrading Redis for PCF

Download and Install the Tile

To add Redis for PCF to Ops Manager, follow the procedure for adding PCF Ops Manager tiles:

  1. Download the product file from Pivotal Network. Select the latest release from the Releases: drop-down menu.
  2. Upload the product file to your Ops Manager installation.
  3. Click Add next to the uploaded product description in the Available Products view to add this product to your staging area.
  4. (Optional) Click the newly added tile to configure your possible service plans, syslog draining, and backups.
  5. Click Apply Changes to install the service.

After installing, be sure to:

  • Monitor the health and performance of your Redis instances by setting up logging.
  • Understand the usage of different plans by setting up tracking of usage metrics and updating the quota per plan if you run into issues.
  • Communicate with your App Developers to understand how the plans are meeting their use case. You can update your plans, including resource sizing if your App Developers need to grow beyond the current plan’s resource size.

Configure Redis for PCF Service Plans

Select the Redis tile in the Ops Manager Installation Dashboard to display the configuration page, and allocate resources to Redis service plans.

config overview

Note: As of Redis for PCF v1.8, Redis for PCF requires that you define and select a service network for all service plans described below. However, if you are not using the on-demand service, you can create an empty service network by following instructions in this Knowledge Base article.

On-Demand Service

  1. Create a service network, and select it in the Assign AZs and Networks tab.

    From an IAAS perspective, creation of a service network is identical to any other network previously created for tiles on Ops Manager. The only change is that the Operator needs to mark the network as a “Service Network” in Ops Manager to instruct Ops Manager to not perform IP management in that network.

  2. Click On-Demand Service Settings, and then enter the Maximum service instances across all on-demand plans. The maximum number of instances you set for all your cache plans combined cannot exceed this number.

    settings

    Review the guidance to understand the resource implications for on-demand instances.

  3. Enable the Allow outbound internet access from service instances checkbox. This is critical for service instances to be able to use logs or backups. This the checkbox must be ticked if an external blob store has been configured for BOSH.

  4. Click Cache Plan 1, 2, or 3 to configure it.

    You can configure up to three cache plans with appropriate memory and disk sizes for your use case(s). Resource configuration options may vary on different IAASs.

    The default names of the three cache plans provided reflect that instances of these plans are intended to be used for different cache sizes, as follows:

    • cache-small — A Redis instance deployed to a dedicated VM, suggested to be configured with ~1 GB of memory and >3.5 GB of persistent disk
    • cache-medium — A Redis instance deployed to a dedicated VM, suggested to be configured with ~2 GB of memory and >10 GB of persistent disk
    • cache-large — A Redis instance deployed to a dedicated VM, suggested to be configured with ~4 GB of memory and >14 GB of persistent disk

    on demand config Configure the following settings for your cache plan(s). Any pre-populated default settings have been pre-configured according to the memory/disk size of each plan.

    Field Description
    Plan Select Active or Passive. An inactive plan does not need any further configuration.
    Plan Name Enter a name that will appear in the service catalog.
    Plan Description Enter a description that will appear in the service catalog. Specify details that will be relevant to App Developers.
    Plan Quota App Developers can create instances until this quota is reached.
    CF Service Access Select a service access level. This setting does not modify the permissions that have been previously set, and allows for manual access to be configured from the CLI.
    AZ to deploy Redis instances of this plan This is the AZ in which to deploy the Redis instances from the plan. This must be one of the AZs of the service network (configured in the Ops Manager Director tile).
    Server VM type Select the VM type. Pivotal recommends that the persistent disk should be at least 3.5x the VM memory.
    Server Disk type Select the disk type. Pivotal recommends that the persistent disk should be at least 3.5x the VM memory.
    Redis Client Timeout Redis Client Timeout refers to the server timeout for an idle client specified in seconds. The default setting is 3600. Adjust this setting as needed.
    Redis TCP Keepalive Redis TCP Keepalive refers to the interval (in seconds) at which TCP ACKS are sent to clients. The default setting is 60. Adjust this setting as needed.
    Max Clients Max Clients refers to the maximum number of clients that can be connected at any one time. Per plan, the default setting is 1000 for small, 5000 for medium and 10000 for large. Adjust this setting as needed.
    Lua Scripting Enable or disable Lua Scripting as needed. Pivotal recommends that Lua Scripting be disabled.

  5. Click Save.

Updating On-Demand Service Plans

Operators can update certain settings after the plans have been created. If the Operator updates the VM size, disk size, or the Redis configuration settings (enabling Lua Scripting, max-clients, timeout and TCP keep-alive), these settings will be implemented in all instances that are already created.

Operators should not downsize the VMs or disk size as this can cause data loss in pre-existing instances. Additionally, Operators cannot make a plan that was previously active, inactive, until all instances of that plan have been deleted.

Removing On-Demand Service Plans

If you want to remove the On-Demand Service from your tile, do the following:

  1. Go to the Resource Config page on the Redis for PCF tile, and set the Redis On-Demand Broker job instances to 0.

  2. Navigate to the Errands page on the Redis for PCF tile. Set the following errands to off:

    • Register On-demand Redis Broker
    • On-demand Broker Smoke Tests
    • Upgrade all On-demand Redis Service Instances
    • Deregister On-demand Redis Broker
  3. Create an empty service network. For instructions, see this Knowledge Base article.

  4. Go to each of the three Cache Plan pages on the Redis for PCF tile, and set each cache plan to Plan Inactive. For example: cache plan inactive

Shared-VM Plan

  1. As of Redis for PCF v1.8, you must create a separate service network. To use Redis for PCF without the On-Demand service, create an empty service network to install the tile. Select the empty service network in the Assign AZs and Networks tab.

  2. Select the Shared-VM Plan tab to configure the memory limit for each Redis instance and the maximum number of instances that can be created. shared vm config

    1. Configure these fields:

    • Redis Instance Memory Limit—Maximum memory used by a shared-VM instance
    • Redis Service Instance Limit—Maximum number of shared-VM instances

    Memory and instance limits depend on the total system memory of your Redis broker VM and require some additional calculation. For more information, see Memory Limits for Shared-VM Plans below.

  3. Click Save.

  4. If you do not want to use the on-demand service, you must make all of the on-demand service plans inactive. Click the tab for each on-demand plan, and select Plan Inactive. See the example in Step 4 of Removing On-Demand Service Plans above.

  5. To change the allocation of resources for the Redis broker, click the Resource Config tab.

    The Redis broker server runs all of the Redis instances for your Shared-VM plan. From the Resource Config page, you can change the CPU, RAM, Ephemeral Disk, and Persistent Disk made available, as needed.

Memory Limits for Shared-VM Plans

Additional calculation is required to configure memory limits for shared-VM plans. With these plans, several service instances share the VM, and the Redis broker also runs on this same VM. Therefore, the memory used by all the shared-vm instances combined should be at most 45% of the memory of the Redis broker VM.

To configure the limits in these fields, estimate the maximum memory that could be used by all your Redis shared-VM instances combined. If that figure is higher than 45% of the Redis broker VM’s total system memory, you can do one of the following:

  • Decrease the Redis Instance Memory Limit.
  • Decrease the number of instances in Redis Service Instance Limit.
  • Increase the RAM for the Redis Broker in the Resource Config tab as shown below.

Here are some examples for setting these limits:

Redis Broker VM Total Memory Redis Instance Memory Limit Redis Service Instance Limit
16 GB 512 MB 14
16 GB 256 MB 28
64 GB 512 MB 56

Note: It is possible to configure a larger Redis Service Instance Limit, if you are confident that the majority of the deployed instances will not use a large amount of their allocated memory, for example in development or test environments.

However, this practice is not supported and can cause your server to run out of memory, preventing users from writing any more data to any Redis shared-VM instance.

Dedicated-VM Plan

  1. As of Redis for PCF v1.8, you must create a separate service network. To use Redis for PCF without the On-Demand service, create an empty service network to install the tile. Select the empty service network in the Assign AZs and Networks tab.

  2. To configure the Dedicated-VM plan, click the Resource Config tab to change the allocation of resources for the Dedicated Node. dedicated vm config

    • The default configuration creates five dedicated nodes (VMs). Each node can run one Redis dedicated-VM instance.
    • You can change the number of dedicated nodes, and configure the size of the persistent and ephemeral disks, and the CPU and RAM for each node.
    • The default VM size is small. It is important that you set the correct VM size to handle anticipated loads.
    • With dedicated-VM plans, there is one Redis service instance on each VM. The maximum memory an instance can use should be at most 45% of the total system RAM on the VM. You can set this with the maxmemory configuration. The app can use 100% of maxmemory–that is, up to 45% of the system RAM.
  • Pivotal recommends the persistent disk be set to 3.5x the amount of system RAM.
  1. Click Save.

  2. You must disable the On-Demand Service if you do not wish to use it. Please see the directions here.

Configure Resources for Dedicated-VM and Shared-VM Plans

To configure resources for the Shared-VM and Dedicated-VM plans, click the Resource Config settings tab on the Redis for PCF tile.

  • The Shared-VM plan is on the Redis Broker resource.
  • The Dedicated-VM plan is on the Dedicated Node resource.

The following are the default resource and IP requirements for Redis for PCF when using the Shared-VM or Dedicated-VM plans:

Product Resource Instances CPU Ram Ephemeral Persistent Static IP Dynamic IP
Redis Redis Broker 1 2 3072 4096 9216 1 0
Redis Dedicated Node 5 2 1024 4096 4096 1 0
Redis Broker Registrar 1 1 1024 2048 0 0 1
Redis Broker De-Registrar 1 1 1024 2048 0 0 1
Redis Compliation 2 2 1024 4096 0 0 1

Disable Shared and Dedicated VM Plans

You can disable Shared and Dedicated VM Plans by doing the following while configuring Redis tile:

  1. Ensure at least one On-Demand plan is active.

  2. Configure the following tabs:

    • Shared-VM Plan:
      a. Set Redis Service Instance Limit to 0.
      b. Click Save.

    • Errands:
      a. Set Broker Registrar to Off.
      b. Set Smoke Tests to Off.
      c. Set Broker Deregistrar to Off.
      d. Leave all four On-Demand errands On.
      e. Click Save.

    • Resource Config:
      a. Decrease Redis Broker Persistent disk type to the smallest size available.
      b. Decrease Redis Broker VM type to the smallest size available.
      c. Set Dedicated Node Instances to 0.
      d. Click Save.

Configure Syslog Output

Pivotal recommends that operators configure a syslog output. For On-Demand instances, all logs follow RFC5424 format. Dedicated-VM and Shared-VM plan instances are consistent with their previous format.

  1. Add the Syslog address, Syslog port and transport protocol of your log management tool.

    The information required for these fields is provided by your log management tool.

    syslog configuration

  2. Click the Save button.

Networks, Security, and Assigning AZs

Network Configuration

It is recommended that each type of Redis for PCF service run in its own network. For example, run a Redis for PCF on-demand service on a separate network from a Redis for PCF shared-VM service.

The following ports and ranges are used in this service:

Port Protocol Direction and Network Reason
8300
8301
tcp
tcp and udp
Inbound to CloudFoundry network, outbound from service broker and service instance networks* Communication between the CF consul_server and consul_agents on Redis deployment; used for metrics
4001 tcp Inbound to CloudFoundry network, outbound from service broker and service instance networks* Used by the Redis metron_agent to forward metrics to the CloudFoundry etcd server
12350 tcp Outbound from CloudFoundry to the cf-redis-broker service broker network (Only if using a cf-redis-broker) Access to the cf-redis-broker from the cloud controllers.
12345 tcp Outbound from CloudFoundry to the on-demand service broker network (Only if using an On-Demand service) For access to the on-demand service broker from the cloud controllers
6379 tcp Outbound from CloudFoundry to any service instance networks (dedicated-node and on-demand) Access to all dedicated nodes and on-demand nodes from the Diego Cell and Diego Brain network(s)
32768-61000 tcp Outbound from CloudFoundry to the cf-redis-broker service broker network From the Diego Cell and Diego Brain network(s) to the service broker VM. This is only required for the shared service plan.
80 or 443
(Typically)
http or https
respectively
Outbound from any service instance networks Access to the backup blobstore
8443
25555
tcp Outbound from any on-demand service broker network to the bosh director network For the on-demand service, the on-demand service broker needs to talk to bosh director

* Typically the service broker network and service instance network(s) are the same.

Application Security Groups

To allow this service to have network access you must create Application Security Groups (ASGs). Ensure your security group allows access to the Redis Service Broker VM and Dedicated VMs configured in your deployment. You can obtain the IP addresses for these VMs in Ops Manager under the Resource Config section for the Redis tile.

Note: Without ASGs, this service is unusable.

Application Container Network Connections

Application containers that use instances of the Redis service require the following outbound network connections:

Destination Ports Protocol Reason
ASSIGNED_NETWORK 32768-61000 tcp Enable application to access shared vm service instance
ASSIGNED_NETWORK 6379 tcp Enable application to access dedicated vm service instance

Create an ASG called redis-app-containers with the above configuration and bind it to the appropriate space or, to give all started apps access, bind to the default-running ASG set and restart your apps. Example:

[
  {
    "protocol": "tcp",
    "destination": "ASSIGNED_NETWORK",
    "ports": "6379"
  }
]

Assigning AZs

Assigning multiple AZs to Redis jobs will not guarantee high availability.

All of your Shared-VM instances will run on a single node in just one of the configured availability zones and are therefore not highly availabile.

Each On-Demand instance could be assigned to any of the configured availability zones, however each instance still operates as a single node with no clustering. This separation over availability zones provides no high availability.

Each Dedicated-VM instance could be assigned to any of the configured availability zones, however each instance still operates as a single node with no clustering. This separation over availability zones provides no high availability.

AZ Assignment Diagram

Validating Installation

Smoke tests are run as part of Redis for PCF installation to validate that the install succeeded. Smoke tests are described here.

Upgrading Redis for PCF

This product enables a reliable upgrade experience between versions of the product that is deployed through Ops Manager.

The upgrade paths are detailed here for each released version.

Note: As of Redis for PCF v1.8, Redis for PCF requires that you define and select a service network for all service plans types. Therefore, you must create a service network if you are upgrading to v1.8. However, if you are not using the on-demand service, you can create an empty service network by following instructions in this Knowledge Base article.

To upgrade the product:

  1. Download the latest version of the product from Pivotal Network.
  2. Upload the new .pivotal file to Ops Manager.
  3. Upload the stemcell associated with the update (if required).
  4. Update any new mandatory configuration parameters (if required). As part of this step, select a Service Network in the Assign AZs and Networks tab. See the Note above.
  5. Click Apply Changes and the rest of the process is automated.

During the upgrade deployment each Redis instance will experience a small period of downtime as each Redis instance is updated with the new software components. This downtime is because the Redis instances are single VMs operating in a non HA setup. The length of the downtime depends on whether there is a stemcell update to replace the operating system image or whether the existing VM can simply have the redis software updated. Stemcells updates incur additional downtime while the IaaS creates the new VM while updates without a stemcell update are faster.

Ops Manager ensures the instances are updated with the new packages and any configuration changes are applied automatically.

Upgrading to a newer version of the product does not cause any loss of data or configuration. This is explicitly tested for during our build and test process for a new release of the product.

Release Policy

When a new version of Redis is released we aim to release a new version of the product containing this soon after.

Where there is a new version of Redis or another dependent software component such as the stemcell released due to a critical CVE, Pivotal’s goal is to release a new version of the product within 48 hours.

Uninstalling Redis for PCF

To uninstall Redis for PCF, do the following:

  1. In the PCF Ops Manager Installation dashboard, click the trash can icon in the lower right hand corner of the Redis for PCF tile.
  2. Confirm deletion of the product, and then click Apply Changes.
Create a pull request or raise an issue on the source for this page in GitHub