Convert Figma logo to code with AI

garden-io logogarden

Automation for Kubernetes development and testing. Spin up production-like environments for development, testing, and CI on demand. Use the same configuration and workflows at every step of the process. Speed up your builds and test runs via shared result caching

3,325
268
3,325
211

Top Related Projects

42,146

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

20,922

Pulumi - Infrastructure as Code in any programming language 🚀

109,710

Production-Grade Container Scheduling and Management

26,764

The Kubernetes Package Manager

17,333

Declarative Continuous Deployment for Kubernetes

6,346

Open and extensible continuous delivery solution for Kubernetes. Powered by GitOps Toolkit.

Quick Overview

Garden is an open-source automation platform for Kubernetes development and testing. It streamlines the process of developing, testing, and deploying applications in Kubernetes environments, providing developers with a more efficient workflow and reducing the complexity of working with containerized applications.

Pros

  • Simplifies Kubernetes development and testing workflows
  • Supports multiple environments and configurations
  • Provides hot reloading for faster development cycles
  • Offers built-in testing and CI/CD integration

Cons

  • Steep learning curve for developers new to Kubernetes
  • Limited support for non-Kubernetes environments
  • May require additional setup and configuration for complex projects
  • Documentation can be overwhelming for beginners

Getting Started

To get started with Garden, follow these steps:

  1. Install Garden CLI:

    curl -sL https://get.garden.io/install.sh | bash
    
  2. Initialize a new Garden project:

    garden init
    
  3. Create a garden.yml file in your project root:

    kind: Project
    name: my-project
    environments:
      - name: default
    
  4. Define your services and tasks in separate garden.yml files for each component.

  5. Run your project:

    garden deploy
    

For more detailed instructions and advanced usage, refer to the official Garden documentation at https://docs.garden.io/.

Competitor Comparisons

42,146

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

Pros of Terraform

  • Widely adopted and mature infrastructure-as-code tool with extensive provider ecosystem
  • Supports a broad range of cloud providers and services
  • Strong state management capabilities for tracking infrastructure changes

Cons of Terraform

  • Steeper learning curve, especially for complex infrastructure setups
  • Limited built-in support for application-level deployments and testing
  • Can be slower for large-scale infrastructure changes due to state management

Code Comparison

Terraform:

resource "aws_instance" "example" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
}

Garden:

kind: Module
name: web-server
type: container
services:
  - name: web
    ports:
      - name: http
        containerPort: 8080

Terraform focuses on infrastructure provisioning, while Garden emphasizes application deployment and development workflows. Terraform uses HCL (HashiCorp Configuration Language) for defining infrastructure, whereas Garden uses YAML for configuration.

Garden provides a more integrated approach to application development, testing, and deployment, with features like in-cluster building and testing. Terraform, on the other hand, excels in managing complex infrastructure across multiple providers and offers more granular control over resource provisioning.

Both tools can be complementary, with Terraform handling infrastructure provisioning and Garden managing application deployments and development workflows within that infrastructure.

20,922

Pulumi - Infrastructure as Code in any programming language 🚀

Pros of Pulumi

  • Supports multiple programming languages (Python, JavaScript, Go, etc.) for infrastructure as code
  • Offers a broader ecosystem with support for various cloud providers and services
  • Provides strong typing and IDE support for better developer experience

Cons of Pulumi

  • Steeper learning curve, especially for those new to infrastructure as code
  • Requires more setup and configuration compared to Garden's simpler approach
  • May be overkill for smaller projects or teams with limited cloud infrastructure needs

Code Comparison

Pulumi (Python):

import pulumi
from pulumi_aws import s3

bucket = s3.Bucket("my-bucket")
pulumi.export("bucket_name", bucket.id)

Garden:

kind: Module
name: my-bucket
type: terraform
spec:
  resource:
    aws_s3_bucket:
      my_bucket: {}

Both Garden and Pulumi are infrastructure-as-code tools, but they have different approaches. Garden focuses on simplifying application development and deployment workflows, while Pulumi offers a more comprehensive infrastructure management solution using general-purpose programming languages. Garden's YAML-based configuration is more accessible for beginners, while Pulumi's use of familiar programming languages may appeal to experienced developers seeking more flexibility and control over their infrastructure definitions.

109,710

Production-Grade Container Scheduling and Management

Pros of Kubernetes

  • Widely adopted industry standard for container orchestration
  • Extensive ecosystem with numerous tools and integrations
  • Highly scalable and suitable for large, complex deployments

Cons of Kubernetes

  • Steep learning curve and complex setup process
  • Requires significant resources and expertise to manage effectively
  • Can be overkill for smaller projects or simpler deployments

Code Comparison

Kubernetes manifest example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx

Garden configuration example:

kind: Module
name: nginx
type: container
image: nginx:latest
services:
  - name: nginx
    ports:
      - name: http
        containerPort: 80

The Kubernetes manifest focuses on defining the deployment specifics, while the Garden configuration abstracts away some of the complexity and provides a higher-level description of the service. Garden aims to simplify the development workflow and reduce the learning curve associated with Kubernetes, making it more accessible for developers. However, Kubernetes offers more fine-grained control and is better suited for large-scale production environments with complex requirements.

26,764

The Kubernetes Package Manager

Pros of Helm

  • Widely adopted and supported in the Kubernetes ecosystem
  • Extensive library of pre-built charts for common applications
  • Simpler learning curve for basic package management

Cons of Helm

  • Limited support for managing the full application lifecycle
  • Less flexibility in handling complex, multi-service deployments
  • Lacks built-in testing and debugging capabilities

Code Comparison

Helm chart structure:

mychart/
  Chart.yaml
  values.yaml
  templates/
    deployment.yaml
    service.yaml

Garden project structure:

garden.yml
services/
  backend/
    Dockerfile
    garden.yml
  frontend/
    Dockerfile
    garden.yml

Garden focuses on a more holistic approach to application development and deployment, while Helm primarily deals with packaging and deploying individual components. Garden provides built-in testing, debugging, and environment management features, making it more suitable for complex, multi-service applications. Helm, on the other hand, excels in its simplicity and wide adoption for basic Kubernetes package management.

17,333

Declarative Continuous Deployment for Kubernetes

Pros of Argo CD

  • More mature and widely adopted in the Kubernetes ecosystem
  • Supports GitOps workflow out-of-the-box
  • Offers a user-friendly web UI for visualizing and managing deployments

Cons of Argo CD

  • Primarily focused on Kubernetes deployments, less versatile for other environments
  • Steeper learning curve for users new to GitOps and Kubernetes concepts

Code Comparison

Argo CD application manifest:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
spec:
  destination:
    namespace: default
    server: https://kubernetes.default.svc
  project: default
  source:
    path: k8s
    repoURL: https://github.com/example/myapp.git
    targetRevision: HEAD

Garden project configuration:

kind: Project
name: myproject
environments:
  - name: dev
  - name: prod
providers:
  - name: kubernetes
    environments: [dev, prod]

Summary

Argo CD is a powerful GitOps tool specifically designed for Kubernetes deployments, offering a mature ecosystem and user-friendly interface. Garden, on the other hand, provides a more versatile approach to application development and deployment across various environments, with a focus on developer experience and workflow optimization. The choice between the two depends on specific project requirements and team preferences.

6,346

Open and extensible continuous delivery solution for Kubernetes. Powered by GitOps Toolkit.

Pros of Flux

  • Stronger focus on GitOps practices and continuous delivery
  • More mature and widely adopted in the Kubernetes ecosystem
  • Supports multi-tenancy and advanced RBAC configurations

Cons of Flux

  • Steeper learning curve for beginners
  • Limited support for non-Kubernetes environments
  • Less emphasis on local development workflows

Code Comparison

Flux manifest example:

apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
  name: podinfo
  namespace: flux-system
spec:
  interval: 1m
  url: https://github.com/stefanprodan/podinfo
  ref:
    branch: master

Garden configuration example:

kind: Project
name: my-project
environments:
  - name: dev
  - name: prod
providers:
  - name: kubernetes
    environments: [dev, prod]

Both tools use YAML for configuration, but Flux focuses on Kubernetes-specific resources, while Garden provides a more abstracted approach for multi-environment setups.

Flux is better suited for teams deeply invested in Kubernetes and GitOps, while Garden offers a more flexible approach for projects spanning multiple environments and technologies. Garden's local development features may be more appealing to developers, whereas Flux's robust Kubernetes integration is advantageous for operations teams.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

[!WARNING]
Garden 0.12.x EOL: Garden Acorn (0.12.x) will receive security updates until the 30th of June, 2024. After that it will be deprecated and we'll stop support. See announcement.

Garden

If you love Garden, please ★ star this repository to show your support :green_heart:. Looking for support? Join our Discord.

Garden

Quickstart   â€¢   Website   â€¢   Docs   â€¢   Examples   â€¢   Blog   â€¢   Discord

Welcome to Garden!

Garden is a DevOps automation tool for developing and testing Kubernetes apps faster.

  • Spin up production-like environments for development, testing, and CI on demand
  • Use the same configuration and workflows for every stage of software delivery
  • Speed up builds and test runs via smart caching.

Getting Started

The fastest way to get started with Garden is by following our quickstart guide.

Demo

Garden dev deploy

Docs

For a thorough introduction to Garden and comprehensive documentation, visit our docs.

Usage Overview

Garden is configured via garden.yml files. For large projects you can split the files up and co-locate them with the relevant parts of your stack, even across multiple repositories.

A (simplified) Garden configuration for a web app looks like this:

kind: Deploy
name: db
type: helm
spec:
  chart:
    name: postgres
    repo: https://charts.bitnami.com/bitnami
---
kind: Build
name: api
type: container
source:
  path: ./api
---
kind: Deploy
name: api
type: kubernetes
dependencies: [build.api, deploy.postgres]
spec:
  files: [./manifests/api/**/*]
---
kind: Test
name: integ
type: container
dependencies: [deploy.api]
spec:
  args: [npm, run, test:integ]

You can build and deploy this project with:

garden deploy

...and test it with:

garden test

To create a preview environment on every pull request, you would add the following to your CI pipeline:

garden deploy --env preview

Garden also has a special mode called "sync mode" which live reloads changes to your running services—ensuring blazing fast feedback while developing. To enable it, run:

garden deploy --sync

You can also start an interactive dev console (see screencap above) from which you can build, deploy, and test your project with:

garden dev

How Garden Works

The Stack Graph is a key feature of Garden that enables efficient development, testing, and DevOps automation. The Stack Graph allows you to declare the dependency structure of your project and track changes to avoid unnecessary builds, deploys and test runs. It's like CI/CD config that you can additionally use for development. Without the Stack Graph, many of these functionalities that distinguish Garden from its competitors would not be possible or would be much less efficient.

  • Efficient builds and deploys: The Stack Graph allows Garden to determine which parts of your project have changed and need to be rebuilt or redeployed, avoiding unnecessary work and speeding up the development process.

  • Automated testing: Garden can automatically run tests for the parts of your project that have changed, thanks to the Stack Graph. This saves time because all parts of your dependency graph are known and cached.

  • DevOps automation: The Stack Graph allows Garden to automate many aspects of the DevOps process, including building, testing, and deploying your project.

For more information on the Stack Graph and how Garden works, see:

Plugins

Garden is pluggable: how actions are executed depends on the plugins used. Our Kubernetes plugin is currently the most popular, followed by our Terraform and Pulumi plugins. For a more thorough introduction to Garden and its plugins, visit our docs:

Community

Join our Discord community to ask questions, give feedback or just say hi 🙂

Contributing

Garden accepts contributions! Please see our contributing guide for more information.

License

Garden is licensed according to Mozilla Public License 2.0 (MPL-2.0).

NPM DownloadsLast 30 Days