Made with ❤️ using TypeScript and Deno by Gurneesh
Developers using Google Cloud Run lack a streamlined, declarative deployment tool similar to Wrangler for Cloudflare Workers. This gap results in complex deployment processes, increased potential for configuration errors, and reduced developer productivity.
Create a comprehensive, user-friendly tool that enables declarative deployments for Google Cloud Run, simplifying the process and improving developer experience.
- Simplify Cloud Run deployments
- Provide a declarative configuration approach
- Enhance version control for service configurations
- Enable easy management of multiple environments
- Improve CI/CD integration for Cloud Run services
- Use a single YAML file (
cloudrun.yaml
) to define entire service configuration - Support multiple environment definitions within one file
- Develop an intuitive command-line interface for deployments and management
- Implement commands like
deploy
,rollback
, andstatus
- Enable uploading and managing different versions of services
- Provide easy rollback functionality
- Support gradual rollouts and traffic splitting between versions
- Allow percentage-based traffic allocation
- Facilitate easy switching between development, staging, and production environments
- Support environment-specific configurations
- Integrate with Google Secret Manager for secure handling of sensitive data
- Allow declarative configuration of custom domain mappings
- Enable setting up Cloud Monitoring alerts and dashboards via configuration
- Provide plugins or actions for popular CI/CD platforms (e.g., GitHub Actions, GitLab CI)
- Design an intuitive, developer-friendly interface
- Prioritize clear, helpful error messages and logs
- Develop comprehensive documentation and examples
- Implement the tool using a modern, maintainable programming language (e.g., TypeScript with Deno)
- Utilize Google Cloud APIs for interacting with Cloud Run and related services
- Design a modular architecture to allow for future expansions
- Open-source the tool to encourage community contributions and adoption
- Create tutorials and blog posts to showcase the tool's capabilities
- Engage with the Google Cloud community to gather feedback and iterate on features
- Explore potential integration or partnership opportunities with Google Cloud
- Number of active users and deployments
- Reduction in deployment time and errors for Cloud Run services
- Community engagement (GitHub stars, forks, contributions)
- User satisfaction and feedback
- Implement core declarative configuration and deployment features
- Develop basic CLI interface
- Release initial version and gather early adopter feedback
- Add version management and traffic splitting features
- Implement secrets management integration
- Improve CI/CD integration capabilities
- Develop custom domain management
- Implement monitoring and alerting configuration
- Enhance user experience based on community feedback
- Continuously improve and expand features based on user needs
- Foster community contributions and plugins
- Explore advanced use cases and integrations
CloudRunify aims to significantly improve the developer experience, streamline deployments, and bring the simplicity of tools like Wrangler to the Cloud Run ecosystem. By focusing on user needs and leveraging the power of declarative configurations, we can create a valuable asset for the Google Cloud community.
- Save service account secret in GOOGLE_CREDENTIALS
name: CloudRunify Deployment
on: push: branches: - main # Change to the branch you want to trigger the deployment
jobs: deploy: runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Set Google Cloud Project
run: |
gcloud config set project scrape-429402
curl -L -o cloudrunify.cjs "https://github.com/gurneesh9/cloudrunify/releases/download/v0.0.1/cloudrunify.cjs"
node cloudrunify.cjs deploy

-
Download cloudrunify.cjs
-
cp cloudrunify.cjs /usr/local/bin/cloudrunify
-
cloudrunify init / package / deploy
-
Eample YAML for simple service deployment

CloudRunify provides commands to manage secrets in Google Cloud Secret Manager. These secrets can then be used in your Cloud Run deployments.
cloudrunify secret create -p [PROJECT_ID] -n [SECRET_NAME] -r [REGION] -k [KEY_FILE_PATH]
This command creates a new secret in Google Cloud Secret Manager. It prompts you for the secret value.
-p, --project <projectId>
: Google Cloud Project ID (required)-n, --name <secretName>
: Secret Name (required)-r, --region <region>
: Region (required, defaults to us-central1)-k, --key <path>
: Path to service account key file or 'json' for GitHub Actions (optional)
cloudrunify secret delete -p [PROJECT_ID] -n [SECRET_NAME] -r [REGION] -k [KEY_FILE_PATH]
This command deletes a secret from Google Cloud Secret Manager. It prompts for confirmation.
-p, --project <projectId>
: Google Cloud Project ID (required)-n, --name <secretName>
: Secret Name (required)-r, --region <region>
: Region (required, defaults to us-central1)-k, --key <path>
: Path to service account key file or 'json' for GitHub Actions (optional)
cloudrunify secret list -p [PROJECT_ID] -k [KEY_FILE_PATH]
This command lists all secrets in the specified project.
-p, --project <projectId>
: Google Cloud Project ID (required)-k, --key <path>
: Path to service account key file or 'json' for GitHub Actions (optional)
To use secrets in your Cloud Run deployments, add a secrets
section to your cloudrun.yaml
file:
version: "1.0"
project_id: "your-project-id"
region: "us-central1"
service:
name: "your-service-name"
allow_unauthenticated: false
container:
image: "your-image-name"
port: 8080
env_vars:
- name: MY_SECRET_ENV
value: "$(MY_SECRET)"
resources:
cpu: "1"
memory: "256Mi"
scaling:
min_instances: 1
max_instances: 2
concurrency: 100
secrets:
- name: MY_SECRET
version: "1"
mount_path: "/secrets/my-secret"
traffic:
- tag: "latest"
percent: 100
Remember to create the secret using the secret create
command before deploying. The value
field in env_vars
uses the syntax $(SECRET_NAME)
to reference the secret.
Contributions are welcome! Please open an issue or submit a pull request.