Skip to content

jittagornp/redis-cluster-example

Repository files navigation

Redis Cluster Example

Document

Prerequisites

  • Server : 6 Nodes
    • 3 Masters
    • 3 Slaves
  • OS : Ubuntu 18.04 LTS

Install

All Nodes (6 Nodes)

  1. Clone this Source Code
$ git clone https://github.com/jittagornp/redis-cluster-example.git
$ cd redis-cluster-example
$ chmod +x *.sh
  1. Install Docker
$ ./install-docker.sh
  1. Install Redis

*** Don't forget change redis password in this file before execute

$ ./docker-run-redis.sh 

On Node 1

  1. Change Node IP Address in file
vi redis-cluster-example/docker-run-redis-cluster.sh
  1. Create Cluster
$ ./docker-run-redis-cluster.sh

Test

  1. Remote to container
$ docker exec -it redis bash 
  1. Use Redis CLI
$ redis-cli -c -h <NODE_IP> -p 6379 -a <YOUR_REDIS_PASSWORD> 
> cluster nodes 

Client Tool

Releases

No releases published

Packages

No packages published