Find out version of Redis running in PCF DEV

1.3k Views Asked by At

How to find out which version of Redis is running in PCF DEV? I'm using the latest PCF DEV 1.2.0 for PAS 2.4.4 and created the service as per the docs, like this:

cf cs p.redis cache-small redis

It is running, and I have some app talking to it. Now I just want to know which version it is.

1

There are 1 best solutions below

0
On BEST ANSWER

I found a way with the help of a colleague: First, find out the hostname, port and password by querying the environment of the application which is successfully connected to Redis with cf env [APP-NAME]. The relevant chunk looks like this:

"VCAP_SERVICES": {
 "p.redis": [
  {
   "binding_name": null,
   "credentials": {
     "host": "q-s0.redis-instance.default.service-instance-deadbeef-8008.bosh",
     "password": "THXQCcElifUCCbJD2RlU7tgjZegmkn",
     "port": 6379
    },
(...)

Now, SSH into the apps container with cf ssh [APP-NAME] and use Netcat to connect to Redis:

vcap@...:~$ nc q-s0.redis-instance.default.service-instance-deadbeef-8008.bosh 6379

Then use AUTH and the password to "login"...

AUTH THXQCcElifUCCbJD2RlU7tgjZegmkn
+OK

...and issue the INFO command - the Redis version is displayed right at the top:

INFO
$3365
# Server
redis_version:5.0.2
(...)

Anyway, this is likely very much work for a tiny bit of information - are there other ways?