-
Notifications
You must be signed in to change notification settings - Fork 2k
Enhancement: Generalise container env for agent #395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Enhancement: Generalise container env for agent #395
Conversation
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. |
b7dfe64
to
9f9e262
Compare
Tagging @hangfei ! |
Hey @boyangsvl @hangfei 👋 I’m happy to make any changes if needed — just let me know! Thanks again for reviewing when you get the chance |
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! |
Thanks for the PR. I will let @Jacksunwei take a look as he's the expert in this area.
|
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. |
0d9ab66
to
63856ff
Compare
Thanks for the feedback, @boyangsvl! Looking forward to feedback from @Jacksunwei as well 🙂 |
61c3f85
to
86ca52a
Compare
24cf715
to
26c3a75
Compare
Thanks! I will let Wei review this PR as he's more familiar with the deployment code. |
Any update? |
@Alexd1001 Thanks for the reminder, let me resolve the code conflicts and request for the re-review of the changes |
Thank you!! |
433d1f0
to
632bf8b
Compare
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 Thanks! |
✅ 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. |
Hi @seanzhou1023 @Jacksunwei @boyangsvl @Alexd1001 👋 |
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! |
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! |
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