Skip to content

Conversation

raflFaisal
Copy link

@raflFaisal raflFaisal commented Apr 25, 2025

This PR introduces a flexible and extensible deployment interface for the adk deploy command to support multiple cloud providers (e.g., GCP, AWS, Kubernetes, etc.) and Docker environments.

This proposed changes improves the adk deploy interface to be more flexible, and scalable, enabling easier integration with various cloud environments and future cloud provider support. For more details please refer this discussion

Key Changes:

  • Generalised Dockerfile:
    Removed provider-specific hard-coded variables.

  • Introduced two options for injecting environment variables:
    (1) Using .env files for local development (docker).
    (2)Passing environment variables directly via the adk deploy command for production environments.

  • Modular Deployment Interface:
    (1) Introduced --cloud-provider to specify the target platform (default: gcp).
    (2) Introduced --provider-args for provider-specific parameters (e.g., aws-region, project).
    (3) Implemented cloud-specific deployers for each platform (e.g., GCPDeployer, DockerDeployer).

  • Used a factory pattern to route deployment logic based on the cloud provider.
    Simplified deployment commands with clear, flexible syntax for docker, GCP (AWS, k8s and other cloud providers in future)
    Readme.md file is updated with usage instructions

  • What Will Not Be Supported:
    (1) Non-containerized deployments (e.g., serverless functions).
    (2) CI/CD integration.
    (3) Credential management (assumes provider CLIs are pre-configured).

Test Plan:

Unit Tests:
✅ Existing unittest cases adopted to test deployment logic for 'cloud run'
✅ implemented unitest case for Docker environment handling.

Manual Verification: Successfully deployed and verified agent behavior using the following commands:
✅ adk deploy cloud_run agents/llm_auditor
✅ adk deploy cloud_run --with_ui agents/llm_auditor
✅ adk deploy cloud_run --project=myproject-9094 --region=europe-west3 agents/llm_auditor
✅ adk deploy cloud_run --project=myproject-9094 --region=europe-west3 --with_ui agents/llm_auditor
✅ adk deploy cloud_run --project=myproject-9094 --region=europe-west3 --with_ui
--env GOOGLE_GENAI_USE_VERTEXAI=0
--env GOOGLE_API_KEY=secret-key
agents/llm_auditor

✅ adk deploy docker agents/llm_auditor
✅ adk deploy docker agents/llm_auditor --with_ui
✅ adk deploy docker --with_ui
--env GOOGLE_GENAI_USE_VERTEXAI=0
--env GOOGLE_API_KEY=secret-key
agents/llm_auditor

Copy link

google-cla bot commented Apr 25, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@raflFaisal raflFaisal force-pushed the raflFaisal/generaliseContainerEnvForAgent branch 2 times, most recently from b7dfe64 to 9f9e262 Compare April 25, 2025 22:18
@raflFaisal
Copy link
Author

Tagging @hangfei !

@raflFaisal
Copy link
Author

raflFaisal commented Apr 29, 2025

Hi @hangfei and maintainers! 👋 Just a gentle reminder — this PR addresses Issue #184 and is ready for review.
Please let me know if there’s anything I should update. Thanks a lot for your time and consideration!

@raflFaisal
Copy link
Author

Hey @boyangsvl @hangfei 👋
Just following up on this PR, based on discussion in #184

I’m happy to make any changes if needed — just let me know!
I still think this would be a useful addition, but totally understand if priorities have shifted.

Thanks again for reviewing when you get the chance

@raflFaisal
Copy link
Author

Hey @boyangsvl @hangfei 👋

Just following up on this PR, I wanted to check if there’s anything I can clarify, update, or improve to help move it forward. Appreciate your time and feedback when you have a chance! 🙏

Thanks again!

@boyangsvl boyangsvl requested a review from Jacksunwei May 23, 2025 23:04
@boyangsvl
Copy link
Collaborator

Thanks for the PR. I will let @Jacksunwei take a look as he's the expert in this area.
Generally I like where this is going, a couple of suggestions:

  1. I'd like to keep the current command line structure, e.g. adk deploy cloud_run ..., so please avoid add new parameters like 'cloud_provider'.
  2. What is provided after adk deploy can be used as the identifier of the cloud provider. e.g. adk deploy aws, adk deploy docker, etc

@raflFaisal
Copy link
Author

raflFaisal commented May 24, 2025

Thanks @boyangsvl for the feedback! That makes sense, I’ll remove the cloud_provider parameter and refactor the logic to use the existing adk deploy structure for identifying the cloud provider. Appreciate the clarification, and I’ll update the PR soon.

@raflFaisal raflFaisal force-pushed the raflFaisal/generaliseContainerEnvForAgent branch 2 times, most recently from 0d9ab66 to 63856ff Compare May 27, 2025 22:26
@raflFaisal
Copy link
Author

Thanks for the feedback, @boyangsvl!
I've updated the code to retain the current CLI command structure (e.g., adk deploy cloud_run, adk deploy docker) and removed the cloud_provider parameter as suggested. Let me know if there’s anything else you'd like adjusted.

Looking forward to feedback from @Jacksunwei as well 🙂

@raflFaisal raflFaisal force-pushed the raflFaisal/generaliseContainerEnvForAgent branch from 61c3f85 to 86ca52a Compare May 27, 2025 23:03
@raflFaisal raflFaisal force-pushed the raflFaisal/generaliseContainerEnvForAgent branch 2 times, most recently from 24cf715 to 26c3a75 Compare May 28, 2025 22:18
@boyangsvl boyangsvl requested review from boyangsvl and removed request for boyangsvl May 29, 2025 05:00
@boyangsvl
Copy link
Collaborator

Thanks! I will let Wei review this PR as he's more familiar with the deployment code.

@Alexd1001
Copy link

Any update?

@raflFaisal
Copy link
Author

@Alexd1001 Thanks for the reminder, let me resolve the code conflicts and request for the re-review of the changes

@Alexd1001
Copy link

@Alexd1001 Thanks for the reminder, let me resolve the code conflicts and request for the re-review of the changes

Thank you!!

@raflFaisal raflFaisal closed this Sep 22, 2025
@raflFaisal raflFaisal force-pushed the raflFaisal/generaliseContainerEnvForAgent branch from 433d1f0 to 632bf8b Compare September 22, 2025 22:37
@raflFaisal raflFaisal reopened this Sep 22, 2025
@adk-bot
Copy link
Collaborator

adk-bot commented Sep 22, 2025

Response from ADK Triaging Agent

Hello @raflFaisal, thank you for creating this PR!

To help reviewers review your PR more efficiently, could you please add a testing plan section to your PR description and explain how you have tested these changes?

Thanks!

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Sep 22, 2025
@raflFaisal
Copy link
Author

raflFaisal commented Sep 23, 2025

✅ I've updated the PR description to include a Testing Plan as requested by @adk-bot. Let me know if any additional details or changes are needed!

cc @seanzhou1023 @Jacksunwei @Alexd1001 @boyangsvl – really appreciate your time and feedback to review this PR!

Note: This PR was briefly closed due to a fork sync while resolving conflicts. I've restored the intended changes and reopened the PR. All functionality and context remain the same. Thanks for your understanding!

Note 2: I noticed recent changes related to supporting deployments for GKE and Vertex AI Agent Engine. Once this PR is approved and merged, later those can be cleanly generalized within the new modular deployment framework introduced here.

@raflFaisal
Copy link
Author

Hi @seanzhou1023 @Jacksunwei @boyangsvl @Alexd1001 👋
Just a quick reminder, the PR has been updated with the requested changes and testing plan. Would appreciate a review when you get a chance 🙏
Thanks !

@klateefa klateefa self-assigned this Oct 3, 2025
@klateefa
Copy link
Collaborator

klateefa commented Oct 3, 2025

Hi @raflFaisal and thanks to everyone who participated in this thread.

We're currently doing some housekeeping on our pull request queue. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this pull request needs to be caught up to the latest version. To help us keep our backlog focused on current pull requests, we are closing this as stale.

If you're still interested in contributing to this change, could you please update to the very latest version of the library and create a new pull request? Our team will be glad to help with the refreshed PRs and answer any questions!

Thanks for your contribution and understanding!

@raflFaisal
Copy link
Author

Hi @klateefa, @boyangsvl, and team 👋

Thanks for the update! I completely understand the cleanup process. I’m still interested in contributing this enhancement, I’ll update the branch with the latest changes and open a new PR soon.

Appreciate all the feedback and support so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants