Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to specify node base name in devrel and base port. #1013

Open
wants to merge 1 commit into
base: develop-3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TEST_DEPS_DIR ?= _build/test/lib
REL_DIR ?= _build/default/rel
DEPS = $(patsubst $(TEST_DEPS_DIR)/%, %, $(wildcard $(TEST_DEPS_DIR)/*))
TEST_DEPS = $(filter-out $(TEST_IGNORE), $(DEPS))
DEVREL_NODE ?= dev

RIAK_CORE_STAT_PREFIX = riak
export RIAK_CORE_STAT_PREFIX
Expand Down Expand Up @@ -109,12 +110,12 @@ $(eval stagedevrel : $(foreach n,$(SEQ),stagedev$(n)))
$(eval devrel : $(foreach n,$(SEQ),dev$(n)))

dev% : all
rel/gen_dev dev$* rel/vars/dev_vars.config.src rel/vars/$*_vars.config
$(REBAR) release -o dev/dev$* --overlay_vars rel/vars/$*_vars.config
rel/gen_dev $(DEVREL_NODE)$* rel/vars/dev_vars.config.src rel/vars/$*_vars.config $*
$(REBAR) release -o dev/$(DEVREL_NODE)$* --overlay_vars rel/vars/$*_vars.config

stagedev% : all
rel/gen_dev dev$* rel/vars/dev_vars.config.src rel/vars/$*_vars.config
$(REBAR) as dev release -o dev/dev$* --overlay_vars rel/vars/$*_vars.config
rel/gen_dev $(DEVREL_NODE)$* rel/vars/dev_vars.config.src rel/vars/$*_vars.config $*
$(REBAR) as dev release -o dev/$(DEVREL_NODE)$* --overlay_vars rel/vars/$*_vars.config

perfdev : all
perfdev/bin/riak stop || :
Expand Down
8 changes: 4 additions & 4 deletions rel/gen_dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
# Generate an overlay config for devNNN from vars.src and write to vars
#

NAME=$1
NAME=${NAME:-$1}
TEMPLATE=$2
VARFILE=$3
NUMBER=$4
PORT_BASE=${PORT_BASE:-10000}

## Allocate some ports per node
## .
## .7 - http
NODE="$NAME@127.0.0.1"

NUMBER=${NAME##dev}
BASE=$((10000 + 10 * $NUMBER))
BASE=$(($PORT_BASE + 10 * $NUMBER))
YZSOLRJMXPORT=$(($BASE + 3))
YZSOLRPORT=$(($BASE + 4))
CM_PORT=$(($BASE + 6))
Expand Down