Skip to content

feat(deployment): Add CloudRun deployment support to ADL CLI - #55

Merged
edenreich merged 17 commits into
mainfrom
claude/issue-52-20250905-1632
Sep 5, 2025
Merged

edenreich merged 17 commits into
mainfrom
claude/issue-52-20250905-1632

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Adds support for deploying ADL-generated A2A agents to Google Cloud Run.

Summary

  • Add CloudRun service template with Knative configuration
  • Update CLI flag to support both kubernetes and cloudrun options
  • Extend template registry to generate CloudRun deployment files
  • Add deploy tasks to Taskfile for both deployment types
  • Integrate CloudRun deployment into CD workflow
  • Update documentation with CloudRun deployment instructions

Test plan

  • All existing tests pass
  • Code formatting and linting completed
  • Implementation follows project conventions
  • Documentation updated for both platforms

Closes #52

Generated with Claude Code

- Add CloudRun service template with Knative configuration
- Update CLI flag to support both kubernetes and cloudrun options  
- Extend template registry to generate CloudRun deployment files
- Add deploy tasks to Taskfile for both deployment types
- Integrate CloudRun deployment into CD workflow
- Update documentation with CloudRun deployment instructions
- Add required environment variables and setup guide

Closes #52

Co-authored-by: Eden Reich <[email protected]>
desc: Deploy to Google Cloud Run
cmd: |
# Build and push Docker image
gcloud builds submit --tag gcr.io/$PROJECT_ID/{{`{{.APP_NAME}}`}}:{{`{{.VERSION}}`}}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What if the user don't want to use cloud build?

@edenreich

Copy link
Copy Markdown
Contributor Author

@claude Please use the traditional deployment to cloud run - don't use knative (it requires the user to opt-in to using kubernetes) - the whole idea of CloudRun is that it's managed and simple to deploy using the gcloud utility, it's a serverless service, if we introduce knative the user need to have a kubernetes cluster - not ideal. Please cleanup.

@claude

claude Bot commented Sep 5, 2025 •

Copy link
Copy Markdown
Contributor

Claude finished @edenreich's task —— View job


✅ CloudRun deployment refactored to use traditional gcloud approach

Todo List

  • Analyze current Knative-based CloudRun implementation
  • Research traditional gcloud CloudRun deployment approach
  • Replace Knative service.yaml with gcloud deployment script
  • Update Taskfile deployment commands to use gcloud script
  • Update CD workflow to use gcloud deployment commands
  • Address review comments about service account and Cloud Build alternatives
  • Remove old service.yaml.tmpl file
  • Run linting and formatting
  • Commit changes

Changes Made

Replaced Knative with Direct gcloud Deployment:

  • ❌ Removed cloudrun/service.yaml.tmpl (Knative service definition)
  • ✅ Added cloudrun/deploy.sh.tmpl (gcloud deployment script)
  • ✅ Uses gcloud run deploy with CLI flags instead of YAML
  • ✅ Supports both Docker and Cloud Build for container building
  • ✅ No Kubernetes dependencies - truly serverless

Key Improvements:

  • Serverless: No Kubernetes cluster required
  • Managed: Uses Cloud Run's fully managed platform
  • Flexible: Supports both local Docker and Cloud Build
  • Simple: Direct gcloud commands instead of complex YAML
  • Secure: Includes service account configuration

Updated Integration Points:

  • Taskfile: Now runs ./cloudrun/deploy.sh
  • CD Pipeline: Uses environment variables and script execution
  • Registry: Changed file mapping from .yaml to .sh

The deployment is now truly serverless as you requested - no Knative, no Kubernetes, just managed Cloud Run! 🚀
| Branch: claude/issue-52-20250905-1632

claude Bot and others added 2 commits September 5, 2025 17:25
…d deployment

- Replace Knative service.yaml with gcloud deployment script
- Use direct `gcloud run deploy` commands instead of YAML configurations  
- Support both Docker and Cloud Build for container building
- Update CI/CD workflows to use deployment script
- Eliminate Kubernetes dependency for CloudRun deployments
- Make CloudRun truly serverless and managed

Co-authored-by: Eden Reich <[email protected]>
…dRun deployment

- Update deploy script to use environment variables instead of placeholders
- Add validation for required PROJECT_ID and REGION environment variables
- Remove sed string replacement from CD workflow
- Pass environment variables cleanly through workflow step

Co-authored-by: Eden Reich <[email protected]>
- Enhanced ADL schema with comprehensive CloudRun configuration
- Support for multiple container registries (gcr.io, ghcr.io, custom)
- Configurable resources, scaling, and service settings
- Smart Cloud Build usage based on registry type
- Added example ADL files for different deployment scenarios

Co-authored-by: Eden Reich <[email protected]>
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
Comment thread examples/ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-ghcr-agent.yaml Resolved
Comment thread examples/cloudrun-agent.yaml Resolved
…template variables

- Replace hardcoded deployment flags with ADL configuration values
- Add support for custom service account configuration
- Update deployment summary to show actual configured values
- All values maintain sensible defaults while respecting ADL spec

Co-authored-by: Eden Reich <[email protected]>
@edenreich

edenreich commented Sep 5, 2025 •

Copy link
Copy Markdown
Contributor Author

@claude Please document this feature in the README.md and update CLAUDE.md

@claude

claude Bot commented Sep 5, 2025 •

Copy link
Copy Markdown
Contributor

Claude finished @edenreich's task —— View job


✅ CloudRun deployment documentation completed

Todo List

  • Read current README.md to understand structure
  • Read current CLAUDE.md to understand structure
  • Analyze CloudRun implementation from changed files
  • Add CloudRun deployment documentation to README.md
  • Update CLAUDE.md with CloudRun deployment details
  • Run linting and formatting
  • Commit changes

Changes Made

📖 README.md Documentation:

  • Added comprehensive CloudRun deployment section with configuration examples
  • Updated generate command flags to include --deployment option
  • Added CloudRun workflow examples and CI/CD integration details
  • Included CloudRun files in project structure documentation
  • Added CloudRun example files to examples section
  • Documented container registry options (GCR vs GHCR)
  • Added deployment benefits and workflow sections

📋 CLAUDE.md Updates:

  • Updated CloudRun deployment details with correct generated file (deploy.sh)
  • Added CloudRun deployment features section with comprehensive details
  • Documented configurable resources and container registry support
  • Added ADL configuration examples for CloudRun deployment
  • Included deployment script features and capabilities

🔧 Key Features Documented:

  • Serverless Deployment: True serverless without Kubernetes complexity
  • Container Registry Flexibility: Support for GCR, GHCR, and custom registries
  • Configurable Resources: CPU, memory, scaling, and service configurations
  • Generated Scripts: Smart deployment script with validation and summaries
  • CI/CD Integration: Automatic deployment after successful releases

The CloudRun deployment feature is now fully documented in both user-facing (README.md) and developer-facing (CLAUDE.md) documentation files! 🚀


Branch: claude/issue-52-20250905-1632

- Add CloudRun deployment section to README.md with configuration examples
- Document container registry options (GCR vs GHCR)
- Include CloudRun workflow examples and CI/CD integration
- Update CLAUDE.md with CloudRun deployment implementation details
- Add CloudRun examples to project structure and examples sections
- Document deployment script features and environment variables

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Eden Reich <[email protected]>
Comment thread CLAUDE.md Resolved
Comment thread README.md Resolved
@edenreich

Copy link
Copy Markdown
Contributor Author

This feature is not fully tested - but I'm also fine with merging it as is, because I don't actually use it right now, to be iterated and improved. Merging it as-is.

@edenreich
edenreich merged commit 5d3f549 into main Sep 5, 2025
@edenreich
edenreich deleted the claude/issue-52-20250905-1632 branch September 5, 2025 21:17
inference-gateway-releaser Bot added a commit that referenced this pull request Sep 5, 2025
## [0.18.0](v0.17.0...v0.18.0) (2025-09-05)

### ✨ Features

* **deployment:** Add CloudRun deployment support to ADL CLI ([#55](#55)) ([5d3f549](5d3f549)), closes [#52](#52)

### ♻️ Improvements

* **templates:** Simplify GitHub issue templates for better flexibility ([#57](#57)) ([025b6bd](025b6bd)), closes [#56](#56)
* **templates:** Use GitHub repository name variable in CD workflow ([#54](#54)) ([f493c63](f493c63)), closes [#53](#53)
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add another deployment option to --deployment flag

1 participant