From ed830aeee611a748eb6f44bd08725c1ba038308b Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 26 Apr 2023 08:44:26 +0200 Subject: [PATCH 01/16] chore: formatting Makes editing in IDE easier, no need to horizontally scroll the text. --- .../1-initialize-a-project.md | 21 ++++++++----- .../your-first-project/3-deploy-and-test.md | 13 ++++---- .../4-configure-your-project.md | 30 ++++++++++++------- docs/tutorials/your-first-project/README.md | 6 ++-- 4 files changed, 46 insertions(+), 24 deletions(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index 24a2b73913..c6d0f70153 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -5,7 +5,8 @@ order: 1 # 1. Initialize a Project -With the Garden CLI [installed](../../basics/quickstart.md#step-1-install-garden), we'll kick off by configuring a simple example project for use with Garden. +With the Garden CLI [installed](../../basics/quickstart.md#step-1-install-garden), we'll kick off by configuring a +simple example project for use with Garden. Start by cloning our repo and finding the example project: @@ -14,7 +15,8 @@ git clone https://github.com/garden-io/garden.git cd garden/examples/demo-project-start ``` -This directory contains two directories, with one container service each, `backend` and `frontend`. We'll first define a boilerplate Garden project, and then a Garden module for each of the services. +This directory contains two directories, with one container service each, `backend` and `frontend`. We'll first define a +boilerplate Garden project, and then a Garden module for each of the services. To initialize the project, we can use a helper command: @@ -43,7 +45,8 @@ garden create module cd .. ``` -You'll get a suggestion to make it a `container` module. Pick that, and give it the default name as well. Then do the same for the `frontend` module: +You'll get a suggestion to make it a `container` module. Pick that, and give it the default name as well. Then do the +same for the `frontend` module: ```sh cd frontend @@ -51,9 +54,11 @@ garden create module cd .. ``` -This is now enough configuration to build the project. Before we can deploy, we need to configure `services` in each module configuration, as well as set up a local cluster or connect to a remote cluster. +This is now enough configuration to build the project. Before we can deploy, we need to configure `services` in each +module configuration, as well as set up a local cluster or connect to a remote cluster. -Starting with the former, go ahead and open the newly created `backend/garden.yml` file. Just to keep things simple for now, go ahead and append to the file the following: +Starting with the former, go ahead and open the newly created `backend/garden.yml` file. Just to keep things simple for +now, go ahead and append to the file the following: ```yaml services: @@ -67,7 +72,8 @@ services: port: http ``` -This is enough information for Garden to be able to deploy and expose the `backend` service. Now do the same for the `frontend` service, with the following block: +This is enough information for Garden to be able to deploy and expose the `backend` service. Now do the same for +the `frontend` service, with the following block: ```yaml services: @@ -84,6 +90,7 @@ services: - backend ``` -This does the same for the `frontend` service, with the addition of declaring a runtime dependency on the `backend` service. +This does the same for the `frontend`service, with the addition of declaring a runtime dependency on the `backend` +service. Now, let's move on to our next section, and [connect to a Kubernetes cluster](./2-connect-to-a-cluster.md). diff --git a/docs/tutorials/your-first-project/3-deploy-and-test.md b/docs/tutorials/your-first-project/3-deploy-and-test.md index a233150bde..04c585c3e8 100644 --- a/docs/tutorials/your-first-project/3-deploy-and-test.md +++ b/docs/tutorials/your-first-project/3-deploy-and-test.md @@ -11,19 +11,21 @@ Now that you have your project and cluster set up, you can go ahead and deploy t garden deploy ``` -You should see your services come up. Next we can set up our first test. Similar to how you configured the `services` earlier, open the `frontend/garden.yml` config and add the following: +You should see your services come up. Next we can set up our first test. Similar to how you configured the `services` +earlier, open the `frontend/garden.yml` config and add the following: ```yaml tests: - name: unit - args: [npm, test] + args: [ npm, test ] - name: integ - args: [npm, run, integ] + args: [ npm, run, integ ] dependencies: - frontend ``` -This defines two simple test suites. One simply runs the unit tests of the `frontend` service. The other runs a basic integration test that relies on the `frontend` service being up and running. +This defines two simple test suites. One simply runs the unit tests of the `frontend` service. The other runs a basic +integration test that relies on the `frontend` service being up and running. Let's run them both: @@ -33,4 +35,5 @@ garden test You should see Garden ensuring that the services are up and running, and that both tests run successfully. -With that, we can move on from this simple example and on to [configuring your own project](./4-configure-your-project.md). +With that, we can move on from this simple example and on +to [configuring your own project](./4-configure-your-project.md). diff --git a/docs/tutorials/your-first-project/4-configure-your-project.md b/docs/tutorials/your-first-project/4-configure-your-project.md index 21079a6324..00abb8f0a8 100644 --- a/docs/tutorials/your-first-project/4-configure-your-project.md +++ b/docs/tutorials/your-first-project/4-configure-your-project.md @@ -5,20 +5,30 @@ order: 4 # 4. Configure Your Project -With the basic example all set, we can start thinking about your own project. The steps will be similar, and some of the work you won't need to repeat. +With the basic example all set, we can start thinking about your own project. The steps will be similar, and some of the +work you won't need to repeat. -Garden is a powerful and flexible tool, and there are several things to learn along the way. We recommend the following to get going: +Garden is a powerful and flexible tool, and there are several things to learn along the way. We recommend the following +to get going: -1. Place the project configuration you created for the example, which will be all set to connect to your cluster, in your own project root. -2. Go through the [Using Garden](../../using-garden/README.md) documentation section. This will cover all the key concepts, and introduce all the moving parts, including the different module types that Garden supports. -3. Have a look at the [examples](https://github.com/garden-io/garden/tree/0.12.51/examples) folder in the Garden repository, which offers several usage examples that you can refer to while building out your project. +1. Place the project configuration you created for the example, which will be all set to connect to your cluster, in + your own project root. +2. Go through the [Using Garden](../../using-garden/README.md) documentation section. This will cover all the key + concepts, and introduce all the moving parts, including the different module types that Garden supports. +3. Have a look at the [examples](https://github.com/garden-io/garden/tree/0.12.51/examples) folder in the Garden + repository, which offers several usage examples that you can refer to while building out your project. 4. Set up your modules, getting them building and deploying, **one at a time**. 5. Make sure your whole project builds and deploys successfully. -6. Start thinking about tests. Garden excels at managing all the different test suites in your stack, especially integration and end-to-end tests that need to run inside your deployment environment. -7. Consider [running Garden in your CI](../../guides/using-garden-in-ci.md), to deploy preview environments and/or to test your project. +6. Start thinking about tests. Garden excels at managing all the different test suites in your stack, especially + integration and end-to-end tests that need to run inside your deployment environment. +7. Consider [running Garden in your CI](../../guides/using-garden-in-ci.md), to deploy preview environments and/or to + test your project. -In summary, **gradually put all the pieces together**, learn the details as you go, and use more and more features as you get comfortable. +In summary, **gradually put all the pieces together**, learn the details as you go, and use more and more features as +you get comfortable. -For a large, complex project, it might be good to start with a subset of it, so that you can start getting value out of Garden quickly. +For a large, complex project, it might be good to start with a subset of it, so that you can start getting value out of +Garden quickly. -Whatever your setup is, we're sure you'll be rewarded with an elegant, productive setup for testing and developing your system! +Whatever your setup is, we're sure you'll be rewarded with an elegant, productive setup for testing and developing your +system! diff --git a/docs/tutorials/your-first-project/README.md b/docs/tutorials/your-first-project/README.md index a2a4a8cf07..00d9849abf 100644 --- a/docs/tutorials/your-first-project/README.md +++ b/docs/tutorials/your-first-project/README.md @@ -3,7 +3,8 @@ title: Your First Project order: 1 --- -This tutorial walks you through the first few steps of getting started with Garden using one of the Kubernetes plugins (local or remote). +This tutorial walks you through the first few steps of getting started with Garden using one of the Kubernetes plugins ( +local or remote). We'll go through: @@ -12,7 +13,8 @@ We'll go through: 3. [Deploying and testing the project](./3-deploy-and-test.md) 4. How you can go from there and [configure your own project](./4-configure-your-project.md) -You'll need to have Garden installed to follow along with this guide. You'll find the instructions in our [Quickstart uigde](../../basics/quickstart.md). +You'll need to have Garden installed to follow along with this guide. You'll find the instructions in +our [Quickstart uigde](../../basics/quickstart.md). We also recommend quickly reading the [How Garden Works](../../basics/how-garden-works.md) page before carrying on. From 9122a233c1921b46361758836d7d0e7757a26827 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 26 Apr 2023 12:25:23 +0200 Subject: [PATCH 02/16] chore: typofix --- docs/tutorials/your-first-project/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/README.md b/docs/tutorials/your-first-project/README.md index 00d9849abf..ac31089bf7 100644 --- a/docs/tutorials/your-first-project/README.md +++ b/docs/tutorials/your-first-project/README.md @@ -14,7 +14,7 @@ We'll go through: 4. How you can go from there and [configure your own project](./4-configure-your-project.md) You'll need to have Garden installed to follow along with this guide. You'll find the instructions in -our [Quickstart uigde](../../basics/quickstart.md). +our [Quickstart guide](../../basics/quickstart.md). We also recommend quickly reading the [How Garden Works](../../basics/how-garden-works.md) page before carrying on. From 59844fa30c2e52ea4e8d2305519e88df6aeeffd3 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 26 Apr 2023 12:52:30 +0200 Subject: [PATCH 03/16] docs: 0.13 docs update in tutorials (1) --- .../1-initialize-a-project.md | 85 ++++++++++--------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index c6d0f70153..e84fec15fa 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -8,17 +8,18 @@ order: 1 With the Garden CLI [installed](../../basics/quickstart.md#step-1-install-garden), we'll kick off by configuring a simple example project for use with Garden. -Start by cloning our repo and finding the example project: +Start by cloning our repo and finding the [example project](../../../examples/demo-project-start): ```sh git clone https://github.com/garden-io/garden.git cd garden/examples/demo-project-start ``` -This directory contains two directories, with one container service each, `backend` and `frontend`. We'll first define a -boilerplate Garden project, and then a Garden module for each of the services. +The example directory contains two directories: `backend` and `frontend`. Each one is a simple application with +a `Dockerfile`. We'll first define a boilerplate Garden project, and then Garden action configurations for each +application. -To initialize the project, we can use a helper command: +To initialize the project use a helper command: ```sh garden create project @@ -37,60 +38,68 @@ providers: We have one environment (`default`) and a single provider. We'll get back to this later. -Next, let's create module configs for each of our two modules, starting with `backend`. +[//]: # (TODO: `garden create action` is still under construction, update this section when the command is ready) +Next, let's create action configs for each of our two applications, starting with `backend`. ```sh cd backend -garden create module +garden create action cd .. ``` -You'll get a suggestion to make it a `container` module. Pick that, and give it the default name as well. Then do the -same for the `frontend` module: +You'll get a multiple-choice suggestion to select action [kind](../../using-garden/actions.md#action-kinds) +and [type](../../using-garden/actions.md#action-types). Let's start with a `Build` action configuration by specifying +kind `Build` and type `container`. You can also give it a name if necessary. By default, the name is the current +directory name, i.e. `backend`. + +The helper command will also suggest you to create more actions. Create a `Deploy` action for the `backend` application +by specifying kind `Deploy` and type `container`, see more about types in +the [reference guide](../../reference/action-types/Deploy). It will suggest you the list of available `Build` names to +be deployed. Pick a build name from the `Build` action configured above. + +Next, let's do the same for the `frontend` application: ```sh cd frontend -garden create module +garden create action cd .. ``` -This is now enough configuration to build the project. Before we can deploy, we need to configure `services` in each -module configuration, as well as set up a local cluster or connect to a remote cluster. +Before deploying the application, you need to configure `spec` in each `Deploy` action configuration, and set up a local +kubernetes cluster or connect to a remote cluster. -Starting with the former, go ahead and open the newly created `backend/garden.yml` file. Just to keep things simple for -now, go ahead and append to the file the following: +For simplicity, let's consider the local cluster configuration. Open the newly +created `backend/garden.yml` file, locate the `kind: Deploy` configuration and append the following: ```yaml -services: - - name: backend - ports: - - name: http - containerPort: 8080 - servicePort: 80 - ingresses: - - path: /hello-backend - port: http +spec: + ports: + - name: http + containerPort: 8080 + servicePort: 80 + ingresses: + - path: /hello-backend + port: http ``` -This is enough information for Garden to be able to deploy and expose the `backend` service. Now do the same for -the `frontend` service, with the following block: +This is enough information for Garden to be able to deploy and expose the `backend` application. Now do the same for +the `frontend` application, with the following block: ```yaml -services: - - name: frontend - ports: - - name: http - containerPort: 8080 - ingresses: - - path: /hello-frontend - port: http - - path: /call-backend - port: http - dependencies: - - backend +spec: + ports: + - name: http + containerPort: 8080 + ingresses: + - path: /hello-frontend + port: http + - path: /call-backend + port: http + dependencies: + - deploy.backend # the dependencies must be specified in the `{kind}.{name}` format ``` -This does the same for the `frontend`service, with the addition of declaring a runtime dependency on the `backend` -service. +This does the same for the `Deploy` configuration of the `frontend` application, with the addition of declaring a +runtime dependency on the `backend` `Deploy` action. Now, let's move on to our next section, and [connect to a Kubernetes cluster](./2-connect-to-a-cluster.md). From 4229788fe26a889e05d1fc30d97d626e2ec41204 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 26 Apr 2023 13:07:13 +0200 Subject: [PATCH 04/16] docs: 0.13 docs update for tutorials (2) --- .../your-first-project/3-deploy-and-test.md | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/docs/tutorials/your-first-project/3-deploy-and-test.md b/docs/tutorials/your-first-project/3-deploy-and-test.md index 04c585c3e8..2ca4b576ab 100644 --- a/docs/tutorials/your-first-project/3-deploy-and-test.md +++ b/docs/tutorials/your-first-project/3-deploy-and-test.md @@ -11,21 +11,35 @@ Now that you have your project and cluster set up, you can go ahead and deploy t garden deploy ``` -You should see your services come up. Next we can set up our first test. Similar to how you configured the `services` -earlier, open the `frontend/garden.yml` config and add the following: +You should see your applications come up. Garden will print the statuses of the corresponding `Deploy` actions. Next we +can set up our first test. Similar to how you configured the `Deploy` actions earlier, open the `frontend/garden.yml` +config and add the following action configurations: ```yaml -tests: - - name: unit - args: [ npm, test ] - - name: integ - args: [ npm, run, integ ] - dependencies: - - frontend + +--- # the yaml separator is necessary to delimit different actions + +kind: Test +name: frontend-unit +type: container +build: frontend +spec: + args: [ npm, test ] + +--- # the yaml separator is necessary to delimit different actions + +kind: Test +name: frontend-integ +type: container +build: frontend +dependencies: + - deploy.frontend # <- we want the frontend service to be running and up-to-date for this test +spec: + args: [ npm, run, integ ] ``` -This defines two simple test suites. One simply runs the unit tests of the `frontend` service. The other runs a basic -integration test that relies on the `frontend` service being up and running. +This defines two simple test suites. One simply runs the unit tests of the `frontend` application. The other runs a +basic integration test that relies on the `frontend` application being up and running. Let's run them both: @@ -33,7 +47,7 @@ Let's run them both: garden test ``` -You should see Garden ensuring that the services are up and running, and that both tests run successfully. +You should see Garden ensuring that the applications are up and running, and that both tests run successfully. With that, we can move on from this simple example and on to [configuring your own project](./4-configure-your-project.md). From 1485eaef29e4ba69de027b27c39686b4625dfe52 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 26 Apr 2023 13:14:25 +0200 Subject: [PATCH 05/16] docs: 0.13 docs update for tutorials (3) --- .../your-first-project/4-configure-your-project.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/your-first-project/4-configure-your-project.md b/docs/tutorials/your-first-project/4-configure-your-project.md index 00abb8f0a8..a262727825 100644 --- a/docs/tutorials/your-first-project/4-configure-your-project.md +++ b/docs/tutorials/your-first-project/4-configure-your-project.md @@ -5,8 +5,8 @@ order: 4 # 4. Configure Your Project -With the basic example all set, we can start thinking about your own project. The steps will be similar, and some of the -work you won't need to repeat. +With the basic example all set, we can start thinking about your own project. The steps will be similar, and some work +you won't need to repeat. Garden is a powerful and flexible tool, and there are several things to learn along the way. We recommend the following to get going: @@ -14,10 +14,10 @@ to get going: 1. Place the project configuration you created for the example, which will be all set to connect to your cluster, in your own project root. 2. Go through the [Using Garden](../../using-garden/README.md) documentation section. This will cover all the key - concepts, and introduce all the moving parts, including the different module types that Garden supports. -3. Have a look at the [examples](https://github.com/garden-io/garden/tree/0.12.51/examples) folder in the Garden - repository, which offers several usage examples that you can refer to while building out your project. -4. Set up your modules, getting them building and deploying, **one at a time**. + concepts, and introduce all the moving parts, including the different action kinds and types that Garden supports. +3. Have a look at the [examples](../../../examples) folder in the Garden repository, which offers several usage examples + that you can refer to while building out your project. +4. Set up your actions, getting them building and deploying. 5. Make sure your whole project builds and deploys successfully. 6. Start thinking about tests. Garden excels at managing all the different test suites in your stack, especially integration and end-to-end tests that need to run inside your deployment environment. From 0cb642903ed92b3ed27550ac1bb4a02ce528329a Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Thu, 27 Apr 2023 11:13:43 +0200 Subject: [PATCH 06/16] Update docs/tutorials/your-first-project/1-initialize-a-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/1-initialize-a-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index e84fec15fa..a8addea6af 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -15,7 +15,7 @@ git clone https://github.com/garden-io/garden.git cd garden/examples/demo-project-start ``` -The example directory contains two directories: `backend` and `frontend`. Each one is a simple application with +The example directory has two directories: `backend` and `frontend`. Each contains simple application with a `Dockerfile`. We'll first define a boilerplate Garden project, and then Garden action configurations for each application. From 3790b159e4a723aacc7183df3ecc67e0025d63a8 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 11:58:39 +0200 Subject: [PATCH 07/16] docs: add link to the actions guide --- docs/using-garden/using-the-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using-garden/using-the-cli.md b/docs/using-garden/using-the-cli.md index 053b4ff901..87e1a86e8f 100644 --- a/docs/using-garden/using-the-cli.md +++ b/docs/using-garden/using-the-cli.md @@ -241,7 +241,7 @@ garden create module ### Creating an action -[//]: # "TODO" +See the [actions guide](./actions.md) to learn more about actions and how to create them. ## Remote sources From 06ff859fd0ece05e8c63b020afc7f75998bd36aa Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 12:19:50 +0200 Subject: [PATCH 08/16] docs: updated "Initialize a project" tutorial Use explicit configuration code snippets instead of references to a non-existing command. --- .../1-initialize-a-project.md | 81 +++++++++++-------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index a8addea6af..9f50f5128b 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -38,41 +38,33 @@ providers: We have one environment (`default`) and a single provider. We'll get back to this later. -[//]: # (TODO: `garden create action` is still under construction, update this section when the command is ready) Next, let's create action configs for each of our two applications, starting with `backend`. -```sh -cd backend -garden create action -cd .. -``` - -You'll get a multiple-choice suggestion to select action [kind](../../using-garden/actions.md#action-kinds) -and [type](../../using-garden/actions.md#action-types). Let's start with a `Build` action configuration by specifying -kind `Build` and type `container`. You can also give it a name if necessary. By default, the name is the current -directory name, i.e. `backend`. +First we need to define `Build` and `Deploy` actions for the `backend` application. Let's use `container` action type. +Create an empty `backend.garden.yml` config file in the `backend` directory and add the following lines: -The helper command will also suggest you to create more actions. Create a `Deploy` action for the `backend` application -by specifying kind `Deploy` and type `container`, see more about types in -the [reference guide](../../reference/action-types/Deploy). It will suggest you the list of available `Build` names to -be deployed. Pick a build name from the `Build` action configured above. - -Next, let's do the same for the `frontend` application: +```yaml +kind: Build +name: backend +description: Backend service container image +type: container -```sh -cd frontend -garden create action -cd .. -``` +--- -Before deploying the application, you need to configure `spec` in each `Deploy` action configuration, and set up a local -kubernetes cluster or connect to a remote cluster. +kind: Deploy +name: backend +description: Backend service container +type: container -For simplicity, let's consider the local cluster configuration. Open the newly -created `backend/garden.yml` file, locate the `kind: Deploy` configuration and append the following: +# This defines an image to be used and refers the 'backend' Build action defined above +build: backend -```yaml +# This block is necessary to deploy and expose the backend application spec: + healthCheck: + httpGet: + path: /hello-backend + port: http ports: - name: http containerPort: 8080 @@ -82,24 +74,45 @@ spec: port: http ``` -This is enough information for Garden to be able to deploy and expose the `backend` application. Now do the same for -the `frontend` application, with the following block: +Next, let's do the same for the `frontend` application: +Create an empty `frontend.garden.yml` config file in the `frontend` directory and add the following lines: -```yaml +```sh +kind: Build +name: frontend +description: Frontend service container image +type: container + +--- + +kind: Deploy +name: frontend +description: Frontend service container +type: container + +# This defines an image to be used and refers the 'frontend' Build action defined above +build: frontend +# Dependency section is used to ensure the deployment order. The frontend will be deployed after the backend. +dependencies: + - deploy.backend + +# This block is necessary to deploy and expose the frontend application spec: ports: - name: http containerPort: 8080 + healthCheck: + httpGet: + path: /hello-frontend + port: http ingresses: - path: /hello-frontend port: http - path: /call-backend port: http - dependencies: - - deploy.backend # the dependencies must be specified in the `{kind}.{name}` format ``` -This does the same for the `Deploy` configuration of the `frontend` application, with the addition of declaring a -runtime dependency on the `backend` `Deploy` action. +Before deploying the application, you need to set up a local kubernetes cluster or connect to a remote cluster. +First you can try to deploy the project with the local kubernetes cluster. Now, let's move on to our next section, and [connect to a Kubernetes cluster](./2-connect-to-a-cluster.md). From b93b43630e2d5a31d0ca2092a491693b8f613db9 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:37:48 +0200 Subject: [PATCH 09/16] Update docs/tutorials/your-first-project/1-initialize-a-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/1-initialize-a-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index 9f50f5128b..f1cf4b1f6a 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -56,7 +56,7 @@ name: backend description: Backend service container type: container -# This defines an image to be used and refers the 'backend' Build action defined above +# Reference to the Build action that builds the image to be deployed (defined above) build: backend # This block is necessary to deploy and expose the backend application From 4624037d0e5016374a68781299c39273ba6a954b Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:37:58 +0200 Subject: [PATCH 10/16] Update docs/tutorials/your-first-project/1-initialize-a-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/1-initialize-a-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index f1cf4b1f6a..e4b51f9675 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -59,7 +59,7 @@ type: container # Reference to the Build action that builds the image to be deployed (defined above) build: backend -# This block is necessary to deploy and expose the backend application +# Action type specific config goes under the `spec` block spec: healthCheck: httpGet: From fc4c95498d7fc504e03eb831fd7397f61a0cdf23 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:38:12 +0200 Subject: [PATCH 11/16] Update docs/tutorials/your-first-project/1-initialize-a-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/1-initialize-a-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index e4b51f9675..2401fd4c6c 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -75,7 +75,7 @@ spec: ``` Next, let's do the same for the `frontend` application: -Create an empty `frontend.garden.yml` config file in the `frontend` directory and add the following lines: +Create a `frontend.garden.yml` config file in the `frontend` directory and add the following lines: ```sh kind: Build From 877575f73e9494b6b95b53a66fbf7b87e529764d Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:38:24 +0200 Subject: [PATCH 12/16] Update docs/tutorials/your-first-project/1-initialize-a-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/1-initialize-a-project.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index 2401fd4c6c..6edd2b96b1 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -92,7 +92,8 @@ type: container # This defines an image to be used and refers the 'frontend' Build action defined above build: frontend -# Dependency section is used to ensure the deployment order. The frontend will be deployed after the backend. +# Dependency section is used to specify action execution order. The frontend will be deployed after the backend is deployed. +# Dependency for the Build action is implicit. dependencies: - deploy.backend From b3b323ee4423d565c7b4b1987dcead6b295ce37d Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:38:40 +0200 Subject: [PATCH 13/16] Update docs/tutorials/your-first-project/1-initialize-a-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/1-initialize-a-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index 6edd2b96b1..3f846d0303 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -113,7 +113,7 @@ spec: port: http ``` -Before deploying the application, you need to set up a local kubernetes cluster or connect to a remote cluster. +Before deploying, you need to set up a local kubernetes cluster or connect to a remote cluster. First you can try to deploy the project with the local kubernetes cluster. Now, let's move on to our next section, and [connect to a Kubernetes cluster](./2-connect-to-a-cluster.md). From 36b4cc2cf395a536813103532e6f0b9aab73a3b5 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:38:56 +0200 Subject: [PATCH 14/16] Update docs/tutorials/your-first-project/3-deploy-and-test.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/3-deploy-and-test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/3-deploy-and-test.md b/docs/tutorials/your-first-project/3-deploy-and-test.md index 2ca4b576ab..cf763bd7eb 100644 --- a/docs/tutorials/your-first-project/3-deploy-and-test.md +++ b/docs/tutorials/your-first-project/3-deploy-and-test.md @@ -33,7 +33,7 @@ name: frontend-integ type: container build: frontend dependencies: - - deploy.frontend # <- we want the frontend service to be running and up-to-date for this test + - deploy.frontend # <- have the frontend service be running and up-to-date before the test spec: args: [ npm, run, integ ] ``` From 6e7c1a2beb408afe508d6105f8e9e5a3e8539381 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:39:12 +0200 Subject: [PATCH 15/16] Update docs/tutorials/your-first-project/4-configure-your-project.md Co-authored-by: Orzelius <33936483+Orzelius@users.noreply.github.com> --- docs/tutorials/your-first-project/4-configure-your-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/your-first-project/4-configure-your-project.md b/docs/tutorials/your-first-project/4-configure-your-project.md index a262727825..c4dcf52f7c 100644 --- a/docs/tutorials/your-first-project/4-configure-your-project.md +++ b/docs/tutorials/your-first-project/4-configure-your-project.md @@ -17,7 +17,7 @@ to get going: concepts, and introduce all the moving parts, including the different action kinds and types that Garden supports. 3. Have a look at the [examples](../../../examples) folder in the Garden repository, which offers several usage examples that you can refer to while building out your project. -4. Set up your actions, getting them building and deploying. +4. Configure your actions, get them building and deploying. 5. Make sure your whole project builds and deploys successfully. 6. Start thinking about tests. Garden excels at managing all the different test suites in your stack, especially integration and end-to-end tests that need to run inside your deployment environment. From e1230b742ace72516a30c9a2565fc9062f184f0a Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Mon, 8 May 2023 14:45:16 +0200 Subject: [PATCH 16/16] docs: address cr comments --- docs/tutorials/your-first-project/1-initialize-a-project.md | 2 -- docs/tutorials/your-first-project/3-deploy-and-test.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/tutorials/your-first-project/1-initialize-a-project.md b/docs/tutorials/your-first-project/1-initialize-a-project.md index 3f846d0303..ffa022ff51 100644 --- a/docs/tutorials/your-first-project/1-initialize-a-project.md +++ b/docs/tutorials/your-first-project/1-initialize-a-project.md @@ -90,14 +90,12 @@ name: frontend description: Frontend service container type: container -# This defines an image to be used and refers the 'frontend' Build action defined above build: frontend # Dependency section is used to specify action execution order. The frontend will be deployed after the backend is deployed. # Dependency for the Build action is implicit. dependencies: - deploy.backend -# This block is necessary to deploy and expose the frontend application spec: ports: - name: http diff --git a/docs/tutorials/your-first-project/3-deploy-and-test.md b/docs/tutorials/your-first-project/3-deploy-and-test.md index cf763bd7eb..60b44476fd 100644 --- a/docs/tutorials/your-first-project/3-deploy-and-test.md +++ b/docs/tutorials/your-first-project/3-deploy-and-test.md @@ -26,7 +26,7 @@ build: frontend spec: args: [ npm, test ] ---- # the yaml separator is necessary to delimit different actions +--- kind: Test name: frontend-integ