Skip to content

Instantly share code, notes, and snippets.

@regeda
Last active March 29, 2019 11:22
Show Gist options
  • Save regeda/6e573729c11e4847015abc9ef54af8a5 to your computer and use it in GitHub Desktop.
Save regeda/6e573729c11e4847015abc9ef54af8a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
redis-cli -p 7000 cluster set-config-epoch 1
redis-cli -p 7001 cluster set-config-epoch 1
redis-cli -p 7000 cluster reset
redis-cli -p 7001 cluster reset
redis-cli -p 7000 cluster addslots $(seq -s " " 0 16383)
redis-cli -p 7000 cluster meet 127.0.0.1 7001
master_id=`redis-cli -p 7000 cluster nodes | grep myself | cut -d" " -f1`
redis-cli -p 7001 cluster replicate $master_id
redis-cli -p 7000 cluster info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment