Allow demo worker count override
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
.PHONY: demo-ui demo-down demo-logs
|
.PHONY: demo-ui demo-down demo-logs
|
||||||
|
|
||||||
# Convenient entry points from the repository root. Extra settings are passed
|
# Convenient entry points from the repository root. Extra settings are passed
|
||||||
# through, for example: make demo-ui DEMO_WORKERS=3
|
# through, for example: make demo-ui WORKERS=3
|
||||||
demo-ui:
|
demo-ui:
|
||||||
$(MAKE) -C coordinator demo-ui
|
$(MAKE) -C coordinator demo-ui
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ DEMO_COORDINATOR_PORT ?= 18080
|
|||||||
DEMO_UI_TOKEN ?= demo-ui-secret
|
DEMO_UI_TOKEN ?= demo-ui-secret
|
||||||
DEMO_WORKER_TOKEN ?= demo-worker-token
|
DEMO_WORKER_TOKEN ?= demo-worker-token
|
||||||
DEMO_WORKERS ?= 2
|
DEMO_WORKERS ?= 2
|
||||||
|
# Short public knob for `make demo-ui WORKERS=3`; DEMO_WORKERS remains useful
|
||||||
|
# for scripts and backwards-compatible documentation.
|
||||||
|
WORKERS ?= $(DEMO_WORKERS)
|
||||||
DEMO_DIR ?= .demo
|
DEMO_DIR ?= .demo
|
||||||
|
|
||||||
demo-ui:
|
demo-ui:
|
||||||
@@ -27,7 +30,7 @@ demo-ui:
|
|||||||
DEMO_COORDINATOR_PORT="$(DEMO_COORDINATOR_PORT)" \
|
DEMO_COORDINATOR_PORT="$(DEMO_COORDINATOR_PORT)" \
|
||||||
DEMO_UI_TOKEN="$(DEMO_UI_TOKEN)" \
|
DEMO_UI_TOKEN="$(DEMO_UI_TOKEN)" \
|
||||||
DEMO_WORKER_TOKEN="$(DEMO_WORKER_TOKEN)" \
|
DEMO_WORKER_TOKEN="$(DEMO_WORKER_TOKEN)" \
|
||||||
DEMO_WORKERS="$(DEMO_WORKERS)" \
|
DEMO_WORKERS="$(WORKERS)" \
|
||||||
DEMO_DIR="$(DEMO_DIR)" \
|
DEMO_DIR="$(DEMO_DIR)" \
|
||||||
./scripts/demo-ui.sh start
|
./scripts/demo-ui.sh start
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ This uses a separate Docker project and ports `18080` (coordinator) and
|
|||||||
`55432` (PostgreSQL), so it does not conflict with the normal stack. Open
|
`55432` (PostgreSQL), so it does not conflict with the normal stack. Open
|
||||||
`http://localhost:18080/ui`, use username `operator` and password
|
`http://localhost:18080/ui`, use username `operator` and password
|
||||||
`demo-ui-secret`, upload a small ChEMBL TSV, and observe the workers process
|
`demo-ui-secret`, upload a small ChEMBL TSV, and observe the workers process
|
||||||
it. Change the worker count with `make demo-ui DEMO_WORKERS=3`; stop all demo
|
it. Change the worker count with `make demo-ui WORKERS=3`; stop all demo
|
||||||
services and workers with `make demo-down`.
|
services and workers with `make demo-down`.
|
||||||
|
|
||||||
`up` starts three services in order: Postgres waits until `pg_isready` passes, a
|
`up` starts three services in order: Postgres waits until `pg_isready` passes, a
|
||||||
|
|||||||
Reference in New Issue
Block a user