Quickstart
Last updated
Was this helpful?
Last updated
Was this helpful?
Garden is a DevOps automation tool for developing and testing Kubernetes apps faster.
In this quickstart guide, we'll:
Install Garden
Build an example project and (optionally) deploy it to a local Kubernetes cluster
Docker running on the system
A local Kubernetes installation (optional)
If you don't have Kubernetes installed, you can check out our guide on or simply skip the deploy step below and instead go to step 4b.
Install the Garden CLI for your platform:
For more detailed installation instructions, see our .
Next, we clone the example project from GitHub and change into the project directory:
You connect the project via the login command like so:
You'll be asked to create an account if you haven't already. Once you've logged in an organizationId
will be added to the project config. This is of course just an example project but in general you should check the Garden config file with the organizationId
into your source control.
Now we can deploy the example project to our local Kubernetes cluster. We'll deploy the project in sync mode which enables live code syncing and starts the dev console:
This example project also includes unit and integration tests. To run all tests in this project, type test
in the dev console and hit enter (you can also run specific tests with e.g. test unit
and test integ
).
Once the tests pass, try running the same test
command again. This time Garden should tell you all the tests have already passed at this version. It will also tell you that the container images are already built. That's Garden's smart caching in action and it can dramatically speed up CI pipelines and dev workflows.
To build the project, run:
If you now run the garden build --env no-k8s
command again, you should see that all the images are already built. That's Garden's smart caching in action and it can dramatically speed up CI pipelines and dev workflows.
Now that you have Garden installed and seen its basic capabilities it's time to take the next steps.
If you get an error saying Cannot connect to the Docker daemon at /path/to/docker.sock. Is the docker daemon running?
, make sure you have Docker running on your system and try again.
Now we need to connect the project to the Garden Cloud backend. This is required to use features such as and the .
You can .
This will build all the containers in this project with the and deploy them to your Kubernetes cluster. You can then visit the example project via created by Garden. You can also see the build results in the .
The project itself doubles as an interactive guide that walks you through some common Garden commands and workflows. You can open it via created by Garden when you ran the deploy
command with the --sync
flag. We encourage you to give it a spin!
Even if you don't have Kubernetes you can still use the to build the container images in this project.
Garden will use the remote container builder to build the images. You can view the results in the .
Start by checking out the which covers the main concepts that you need to understand.
After that you can either go through which explains step-by-step how to add Garden to an existing project. Or you can check out the which gives you a more high level but still step-wise overview of how to adopt Garden and add it to your stack.
If you have any questions or feedback—or just want to say hi 🙂—we encourage you to join our !
If you bump into other issues, don't hesitate to open a .