This repository contains the Garden Quickstart example. Please see our Quickstart Guide for step-by-step instructions on how to deploy this project. If you see any issues or bugs, kindly report them to the main Garden repo.
This project is a voting application that's meant to resemble a typical (if simplified) microservice architecture that runs on Kubernetes. The goal is to demonstrate how you can use Garden to build, develop, and test applications like this.
The project also doubles as an interactive guide that walks you through some common Garden commands and workflows. We encourage you to give it a spin!
It's a good reference for how to configure a Garden project but please don't take the application source code too seriously, it's of mixed quality :)
In this example we use the local-kubernetes
provider to deploy the project to a local installation of Kubernetes (e.g. Minikube, Docker for Desktop, etc).
If you'd rather deploy it to your own cluster, you can update the values in the project.garden.yml
file. To learn more about our different K8s plugins, check out our documentation.
If you don't have Kubernetes (local or remote), you can still use Garden to build the containers in the project via Garden's remote container builder by using the no-k8s
environment like so:
garden build --env no-k8s
The project has the following micro services:
vote
—a frontend Vue applicationapi
—a Python server that receives votes from thevote
frontend and pushes them to a message queueredis
—a Redis deployment that's used as a message queueworker
—a Java worker service that reads votes from the queue and pushes them to a databasedb
—a Postgres database for storing the votesresult
—a Node.js websocket server that reads messages from the database and sends back to thevote
client
These services are built, deployed, and tested with Garden actions.
Specifically, the vote
, api
, result
, and worker
services all have their own Kubernetes manifests so we use the container
Build action to build them and the kubernetes
Deploy action to deploy them.
The redis
and db
services are "off the shelf" Helm charts that are deployed via the helm
Deploy action.
You can learn more about the Kubernetes action types in our docs.