Skip to content

Conversation

@atchernych
Copy link
Contributor

@atchernych atchernych commented Jul 24, 2025

Overview:

DYN-704

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Documentation

    • Improved clarity and added references in the examples README, including new example links and enhanced deployment instructions.
    • Updated the Hello World example documentation to clarify its purpose and added a new section with step-by-step Kubernetes deployment instructions.
    • Adjusted documentation links and descriptions for better accuracy and usability.
  • New Features

    • Introduced a Kubernetes deployment manifest for the Hello World example, enabling streamlined deployment of both frontend and worker services with resource and health probe configurations.

@atchernych atchernych changed the title doc: hello world deploy example docs: hello world deploy example Jul 25, 2025
@github-actions github-actions bot added the docs label Jul 25, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

This update revises documentation for example deployments, adds Kubernetes deployment instructions and a manifest for the Hello World example, and improves clarity on image building and usage. The changes include new example links, updated resource references, and detailed deployment steps for running the Hello World example in a Kubernetes environment.

Changes

File(s) Change Summary
docs/examples/README.md, docs/index.rst Improved documentation clarity, added new example links, updated resource references, and reworded instructions.
examples/runtime/hello_world/README.md Added Kubernetes deployment instructions and commands for the Hello World example.
examples/runtime/hello_world/deploy/hello_world.yaml Introduced a new Kubernetes manifest defining a DynamoGraphDeployment with two services for Hello World example.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Docs
    participant Kubernetes
    participant Frontend
    participant HelloWorldWorker

    User->>Docs: Read deployment instructions
    User->>Kubernetes: Apply hello_world.yaml manifest
    Kubernetes->>Frontend: Deploy Frontend service
    Kubernetes->>HelloWorldWorker: Deploy HelloWorldWorker service
    Frontend-->>Kubernetes: Report liveness/readiness
    HelloWorldWorker-->>Kubernetes: Report liveness/readiness
    User->>Kubernetes: (Optional) Delete deployment
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

A bunny hops through docs anew,
With YAMLs fresh and guidance true.
Kubernetes pods now leap in line,
Hello World waves—"Deploy me, I'm fine!"
New links and notes for all to see,
Example clouds for you and me.
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (5)
examples/runtime/hello_world/README.md (1)

104-118: Minor polish for the new K8s deployment section

  1. The relative link ../../../docs/guides/dynamo_deploy/quickstart.md will break when this README is rendered on GitHub (it escapes the repo root). Consider an absolute repo-relative link (docs/guides/dynamo_deploy/quickstart.md) or a full URL.
  2. cd dynamo is redundant if the user is already in the repository root; it also breaks paths when the repo is cloned into a differently named folder.
  3. Worth adding a note that the namespace must exist: kubectl create namespace ${NAMESPACE}.

No functional issues, just usability tweaks.

docs/examples/README.md (2)

7-10: Typo & wording

owmown

-You could build your owm image using
+You could build your own image using

Also, “prior to applying” can be shortened to “before applying” for brevity.


43-45: Make the CR-YAML hint actionable

You mention that many examples ship a CR under deploy/, but only link to the vLLM YAML. It would be helpful to list (or at least link) the newly-added Hello-World YAML here for discoverability.

-Use [VLLM YAML](../../components/backends/vllm/deploy/agg.yaml) for an example.
+See the [VLLM YAML](../../components/backends/vllm/deploy/agg.yaml) or the new
+[Hello-World YAML](../../examples/runtime/hello_world/deploy/hello_world.yaml)
+for concrete examples.
examples/runtime/hello_world/deploy/hello_world.yaml (2)

41-47: Image reference is private – consider a public example

gitlab-master.nvidia.com:5005/... is not accessible to external users reading the OSS docs.
Pointing to a public nvcr.io/... image (or using a placeholder <your-image>) would make the manifest immediately runnable.


48-67: Worker readiness probe may never succeed

The probe looks for "Serving endpoint" inside /tmp/hello_world.log, but the container command appends (tee) to that file only after Python starts. If the log message format changes or buffering delays the write, the pod will stay NotReady.

Consider either:
• Switching to an HTTP readiness probe (mirroring the Frontend), or
• Using a deterministic file touch/echo at the end of worker startup.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3094278 and 67a1f6b.

📒 Files selected for processing (4)
  • docs/examples/README.md (4 hunks)
  • docs/index.rst (1 hunks)
  • examples/runtime/hello_world/README.md (1 hunks)
  • examples/runtime/hello_world/deploy/hello_world.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
examples/runtime/hello_world/README.md (3)

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:92-98
Timestamp: 2025-07-18T16:04:31.771Z
Learning: CRD schemas in files like deploy/cloud/helm/crds/templates/*.yaml are auto-generated from Kubernetes library upgrades and should not be manually modified as changes would be overwritten during regeneration.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.

Learnt from: nnshah1
PR: #1444
File: tests/fault_tolerance/utils/metrics.py:30-32
Timestamp: 2025-07-01T13:55:03.940Z
Learning: The @dynamo_worker() decorator in the dynamo codebase returns a wrapper that automatically injects the runtime parameter before calling the wrapped function. This means callers only need to provide the non-runtime parameters, while the decorator handles injecting the runtime argument automatically. For example, a function with signature async def get_metrics(runtime, log_dir) decorated with @dynamo_worker() can be called as get_metrics(log_dir) because the decorator wrapper injects the runtime parameter.

docs/examples/README.md (1)

Learnt from: PeaBrane
PR: #1409
File: examples/router_standalone/worker.py:171-186
Timestamp: 2025-06-08T08:30:45.126Z
Learning: Example code in the examples/ directory may intentionally use hard-coded values or simplified implementations that wouldn't be appropriate for production code, but are acceptable for demonstration and testing purposes.

examples/runtime/hello_world/deploy/hello_world.yaml (2)

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:1178-1180
Timestamp: 2025-07-18T16:05:05.534Z
Learning: The stopSignal field under lifecycle in DynamoComponentDeployment CRDs is autogenerated due to Kubernetes library upgrades (k8s.io/api and k8s.io/apimachinery from v0.32.3 to v0.33.1), not a manual design decision by the user.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamographdeployments.yaml:1233-1235
Timestamp: 2025-07-18T16:04:47.465Z
Learning: The stopSignal field in Kubernetes CRDs like DynamoGraphDeployment and DynamoComponentDeployment is autogenerated by controller-gen when upgrading Kubernetes library versions, and represents expected upstream API changes rather than manual code that needs custom validation.

🪛 LanguageTool
docs/examples/README.md

[style] ~50-~50: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...date the image location in your CR file prior to applying. You could build your owm imag...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[grammar] ~51-~51: Ensure spelling is correct
Context: ...prior to applying. You could build your owm image using ```bash ./container/build....

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Mirror Repository to GitLab
🔇 Additional comments (3)
docs/examples/README.md (1)

49-63: Flag large CPU/GPU figures in documentation sample

10 vCPU, 20 GiB RAM and 1 GPU for “Hello World” may scare newcomers and exhaust small clusters. Consider using modest defaults (e.g., 0.5 CPU, 512 Mi, 0 GPU) and documenting how to raise them for production.

examples/runtime/hello_world/deploy/hello_world.yaml (2)

72-79: Resource requests are excessive for a demo

10 CPU / 20 GiB / 1 GPU for a greeting service is over-provisioned and blocks adoption on Minikube-like clusters. Recommend lowering defaults and documenting how to upscale.


32-39: Use the standard GPU resource key

Kubernetes expects vendor-qualified extended resources, e.g. nvidia.com/gpu.
Using a plain gpu: key will be ignored by the scheduler unless a custom resource-quota controller is in place.

-          gpu: "1"
+          nvidia.com/gpu: "1"
⛔ Skipped due to learnings
Learnt from: nnshah1
PR: ai-dynamo/dynamo#1444
File: tests/fault_tolerance/configs/agg_tp_1_dp_8.yaml:31-38
Timestamp: 2025-07-01T15:33:53.262Z
Learning: In fault tolerance test configurations, the `resources` section under `ServiceArgs` specifies resources per individual worker, not total resources for all workers. So `workers: 8` with `gpu: '1'` means 8 workers × 1 GPU each = 8 GPUs total.

Signed-off-by: atchernych <[email protected]>
Signed-off-by: atchernych <[email protected]>
Copy link
Contributor

@dmitry-tokarev-nv dmitry-tokarev-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@atchernych atchernych merged commit f809659 into main Jul 28, 2025
10 of 11 checks passed
@atchernych atchernych deleted the DYN-704-hello-world-off-main branch July 28, 2025 21:29
This was referenced Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants