-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
53 lines (40 loc) · 883 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SHELL := bash
PORT := 6379
.PHONY: all
all: up cluster
.PHONY: up
up:
@docker compose up -d --scale node=6
.PHONY: down
down:
@docker compose down -v
.PHONY: logs
logs:
@docker compose logs --tail="all" -f
.PHONY: cluster
cluster:
@./scripts/cluster.sh
.PHONY: redis-cli
redis-cli:
@docker compose exec node redis-cli -c
.PHONY: reshard
reshard:
@docker compose exec node redis-cli --cluster reshard redis-cluster-node-1:$(PORT)
.PHONY: nodes-status
nodes-status:
@docker compose exec node redis-cli cluster nodes
.PHONY: check-cluster
check-cluster:
@docker compose exec node redis-cli --cluster check redis-cluster-node-1:$(PORT)
.PHONY: auto-reshard
auto-reshard:
@./scripts/reshard.sh
.PHONY: failover
failover:
@./scripts/failover.sh
.PHONY: new-master
new-master:
@./scripts/add-node.sh master
.PHONY: new-slave
new-slave:
@./scripts/add-node.sh slave