Skip to content

A full-featured development framework for containers and serverless backends

License

Notifications You must be signed in to change notification settings

edvald/garden-edvald

 
 

Repository files navigation

CircleCI

Welcome! Garden is a full-featured development framework for containers and serverless backends, designed to make it easy to develop and test distributed systems.

Status

The project is in early alpha (or developer preview, if you prefer). This means APIs may well change (not drastically, but still), overall stability will improve and platform support is still limited.

All that said, Garden can already be highly useful if the following applies to you:

  • You're deploying to (or transitioning to) Kubernetes.
  • You develop on Mac or Linux.
  • You work mostly with containers today (but perhaps plan on adopting serverless platforms in the future).
  • You keep all your services in a single repository (multi-repo support coming soon!).
  • You really don't want to spend your precious hours building your own developer tooling!

If that sounds right for you, please give it a go and don't hesitate to report issues or come right over to our Gitter for a chat!

Features

With Garden, you can...

  • Configure and deploy a fleet of services to a local Kubernetes cluster using simple declarations.
  • Use an integrated framework for building, testing and deploying services.
  • Easily run end-to-end tests across multiple services without waiting for a slow CI pipeline.
  • Automatically build, deploy and/or test when your code changes, using the --watch flag or the garden dev command.
  • Manage build and runtime dependencies across all your services.
  • Leverage a suite of commands and helpers to facilitate developing and running your stack.
  • Write code the way you want, and run your production system however suits you! Garden does not impose any new libraries or languages aside from the config files.

Garden is also designed to be pluggable and modular, with Kubernetes being just one plugin (albeit an important one). Over time we will add native support for a variety of platforms, including AWS (Lambda, ECS, Fargate and more), GCP, Heroku, OpenFaaS... and the list will continue growing.

Setup

Dependencies

You need to set up the following on your local machine to use garden:

  • Node.js >= 8.x
  • Docker
  • Git
  • rsync
  • Watchman
  • Local installation of Kubernetes

To install Kubernetes, we recommend Docker for Mac/Windows (edge version) on Mac/Windows, and you can use Minikube on any supported platform. You'll just need to configure a kubectl context to point to your local instance.

On Mac, we recommend using Homebrew on Mac to install everything except Docker, but use whatever works for you!

Note that you need to install the edge version of Docker for Mac/Windows in order to enable Kubernetes support. Once installed, you need to open the Docker preferences, go to the Kubernetes section, tick Enable Kubernetes and save. For more information, see here for Mac or here for Windows.

Installation

Once you have the above dependencies set up, simply run

npm install -g garden-cli

Then go on to our getting started guide, or try out the simple hello-world example below to kick things off.

Examples

The examples/ directory contains usage examples for the framework. You might want to start with the hello-world example project, to see an example of basic build, deployment and interaction flows. Take a look around the projects, taking special note of the garden.yml files - it's pretty straightforward, we promise :)

To spin it up, cd to any of the directories under examples/ and run:

garden deploy

Once you've deployed the hello-world project, you can try querying the /hello endpoint:

garden call hello-container/hello

For more details, please head over to our getting started guide.

Contributing

We welcome any and all contributions to Garden! What we're trying to achieve is a big task, and developers have a lot of diverse needs, so we need and appreciate your input, whether it's through code, docs, issues or developing plugins for your needs.

For more detailed guidelines, see CONTRIBUTING.md.

License

Mozilla Public License 2.0 (MPL-2.0)

About

A full-featured development framework for containers and serverless backends

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.1%
  • Other 0.9%