Unverified Commit 552146f2 authored by Biswa Panda's avatar Biswa Panda Committed by GitHub
Browse files

fix: update dynamo namespace env var usage (#3477)

parent 466b1993
...@@ -6,9 +6,6 @@ kind: DynamoGraphDeployment ...@@ -6,9 +6,6 @@ kind: DynamoGraphDeployment
metadata: metadata:
name: sglang-disagg-planner name: sglang-disagg-planner
spec: spec:
envs:
- name: DYNAMO_NAMESPACE
value: "dynamo"
pvcs: pvcs:
- name: dynamo-pvc - name: dynamo-pvc
create: false # Must be pre-created before deployment and SLA profiler must have been run create: false # Must be pre-created before deployment and SLA profiler must have been run
......
...@@ -9,9 +9,6 @@ spec: ...@@ -9,9 +9,6 @@ spec:
pvcs: pvcs:
- name: dynamo-pvc - name: dynamo-pvc
create: false create: false
envs:
- name: DYNAMO_NAMESPACE
value: "trtllm-disagg-planner"
services: services:
Frontend: Frontend:
dynamoNamespace: trtllm-disagg-planner dynamoNamespace: trtllm-disagg-planner
......
...@@ -9,9 +9,6 @@ spec: ...@@ -9,9 +9,6 @@ spec:
pvcs: pvcs:
- name: dynamo-pvc - name: dynamo-pvc
create: false # Must be pre-created before deployment and SLA profiler must have been run create: false # Must be pre-created before deployment and SLA profiler must have been run
envs:
- name: DYNAMO_NAMESPACE
value: "vllm-disagg-planner"
services: services:
Frontend: Frontend:
dynamoNamespace: vllm-disagg-planner dynamoNamespace: vllm-disagg-planner
......
...@@ -40,7 +40,7 @@ from dynamo.runtime import DistributedRuntime ...@@ -40,7 +40,7 @@ from dynamo.runtime import DistributedRuntime
from . import __version__ from . import __version__
DYNAMO_NAMESPACE_ENV_VAR = "DYN_NAMESPACE" DYN_NAMESPACE_ENV_VAR = "DYN_NAMESPACE"
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -142,7 +142,7 @@ def parse_args(): ...@@ -142,7 +142,7 @@ def parse_args():
parser.add_argument( parser.add_argument(
"--namespace", "--namespace",
type=str, type=str,
default=os.environ.get(DYNAMO_NAMESPACE_ENV_VAR), default=os.environ.get(DYN_NAMESPACE_ENV_VAR),
help="Dynamo namespace for model discovery scoping. If specified, models will only be discovered from this namespace. If not specified, discovers models from all namespaces (global discovery).", help="Dynamo namespace for model discovery scoping. If specified, models will only be discovered from this namespace. If not specified, discovers models from all namespaces (global discovery).",
) )
parser.add_argument( parser.add_argument(
......
...@@ -84,7 +84,7 @@ def _get_default_prometheus_endpoint(port: str, namespace: str): ...@@ -84,7 +84,7 @@ def _get_default_prometheus_endpoint(port: str, namespace: str):
class SLAPlannerDefaults(BasePlannerDefaults): class SLAPlannerDefaults(BasePlannerDefaults):
port = os.environ.get("PROMETHEUS_PORT", "9090") port = os.environ.get("PROMETHEUS_PORT", "9090")
namespace = os.environ.get("DYNAMO_NAMESPACE", "vllm-disagg-planner") namespace = os.environ.get("DYN_NAMESPACE", "vllm-disagg-planner")
prometheus_endpoint = _get_default_prometheus_endpoint(port, namespace) prometheus_endpoint = _get_default_prometheus_endpoint(port, namespace)
profile_results_dir = "profiling_results" profile_results_dir = "profiling_results"
isl = 3000 # in number of tokens isl = 3000 # in number of tokens
......
...@@ -191,7 +191,7 @@ export EPP_IMAGE=<the-epp-image-you-built> ...@@ -191,7 +191,7 @@ export EPP_IMAGE=<the-epp-image-you-built>
**Configuration** **Configuration**
You can configure the plugin by setting environment vars in your [values-epp-aware.yaml]. You can configure the plugin by setting environment vars in your [values-epp-aware.yaml].
- Overwrite the `DYNAMO_NAMESPACE` env var if needed to match your model's dynamo namespace. - Overwrite the `DYN_NAMESPACE` env var if needed to match your model's dynamo namespace.
- Set `DYNAMO_BUSY_THRESHOLD` to configure the upper bound on how “full” a worker can be (often derived from kv_active_blocks or other load metrics) before the router skips it. If the selected worker exceeds this value, routing falls back to the next best candidate. By default the value is negative meaning this is not enabled. - Set `DYNAMO_BUSY_THRESHOLD` to configure the upper bound on how “full” a worker can be (often derived from kv_active_blocks or other load metrics) before the router skips it. If the selected worker exceeds this value, routing falls back to the next best candidate. By default the value is negative meaning this is not enabled.
- Set `DYNAMO_ROUTER_REPLICA_SYNC=true` to enable a background watcher to keep multiple router instances in sync (important if you run more than one KV router per component). - Set `DYNAMO_ROUTER_REPLICA_SYNC=true` to enable a background watcher to keep multiple router instances in sync (important if you run more than one KV router per component).
- By default the Dynamo plugin uses KV routing. You can expose `DYNAMO_USE_KV_ROUTING=false` in your [values-epp-aware.yaml] if you prefer to route in the round-robin fashion. - By default the Dynamo plugin uses KV routing. You can expose `DYNAMO_USE_KV_ROUTING=false` in your [values-epp-aware.yaml] if you prefer to route in the round-robin fashion.
......
...@@ -647,7 +647,7 @@ index 0000000..1f6a41f ...@@ -647,7 +647,7 @@ index 0000000..1f6a41f
+) +)
+ +
+func loadDynamoConfig() { +func loadDynamoConfig() {
+ ffiNamespace = getEnvOrDefault("DYNAMO_NAMESPACE", "vllm-agg") + ffiNamespace = getEnvOrDefault("DYN_NAMESPACE", "vllm-agg")
+ ffiComponent = getEnvOrDefault("DYNAMO_COMPONENT", "backend") + ffiComponent = getEnvOrDefault("DYNAMO_COMPONENT", "backend")
+ ffiModel = getEnvOrDefault("DYNAMO_MODEL", "Qwen/Qwen3-0.6B") + ffiModel = getEnvOrDefault("DYNAMO_MODEL", "Qwen/Qwen3-0.6B")
+ ffiWorkerID = getEnvInt64OrDefault("DYNAMO_WORKER_ID", 1) + ffiWorkerID = getEnvInt64OrDefault("DYNAMO_WORKER_ID", 1)
......
...@@ -84,7 +84,7 @@ spec: ...@@ -84,7 +84,7 @@ spec:
value: "{{ $platformName }}-etcd.{{ $platformNs }}:2379" value: "{{ $platformName }}-etcd.{{ $platformNs }}:2379"
- name: NATS_SERVER - name: NATS_SERVER
value: "nats://{{ $platformName }}-nats.{{ $platformNs }}:4222" value: "nats://{{ $platformName }}-nats.{{ $platformNs }}:4222"
- name: DYNAMO_NAMESPACE - name: DYN_NAMESPACE
value: "{{ $ns }}" value: "{{ $ns }}"
- name: DYNAMO_COMPONENT - name: DYNAMO_COMPONENT
value: "{{ $comp }}" value: "{{ $comp }}"
......
...@@ -35,7 +35,7 @@ podLogs: ...@@ -35,7 +35,7 @@ podLogs:
structuredMetadata: structuredMetadata:
pod: pod # Set structured metadata "pod" from label "pod" pod: pod # Set structured metadata "pod" from label "pod"
namespaces: namespaces:
- $DYNAMO_NAMESPACE - $DYN_NAMESPACE
# Collectors # Collectors
alloy-singleton: alloy-singleton:
......
...@@ -27,11 +27,11 @@ While this guide does not use Prometheus, it assumes Grafana is pre-installed wi ...@@ -27,11 +27,11 @@ While this guide does not use Prometheus, it assumes Grafana is pre-installed wi
The following env variables are set: The following env variables are set:
- `MONITORING_NAMESPACE`: The namespace where Loki is installed - `MONITORING_NAMESPACE`: The namespace where Loki is installed
- `DYNAMO_NAMESPACE`: The namespace where Dynamo Cloud Operator is installed - `DYN_NAMESPACE`: The namespace where Dynamo Cloud Operator is installed
```bash ```bash
export MONITORING_NAMESPACE=monitoring export MONITORING_NAMESPACE=monitoring
export DYNAMO_NAMESPACE=dynamo-system export DYN_NAMESPACE=dynamo-system
``` ```
## Installation Steps ## Installation Steps
...@@ -99,7 +99,7 @@ podLogs: ...@@ -99,7 +99,7 @@ podLogs:
- "nvidia_com_dynamo_component_type" # extract this label from the dynamo graph deployment - "nvidia_com_dynamo_component_type" # extract this label from the dynamo graph deployment
- "nvidia_com_dynamo_graph_deployment_name" # extract this label from the dynamo graph deployment - "nvidia_com_dynamo_graph_deployment_name" # extract this label from the dynamo graph deployment
namespaces: namespaces:
- $DYNAMO_NAMESPACE - $DYN_NAMESPACE
``` ```
### 3. Configure Grafana with the Loki datasource and Dynamo Logs dashboard ### 3. Configure Grafana with the Loki datasource and Dynamo Logs dashboard
...@@ -126,7 +126,7 @@ At this point, we should have everything in place to collect and view logs in ou ...@@ -126,7 +126,7 @@ At this point, we should have everything in place to collect and view logs in ou
To enable structured logs in a DynamoGraphDeployment, we need to set the `DYN_LOGGING_JSONL` environment variable to `1`. This is done for us in the `agg_logging.yaml` setup for the Sglang backend. We can now deploy the DynamoGraphDeployment with: To enable structured logs in a DynamoGraphDeployment, we need to set the `DYN_LOGGING_JSONL` environment variable to `1`. This is done for us in the `agg_logging.yaml` setup for the Sglang backend. We can now deploy the DynamoGraphDeployment with:
```bash ```bash
kubectl apply -n $DYNAMO_NAMESPACE -f components/backends/sglang/deploy/agg_logging.yaml kubectl apply -n $DYN_NAMESPACE -f components/backends/sglang/deploy/agg_logging.yaml
``` ```
Send a few chat completions requests to generate structured logs across the frontend and worker pods across the DynamoGraphDeployment. We are now all set to view the logs in Grafana. Send a few chat completions requests to generate structured logs across the frontend and worker pods across the DynamoGraphDeployment. We are now all set to view the logs in Grafana.
......
...@@ -9,8 +9,6 @@ spec: ...@@ -9,8 +9,6 @@ spec:
envs: envs:
- name: DYNAMO_SERVICE_CONFIG - name: DYNAMO_SERVICE_CONFIG
value: '{"Prometheus":{"global":{"scrape_interval":"5s"},"scrape_configs":[{"job_name":"prometheus","static_configs":[{"targets":["localhost:8000"]}]},{"job_name":"frontend","static_configs":[{"targets":["vllm-disagg-planner-frontend:8000"]}]}]}}' value: '{"Prometheus":{"global":{"scrape_interval":"5s"},"scrape_configs":[{"job_name":"prometheus","static_configs":[{"targets":["localhost:8000"]}]},{"job_name":"frontend","static_configs":[{"targets":["vllm-disagg-planner-frontend:8000"]}]}]}}'
- name: DYNAMO_NAMESPACE
value: "vllm-disagg-planner"
services: services:
Frontend: Frontend:
dynamoNamespace: vllm-disagg-planner dynamoNamespace: vllm-disagg-planner
......
...@@ -9,7 +9,7 @@ spec: ...@@ -9,7 +9,7 @@ spec:
envs: envs:
- name: DYNAMO_SERVICE_CONFIG - name: DYNAMO_SERVICE_CONFIG
value: '{"Prometheus":{"global":{"scrape_interval":"5s"},"scrape_configs":[{"job_name":"prometheus","static_configs":[{"targets":["localhost:9090"]}]},{"job_name":"frontend","static_configs":[{"targets":["vllm-disagg-planner-frontend:8000"]}]}]}}' value: '{"Prometheus":{"global":{"scrape_interval":"5s"},"scrape_configs":[{"job_name":"prometheus","static_configs":[{"targets":["localhost:9090"]}]},{"job_name":"frontend","static_configs":[{"targets":["vllm-disagg-planner-frontend:8000"]}]}]}}'
- name: DYNAMO_NAMESPACE - name: DYN_NAMESPACE
value: "vllm-disagg-planner" value: "vllm-disagg-planner"
services: services:
Frontend: Frontend:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment