Documentation - Redise Pack

open all | close all

Quick Start Tutorial with Redis Enterprise Pack for Pivotal Cloud Foundry (PCF)

Redis Enterprise Pack for PCF exposes its service plans on the Marketplace. Developers can provision highly available and scalable Redis databases by creating instances of the service plans using Apps Manager or the Cloud Foundry Command Line Interface (cf CLI).

Installation and Configuration

Step 1 – Import the Redis Enterprise Pack Tile

You will need to import the Redis Enterprise Pack .pivotal file into your Pivotal Cloud Foundry environment to get started.

Step 2 – Configure Redis Enterprise Pack

  1. Click the newly imported tile.
  2. Navigate to the Assign AZs and Network section on the right navigation bar. Ensure you have a network selected for the cluster to use.
  3. Navigate to the Redis Enterprise Pack section on the right navigation bar. You will need to provide the following details:
  4. From the Settings tab, click Redis Enterprise Pack and complete the following fields and then click Save:
    • Cluster Name: Provide a sub-domain for the cluster name. The cluster name is a sub-domain under the System Domain which is found under the Pivotal Elastic Runtime in Ops Manager. This is the connection string for Redis applications will use to connect to Redis databases on Redis Enterprise Pack.
    • Admin Email: Provide an email which will have full administrative privileges to the new Redis Enterprise Pack cluster.
    • Admin account password: Provide the password for the administrative account.
    • Static IPs: For production clusters, you can provide a set of static IPs addresses to use for cluster nodes and enabled Multiple Availability Zone (Rack) awareness.
  5. Navigate to the “Resource Config” section on the left navigation bar. Ensure there are resources assigned to the required resources for Redis Enterprise Pack.

Note: It is important to ensure the capacity used for RP cluster nodes meet the minimum HW specification requirements for Redis Enterprise Pack. See the minimum HW specifications.

Step 3 – Deploy the Redis Enterprise Pack Cluster

  1. Once the tile configuration is done, you can save the changes and click the “Apply changes” to deploy the cluster.
  2. You can switch into the tile and to the “Status” tab to view the state of the cluster nodes under the jobs named “redis-pack-node” and “redis-pack-service-broker“.

Step 4 – Create a New Database on the Redis Enterprise Pack Cluster

  1. Connect to the Redis Enterprise Pack Admin Console using the “Cluster Name” you previously specified at the following URL: https://rpadmin.cluster-name
  2. Log in using the Administrator email account and password you specified above in the tile configuration.
  3. Navigate to the “databases” tab and create a new database by selecting “redis db“.
  4. On the “new redis db” page, enter “database1” for the database name and then click the “show advanced option” link and for the “endpoint port number” input “12000“.
  5. Click “Activate” to create your database.

You now have a Redis database on Redis Enterprise Pack!

Step 5 – Connect to Redis Database Using redis-cli

redis-cli is a simple command-line tool to interact with Redis database. You can connect to one of the IP addresses of the nodes through ssh and find redis-cli under /opt/redislabs/bin/redis-cli
Run redis-cli, located in the /opt/redislabs/bin directory, to connect to port 12000 and to the database-endpoint that is reported in the database properties after you created the database. Here is how you can store and retrieve a key in database1

# sudo /opt/redislabs/bin/redis-cli -p 12000 -h <your-database-endpoint>> set key1 123
OK> get key1