Set up a local EMQ X cluster with core/replicant nodes. Requirements: you need docker and docker-compose installed.
Usage: copy ./dev-cluster
script to the emqx repo root,
build the release: make emqx-rel
,
start the cluster: ./dev-cluster up
.
The CLI arguments are similar to docker-compose
.
Size of the cluster and log level can be customized via environment variables:
LOG_LEVEL
EMQ X log levelN_NODES
number of nodes in the cluster (default = 10)N_CORE_NODES
number of core nodes in the cluster (default = 3)LB_STRATEGY
haproxy load-balancing strategy (default =roundrobin
)
For example: LOG_LEVEL=debug N_NODES=10 N_CORE_NODES=5 ./dev-cluster up --build --force-recreate
Haproxy statistics will be available on http://localhost:8898