#!/usr/bin/env bash set -euo pipefail ## This starts configurable number of core and replicant nodes on the same host (not in docker). ## The nodes are named as core1, core2, replicant3, replicant4, ... where the number monotically increases. ## The number in node name is used as an offset for ekka to avoid clashing (see ekka_dist:offset/1). ## Nodes are started on loopback addresses starting from 127.0.0.1. ## The script uses sudo to add loopback aliases. ## The boot script is ./_build/emqx/rel/emqx/bin/emqx. ## The data and log directories are configured to use ./tmp/ # ensure dir cd -P -- "$(dirname -- "$0")/../" help() { echo echo "$0 start|stop [-h|--help] [-n|--nodes ] [-c|--cores ] [-b|--boot