Skip to content

garden-io/quickstart-example

Repository files navigation

Garden

Website   •   Docs   •   Examples   •   Blog   •   Discord

Welcome to Garden's Quickstart Example 👋

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.

Deploying the quickstart example

About the Project

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 :)

Garden Plugins

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.

Garden Actions

The project has the following micro services:

  • vote—a frontend Vue application
  • api—a Python server that receives votes from the vote frontend and pushes them to a message queue
  • redis—a Redis deployment that's used as a message queue
  • worker—a Java worker service that reads votes from the queue and pushes them to a database
  • db—a Postgres database for storing the votes
  • result—a Node.js websocket server that reads messages from the database and sends back to the vote 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.