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 ephmeral-kubernetes
plugin to deploy the project to a zero-config, ephemeral, Garden managed cluster that's spun up on-demand.
It's the quickest way to get started with Garden and this is the "quickstart" example after all.
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.
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
, and result
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.
Finally the worker
service is built and deployed via the container
Build and Deploy actions respectively. Garden will generate the Kubernetes
manifests for you when using the container
Deploy action which is useful for getting started quickly if you don't have those already—
but in general we recommend using your existing charts or manifests with Garden.
You can learn more about the Kubernetes action types in our docs.