Redis Image Guide Version 5

Redis is an in-memory key-value store known for its flexibility, performance, and wide language support.

Image Environment on Bluvalt:

Redis Image support the following OS:

OSRedis 4.0.9Redis 5.0.7
Ubuntu 18YesYes
Ubuntu 16N/AYes
Centos 7N/AYes

Launch an Instance from an Image:

  1. Login into bluvalt horizon with your “username” and “password”.
  2. Then go to (Project -> Compute -> Instances).
  3. On Instances page, click Launch Instance button at the top right corner then, Launch Instance dialog will appear

Redis Directory:

  1. Redis main directory: /etc/redis
  2. Log directory: /var/log
  3. Redis configuration file: /etc/redis/ redis.conf

Start Redis

Start up the systemd service by typing:

sudo systemctl start redis

To the service status type the following command:

sudo systemctl status redis

You should see something that looks like this:

Output
 redis.service - Redis Server  
 Loaded: loaded (/etc/systemd/system/redis.service; enabled; vendor preset: enabled)  
 Active: active (running) since Wed 2016-05-11 14:38:08 EDT; 1min 43s ago  Process: 3115 ExecStop=/usr/local/bin/redis-cli shutdown (code=exited, status=0/SUCCESS)
 Main PID: 3124 (redis-server)     
 Tasks: 3 (limit: 512)    
 Memory: 864.0K    
 CPU: 179ms 6
 CGroup: /system.slice/redis.service  
 └─3124 /usr/local/bin/redis-server 127.0.0.1:6379  

Test Redis Functionality

To test functioning, connect to the Redis server with the command-line client:

redis-cli

In the prompt that follows, test connectivity by typing:

Ping

You should see output like the following:

PONG

Check that you can set keys by typing:

set test "It's working!"

You should see output like the following:

OK

Now, retrieve the value by typing:

get test

You should see output like the following:

"It's working!"

Exit the Redis prompt to get back to the shell:

exit

As a final test, let’s restart the Redis instance:

sudo systemctl restart redis

Now, connect with the client again and confirm that your test value is still available:

redis-cli

Now, retrieve the value by typing:

get test

The value of your key should still be accessible:

"It's working!"

Back out into the shell again when you are finished:

exit

Check Redis version:

redis-server -v

You should see output like the following:

Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=fc287baa8bd5a7f0