Skip to content

Commit dd45a31

Browse files
committed
added an infographic to explain templates organization
1 parent 8bdf093 commit dd45a31

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

posts/how-to-manage-coder-templates/index.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ Coder templates are the DNA used to create workspaces. They abstract the complex
88

99
There are many ways to organize your templates. You can use them to:
1010

11-
### Team based templates
11+
- **Team based templates**: A template for each of your teams e.g. a template for your _frontend_ team and a template for your _backend_ team.
1212

13-
A template for each of your teams e.g. a template for your _frontend_ team and a template for your _backend_ team.
13+
- **Project based templates**: A template for each of your projects e.g. a template for your _cool-project_ and a template for your _awesome-project_.
1414

15-
### Project based templates
15+
- **Image based templates**: A single template that is used for all your projects but with a different image for each project.
1616

17-
A template for each of your projects e.g. a template for your _cool-project_ and a template for your _awesome-project_.
18-
19-
### Image based templates
20-
21-
A single template that is used for all your projects but with a different image for each project.
17+
![Coder templates](./static/templates-cases.png)
2218

2319
## What is the difference between a template and an image?
2420

@@ -38,6 +34,9 @@ A template is a collection of settings that are used to create a workspace. An i
3834

3935
## Creating your first template
4036

37+
![Workspace creation](./static/workspace-creation-1.png)
38+
![Workspace creation](./static/workspace-creation-2.png)
39+
4140
1. Create a new repository in your GitHub account. This will be the repository that contains your Coder templates.
4241

4342
2. Create a new directory in your repository called `deeplearning`.
@@ -62,6 +61,8 @@ A template is a collection of settings that are used to create a workspace. An i
6261

6362
4. Create a rich-parameter variable of the form `data coder_parameter <name>`. This will be used to create a rich parameter in the template. For example:
6463

64+
> See full list of available parameters [here](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/parameter)
65+
6566
```hcl
6667
data "coder_parameter" "framework" {
6768
name = "Framework"
@@ -109,9 +110,9 @@ A template is a collection of settings that are used to create a workspace. An i
109110
}
110111
```
111112

112-
5. **Choosing the image:** For this example, we will use the pre-built [Deep Learning](https://github.com/matifali/dockerdl) images.
113+
5. For this example, we will use the pre-built [DockerDL](https://github.com/matifali/dockerdl) images.
113114

114-
> **Note**: You can use any image you want. You can use a pre-built image or coder can build an image for you from the Dockerfile in _images_ directory.
115+
> **Note**: You can use any image you want. You can use a pre-built image or coder can build an image for you from the Dockerfile in _images_ directory. See
115116
116117
```hcl
117118
data "docker_registry_image" "dockerdl" {
@@ -129,7 +130,7 @@ A template is a collection of settings that are used to create a workspace. An i
129130

130131
> Full example is available [here](https://github.com/matifali/coder-templates/blob/main/deeplearning/main.tf)
131132
132-
## The result
133+
## Next steps
133134

134-
![Workspace creation](./static/workspace-creation-1.png)
135-
![Workspace creation](./static/workspace-creation-2.png)
135+
- [How to keep your templates up to date](./keep-up-to-date)
136+
- A guide on how to keep your templates up to date with the latest changes in the upstream repository using GitHub Actions. This will allow you to keep your templates up to date without having to manually update them. [Read more](./keep-up-to-date)

0 commit comments

Comments
 (0)