/nomad-redis-cluster-demo

Deploy, manage, connect into Redis Cluster by using Nomad and Envoy Proxy

Primary LanguageShell

What this repo do?

This repo demo how to deploy Redis cluster using Nomad and Consul. This also use Envoy proxy to support migrate/backward-compatible with running application.

Prerequisite

Below softwares must be installed

  • Docker
    • Check:
    $ docker ps -q | head -n 1
  • Redis (Version >= 3.0)
    • Check:
    $ redis-cli --version && redis-server --version
    
  • Hashicorp Nomad
    • Check:
    $ nomad --version
    
  • Hashicorp Consul
    • Check:
    $ consul --version
    
  • Consul Template
    • Check:
    $ consul-template --version
    

Start Nomad

OSX

$ nohup ./start-nomad.sh en0  &

Linux

$ nohup ./start-nomad.sh eth1 &

Start Consul

$ nohup ./start-consul.sh en0 &

Run all job

$ make

Access into cluster over Envoy proxy

$ ./connect-envoy-proxy.sh

Cleanup

$ ./teardown.sh