Reputation: 430
I am attempting to create a new redis cluster on the docker swarm using redis 4.0.11. The closest tutorial I have found was this one: https://get-reddie.com/blog/redis4-cluster-docker-compose/
The problem I am having is this like all other tutorials use the ruby redis-trib.rb script to create the cluster after discovering all of the nodes and this guy seems to be no longer supported:
| WARNING: redis-trib.rb is not longer available!
| You should use redis-cli instead.
|
| All commands and features belonging to redis-trib.rb have been moved
| to redis-cli.
| In order to use them you should call redis-cli with the --cluster
| option followed by the subcommand name, arguments and options.
|
| Use the following syntax:
| redis-cli --cluster SUBCOMMAND [ARGUMENTS] [OPTIONS]
|
| Example:
| redis-cli --cluster create 172.22.0.3:6379 172.22.0.5:6379 172.22.0.7:6379 172.22.0.2:6379 172.22.0.6:6379 172.22.0.4:6379 --cluster-replicas 1
|
| To get help about all subcommands, type:
| redis-cli --cluster help
But yet when I attempt to use the recommended command I get an error:
# redis-cli --cluster create 172.22.0.3:6379 172.22.0.5:6379 172.22.0.7:6379 172.22.0.2:6379 172.22.0.6:6379 172.22.0.4:6379 --cluster-replicas 1
Unrecognized option or bad number of args for: '--cluster'
# redis-cli --cluster help
Unrecognized option or bad number of args for: '--cluster'
Ideas?
Upvotes: 1
Views: 7748
Reputation: 4483
They have changed the docs, with the previous version you had to do it with the redis-trib.rb
file as you said.
The easiest way to do it, is to download to your server the previous redis-trib.rb
(link) and run this command:
./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 \
127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005
before you do it make sure you have installed ruby.
If you have any questions let me know :) Good luck!
Upvotes: 0
Reputation: 79
redis-cli 4.0.11 hasn't --cluster option.
use following ways:
Upvotes: 4