Using Redis Enterprise for VMware Tanzu
This topic describes how to use Redis Enterprise for VMware Tanzu.
Perform ‘cf login’ to your foundation.
# cf create-service redislabs [SERVICE PLAN] [SERVICE INSTANCE]where SERVICE PLAN uses one of the available Redis Enterprise service plans and SERVICE INSTANCE is the new service instance name.
# cf create-service redislabs small-redis redis2
Creating service instance redis2 in org RedisLabs space space1 as admin... OK
Availabe service plans are listed in either the tile’s Ops Manager configuration, under Settings->Service Plans or in the Apps Manager -> Marketplace screen
From VMware Tanzu Apps Manager go to Marketplace and select Redis Enterprise on VMware Tanzu.
Select a plan from the available plans listed and click “Select This Plan”
Write an instance name and optionally choose to bind to a deployed app then click “Create”.
Connect to the Redis Enterprise Admin Console by placing the Cluster Management Console Subdomain in the host part of the following URL:
https://[Cluster Management Console Subdomain].[System Domain]. For example:
Log in using the Administrator email account and password you specified in the tile configuration above.
Note: Do not create or delete databases through the Redis Enterprise Cluster UI. Use the cf creates/delete/update-service commands or use the the Pivotal Apps Manager web UI to create and manage databases through available plans.
- Connect to the Redis Enterprise UI per the instructions above
- Log in using the Administrator email account and password you specified in the tile configuration.
- Navigate to the “Settings” section and then the “General” tab.
- Paste the license key you received from Redis Labs into the “Cluster key” form field and click the “Save” button.
Note: In case your license is already expired, changes to the cluster configuration, such as a version upgrade, will result in cluster failure. Always apply a valid license key in advance of making such changes.
redis-cli is a simple command-line tool for interacting with Redis Database.
To connect to Redis Database, do the following:
- Connect to one of the IP addresses of the nodes through SSH and find
- Change to the
/opt/redislabs/bindirectory and run
redis-clito connect to port 12000 and to the database-endpoint that is reported in the database properties after you created the database. # sudo /opt/redislabs/bin/redis-cli -p 12000 -h database-endpoint
To store and retrieve a key in
database1, run the following commands:
set key1 123 get key1
127.0.0.1:16653> set key1 123 OK 127.0.0.1:16653> get key1 "123"
For more information about Redis Enterprise for VMware Tanzu, see the Redis Enterprise documentation.