|
| 1 | +# Integrating Lightrun with Redis Enterprise Operator on OpenShift |
| 2 | + |
| 3 | +This guide explains how to configure the Lightrun Helm chart to work with Redis Enterprise Operator on OpenShift clusters. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- OpenShift cluster with Redis Enterprise Operator version 7.8.6-1.1 |
| 8 | +- Redis Enterprise Database instance created and running with Redis version 7.4.0 |
| 9 | +- Access to the Redis Enterprise Database credentials |
| 10 | + |
| 11 | +## Configuration Steps |
| 12 | + |
| 13 | +### 1. Configure Redis Enterprise Database |
| 14 | + |
| 15 | +#### 1.1 For UI Users |
| 16 | + |
| 17 | +When creating a Redis Enterprise Database through the OpenShift UI: |
| 18 | + |
| 19 | +1. Navigate to the Installed Operators in the Operators tab |
| 20 | +2. Select "RedisEnterpriseDatabase" and click "Create RedisEnterpriseDatabase": |
| 21 | + |
| 22 | +3. Please note that if databasePort is not specified, it will be automatically generated. Ensure that the assigned port matches 6379, as defined in the values.yaml file in Step 3. If you choose a different port, make sure to update it accordingly in the values file. |
| 23 | + |
| 24 | +4. Ensure the memorySize matches 5GB: |
| 25 | + |
| 26 | +5. Ensure the redisVersion aligns the prerequisites defined at the beginning of this document: |
| 27 | +  |
| 28 | +6. Click "Create" to deploy the Redis Enterprise Database instance. |
| 29 | + |
| 30 | +#### 1.2 For CRD Users |
| 31 | + |
| 32 | +When creating a Redis Enterprise Database using a Custom Resource Definition (CRD), you need to specify at least the following mandatory fields for Lightrun compatibility: |
| 33 | + |
| 34 | +```yaml |
| 35 | +apiVersion: app.redislabs.com/v1alpha1 |
| 36 | +kind: RedisEnterpriseDatabase |
| 37 | +metadata: |
| 38 | + name: lightrun-redis |
| 39 | + namespace: redis-enterprise |
| 40 | +spec: |
| 41 | + dbName: lightrun-redis |
| 42 | + databasePort: 6379 # Mandatory for Lightrun compatibility |
| 43 | + memorySize: "5GB" |
| 44 | + redisVersion: "" # Ensure the redisVersion aligns the prerequisites defined at the beginning of this document |
| 45 | +``` |
| 46 | +
|
| 47 | +All other values in this CRD are optional and will use defaults if not specified. |
| 48 | +Save this as `redis-database.yaml` and apply it with: |
| 49 | + |
| 50 | +```bash |
| 51 | +kubectl apply -f redis-database.yaml |
| 52 | +``` |
| 53 | + |
| 54 | +### 2. Get Redis Database Credentials |
| 55 | + |
| 56 | +First, you need to retrieve the Redis database password from the secret created by Redis Enterprise Operator. The secret is typically named after your Redis Enterprise Database instance. |
| 57 | + |
| 58 | +```bash |
| 59 | +# Replace <db-name> with your Redis Enterprise Database name |
| 60 | +kubectl get secret <db-name> -n <namespace> -o jsonpath='{.data.password}' | base64 -d |
| 61 | +``` |
| 62 | + |
| 63 | +### 3. Configure Lightrun Helm Chart Values |
| 64 | + |
| 65 | +When deploying Lightrun using Helm, you need to set the following values to integrate with your Redis Enterprise Database: |
| 66 | + |
| 67 | +```yaml |
| 68 | +deployments: |
| 69 | + redis: |
| 70 | + architecture: single |
| 71 | + external: |
| 72 | + enabled: true |
| 73 | + endpoint: <svc_name>.<namespace>.svc.cluster.local |
| 74 | + port: "6379" |
| 75 | + auth: |
| 76 | + enabled: true |
| 77 | +
|
| 78 | +secrets: |
| 79 | + redis: |
| 80 | + password: <your-redis-password> |
| 81 | +``` |
| 82 | + |
| 83 | +Replace the following placeholders: |
| 84 | +- `<svc_name>`: The name of the service created for your Redis Enterprise Database |
| 85 | +- `<namespace>`: The namespace where your Redis Enterprise Database is deployed |
| 86 | +- `<your-redis-password>`: The password retrieved from the Redis Enterprise Database secret |
| 87 | + |
| 88 | +### 4. Verify Configuration |
| 89 | + |
| 90 | +After applying the configuration, you can verify the connection by checking the Lightrun server logs. You should see successful Redis connection messages in the logs. |
| 91 | +``` |
| 92 | +2025-04-10 10:59:56.665 INFO 1 [] --- [isson-netty-8-2] o.redisson.connection.ConnectionsHolder : 1 connections initialized for redb2.redis-ent-op.svc.cluster.local/172.30.156.161:6379 |
| 93 | +2025-04-10 10:59:56.681 INFO 1 [] --- [isson-netty-8-1] o.redisson.connection.ConnectionsHolder : 10 connections initialized for redb2.redis-ent-op.svc.cluster.local/172.30.156.161:6379 |
| 94 | +``` |
| 95 | +
|
| 96 | +## Notes |
| 97 | +
|
| 98 | +- Make sure the Redis Enterprise Database service is accessible from the namespace where Lightrun is deployed |
| 99 | +- The Redis endpoint should be in the format `svc_name.namespace.svc.cluster.local` |
| 100 | +- Ensure network policies allow communication between Lightrun and Redis if any are in place |
0 commit comments