From f79b26e86d64c86ebf6dabac14dc27d21ca8873d Mon Sep 17 00:00:00 2001 From: zz_y Date: Sat, 6 Jun 2026 13:53:45 -0600 Subject: [PATCH] deploy(mvp): single-node mode + configurable backend OTLP ingest port Make the 4-node orchestrator runnable on one host: - topology.env: make NODE{0..3}_{IP,HOST} env-overridable (?:=) so a single-host run can point every node alias at node0/10.10.1.1. - run_demo.sh: add SINGLE_NODE=1 guards that skip agent-b + the node3 producers (they would collide with agent-a on host :4317 / dup the workload under --network host); plumb DP_OTLP_GRPC_PORT / DP_OTLP_HTTP_PORT (data_plane ingest) and ASAP_EDGE_BACKEND_OTLP_PORT (controller-emitted agent export endpoint, see ASAPQuery-backend) so the data_plane ingest can move off :4317 and stop colliding with the agent collector's own OTLP receiver on the shared host network. All knobs default to the existing 4-node values, so multi-node runs are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) --- deploy/mvp-multinode/scripts/run_demo.sh | 13 ++++++++++--- deploy/mvp-multinode/topology.env | 16 ++++++++-------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/deploy/mvp-multinode/scripts/run_demo.sh b/deploy/mvp-multinode/scripts/run_demo.sh index 47c93539..04f2b658 100755 --- a/deploy/mvp-multinode/scripts/run_demo.sh +++ b/deploy/mvp-multinode/scripts/run_demo.sh @@ -482,8 +482,8 @@ backend_up() { --streaming-config=/etc/asap/streaming.yaml \ --query-port=9091 \ --enable-otel-ingest \ - --otel-grpc-port=4317 \ - --otel-http-port=4318 \ + --otel-grpc-port=${DP_OTLP_GRPC_PORT:-4317} \ + --otel-http-port=${DP_OTLP_HTTP_PORT:-4318} \ ${persist_flags} # asap-control-plane (ASAP only) — control plane process. Brought @@ -504,6 +504,7 @@ backend_up() { -e RUST_LOG="info,controller=debug,control_plane=debug" \ -e USE_TYPED_STAGE_SPLIT=1 \ -e ASAP_EDGE_FUSED=1 \ + -e ASAP_EDGE_BACKEND_OTLP_PORT=${ASAP_EDGE_BACKEND_OTLP_PORT:-4317} \ -e CONTROLLER_ADDR=0.0.0.0:8080 \ -e CONTROLLER_OPAMP_ADDR=0.0.0.0:4320 \ -e CONTROLLER_GRPC_ADDR=0.0.0.0:4321 \ @@ -601,7 +602,9 @@ agents_up() { asap/asap-otel-supervised:dev \ --config /etc/otel/supervisor.yaml - # Same on node3 → agent-b + # Same on node3 → agent-b (skipped in SINGLE_NODE mode: agent-b would + # collide with agent-a on host :4317 under --network host). + if [ "${SINGLE_NODE:-0}" != 1 ]; then log "node3 agent-b up (${arm}, supervised)" docker_run_on "${NODE3_HOST}" --cpus=4 --memory=12g --memory-swap=12g \ --name asap-agent-b \ @@ -611,6 +614,7 @@ agents_up() { -v /mydata/mvp-multinode/configs/asap/supervisor.yaml:/etc/otel/supervisor.yaml:ro \ asap/asap-otel-supervised:dev \ --config /etc/otel/supervisor.yaml + fi else # Raw baselines: bare asap-otel collector, static mounted config, no # controller/OpAMP. @@ -624,6 +628,7 @@ agents_up() { asap/asap-otel:dev \ --config=/etc/otel/config.yaml + if [ "${SINGLE_NODE:-0}" != 1 ]; then log "node3 agent-b up (${arm})" docker_run_on "${NODE3_HOST}" --cpus=4 --memory=12g --memory-swap=12g \ --name asap-agent-b \ @@ -633,6 +638,7 @@ agents_up() { -v /mydata/mvp-multinode/configs/${agent_cfg}:/etc/otel/config.yaml:ro \ asap/asap-otel:dev \ --config=/etc/otel/config.yaml + fi fi # Wait for agent OTLP receiver to come up @@ -656,6 +662,7 @@ agents_up() { -seed=${OTELAPP_SEED:-42} done for i in $(seq 1 ${N_PRODUCERS_PER_NODE}); do + [ "${SINGLE_NODE:-0}" = 1 ] && break log "node3 producer-b-${i} up" docker_run_on "${NODE3_HOST}" --cpus=1 --memory=4g --memory-swap=4g \ --name asap-producer-b-${i} \ diff --git a/deploy/mvp-multinode/topology.env b/deploy/mvp-multinode/topology.env index 357caa17..40a32fe9 100644 --- a/deploy/mvp-multinode/topology.env +++ b/deploy/mvp-multinode/topology.env @@ -2,15 +2,15 @@ # Sourced by run_demo.sh and helper scripts. # ── Node IPs ── -NODE0_IP=10.10.1.1 # producers + agent-a (data source) -NODE1_IP=10.10.1.2 # COLD backend: MinIO, Thanos {query,store,compact}, gorilla-merger, Prometheus -NODE2_IP=10.10.1.3 # WARM backend: data_plane + control_plane only -NODE3_IP=10.10.1.4 # producers + agent-b (data source) +NODE0_IP="${NODE0_IP:-10.10.1.1}" # producers + agent-a (data source) +NODE1_IP="${NODE1_IP:-10.10.1.2}" # COLD backend: MinIO, Thanos {query,store,compact}, gorilla-merger, Prometheus +NODE2_IP="${NODE2_IP:-10.10.1.3}" # WARM backend: data_plane + control_plane only +NODE3_IP="${NODE3_IP:-10.10.1.4}" # producers + agent-b (data source) -NODE0_HOST=node0 -NODE1_HOST=node1 -NODE2_HOST=node2 -NODE3_HOST=node3 +NODE0_HOST="${NODE0_HOST:-node0}" +NODE1_HOST="${NODE1_HOST:-node1}" +NODE2_HOST="${NODE2_HOST:-node2}" +NODE3_HOST="${NODE3_HOST:-node3}" # ── DNS aliases that get injected via --add-host on every container. # Preserves the existing service-name references in the agent/backend