This quickstart will show you how to start a minikube cluster and deploy a simple application to it using Garden.
- Setup your environment
- Install Garden and start a minikube cluster you'll use to deploy your app to.
- Deploy the app
- You will be guided through the process of deploying a simple app to the cluster using Garden.
- Explore the dev console
- Run tests, view logs, and more.
Time to complete: Click the Start button to move to the next step.
Open Cloud Shell by clicking in the navigation bar at the top of the console.
Run the start script to prepare the environment. The script will install the latest version of garden
and its dependencies:
chmod +x start.sh && ./start.sh
Create a minikube cluster by running:
minikube start
Garden has a web-based UI, Garden Dashboard, complementing the Garden Core CLI tool. The Dashboard is available at https://app.garden.io. It is optional to use the Dashboard when going through this quickstart guide.
If you try out the Dashboard, make sure to log in on the command line using
garden login
After a successful login, all commands will be streamed through to the Garden Dashboard.
Use Cloud Shell to clone and navigate to the sample code to the Cloud Shell.
Note: If the directory already exists, remove the previous files before cloning.
git clone https://github.com/garden-io/quickstart-example && cd quickstart-example
Garden ships with an interactive command center we call the dev console. To start the dev console, run:
garden dev
The first time you run garden dev
, Garden will initialize then await further instructions inside a REPL. From inside the REPL you can command Garden to build, test, and deploy your project.
After running garden dev
, you're ready to deploy your project. Run:
deploy
Still in the dev console, run a unit test:
test unit-vote
And end-to-end tests:
test e2e
These are tests shipped in the quickstart. Inspect their contents (or write your own!) by opening the garden.yml
files for the unit test and an e2e test.
Cleanup your environment with:
cleanup namespace
And exit the dev console by typing:
exit
Now that you have Garden installed and seen its basic capabilities it's time to take the next steps.
If you'd like to better understand how a Garden project is configured, we recommend going through our first project tutorial which walks you through configuring a Garden project step-by-step.
If you like to dive right in and configure your own project for Garden, we recommend referencing our example projects on GitHub and the section of our docs titled Using Garden, which covers all parts of Garden in detail.
If you have any questions or feedback—or just want to say hi 🙂—we encourage you to join our Discord community!