Using the Redis CLI
Assuming your Redis relationship is named redis
, you can access it using the redis-cli
tool.
-
Use SSH to connect to the integration environment with Redis installed and configured.
-
Open an SSH tunnel to a host.
redis-cli -h redis.internal
Get installed Redis version
Use the following command to get the Redis version installed on an integration environment:
redis-cli -h redis.internal info | grep version
Sample response:
redis_version:7.0.5
gcc_version:8.3.0
Redis on Pro staging and production
To get the Redis version installed on a Staging or Production environment, use the redis-server
command:
redis-server -v
Redis server v=7.0.5 ...
Use the following command to get the Redis configuration installed on a Pro Staging or Production environment:
echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | json_pp
Sample response:
"redis" : [
{
"cluster" : "project-master-123abc4",
"fragment" : null,
"host" : "redis.internal",
"host_mapped" : false,
"hostname" : "oblahblahblahblahe.redis.service._.magentosite.cloud",
"ip" : "169.254.10.10",
"password" : null,
"path" : null,
"port" : 6379,
"public" : false,
"query" : {},
"rel" : "redis",
"scheme" : "redis",
"service" : "redis",
"type" : "redis:7.0.5",
"username" : null
}
]