Introduction to Garden
Garden is an innovative tool that helps developers and DevOps teams to streamline the process of developing and testing Kubernetes applications. Garden enables you to set up production-like environments swiftly so that development, testing, and continuous integration (CI) can happen efficiently and rapidly. By using Garden, you can maintain consistent configurations and workflows across all stages of software delivery, which makes it an invaluable tool for managing complex development pipelines.
Key Features
-
Production-Like Environments On Demand: With Garden, developers can create and manage environments that mimic the production setting for testing and CI, ensuring consistency and reliability throughout the development process.
-
Consistent Configurations and Workflows: Garden uses the same setup for every step of software delivery, ensuring that work done at one stage seamlessly fits into the next.
-
Speed and Efficiency: By employing smart caching techniques, Garden greatly reduces the time needed to build and run tests.
Getting Started with Garden
To quickly begin using Garden, follow the quickstart guide. The guide offers step-by-step instructions to help new users set up Garden and start using it to its full potential.
Practical Use
Garden configuration is managed through garden.yml
files. Each file outlines different aspects of the project, such as deployments and testing components. For large projects, configurations can be split across multiple files and repositories, co-located with specific parts of the software stack, to maintain organization and clarity.
Here's a basic example of how a web app might be configured using Garden:
- Defines a database deployment using Helm.
- Creates a build configuration for an API container.
- Specifies dependencies to ensure the correct build sequence.
- Sets up integration tests to be run in a container.
These tasks can be executed using Garden commands:
garden deploy
to build and deploy the application.garden test
to run tests.garden deploy --env preview
for creating preview environments on pull requests.garden deploy --sync
for real-time service updates for fast feedback.garden dev
to start an interactive development console for building, testing, and deploying.
How Garden Works
The core of Garden's functionality rests on the Stack Graph, a powerful feature that tracks the dependencies within your project. This tracking allows Garden to efficiently manage builds, testing, and deployments by understanding which parts of a project have changed and need updates.
-
Efficient Builds and Deploys: Avoids unnecessary work by identifying and building only the changes.
-
Automated Testing: Runs tests automatically for the changed parts, ensuring that nothing is overlooked.
-
DevOps Automation: Streamlines the DevOps process by managing many tasks automatically.
Plugins and Extensibility
Garden supports plugins to enhance its functionalities. The Kubernetes plugin is a popular choice, along with Terraform and Pulumi plugins. These plugins allow Garden to execute actions in varied environments, making it a flexible tool for different infrastructure scenarios.
Community and Contribution
Garden benefits from an active community of users and contributors. Users are encouraged to join the Discord community to discuss, ask questions, and share feedback. Garden is open to contributions, and guidelines are available for those interested in participating actively in its development.
Garden is distributed under the Mozilla Public License 2.0 (MPL-2.0), ensuring it remains open-source and freely available to users who wish to leverage its powerful capabilities for Kubernetes app development and automation.