Skip to content

docs: improve workspaces and templates doc #9139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
224bf4c
Reorg, updated/new screenshots, consistent terminology
marcpaq Aug 16, 2023
d494d28
First pass
marcpaq Aug 17, 2023
eabd21f
Another pass
marcpaq Aug 17, 2023
a92693d
Added integration section
marcpaq Aug 21, 2023
46618e4
New outline for template pages, small updates
marcpaq Aug 22, 2023
85535d0
Revised outline for templates, added tutorial
marcpaq Aug 23, 2023
bbd4928
First pass at tutorial
marcpaq Aug 23, 2023
3cc2dbb
Some feedback from Ben.
marcpaq Aug 23, 2023
cb39a6d
Update docs/workspaces.md
marcpaq Aug 25, 2023
6706032
Update docs/workspaces.md
marcpaq Aug 25, 2023
4e4b9e5
Update docs/workspaces.md
marcpaq Aug 25, 2023
351c457
Fixed typos
marcpaq Aug 25, 2023
50e9041
Expanded tutorial
marcpaq Aug 28, 2023
ed27c28
New screenshots, improved tutorial, revised anatomy
marcpaq Sep 7, 2023
744bad0
Improved tutorial. Anatomy is now a guided tour.
marcpaq Sep 8, 2023
58d5c9e
First pass at guided tour
marcpaq Sep 8, 2023
bf5228c
Updated authentication info
marcpaq Sep 11, 2023
92eea5f
Reorganized the guided tour
marcpaq Sep 12, 2023
302f5dd
Edited more template pages
marcpaq Sep 13, 2023
c80c0e3
Update docs/templates/tour.md
marcpaq Sep 15, 2023
e308e5d
Update docs/templates/tour.md
marcpaq Sep 15, 2023
22570dd
Update docs/templates/tour.md
marcpaq Sep 15, 2023
cbeac94
Update docs/templates/tutorial.md
marcpaq Sep 15, 2023
b12c1d6
Update docs/templates/tour.md
marcpaq Sep 15, 2023
b4f33d5
Update docs/templates/tour.md
marcpaq Sep 15, 2023
ec1741e
Update docs/templates/tour.md
marcpaq Sep 15, 2023
223dc9a
Update docs/templates/tour.md
marcpaq Sep 15, 2023
cb266c6
Update docs/templates/tour.md
marcpaq Sep 15, 2023
b5c0371
Revised devcontainers and docker-in-workspaces
marcpaq Sep 15, 2023
9f16953
Edited and added screenshots
marcpaq Sep 18, 2023
6bda970
Prepared first draft, except docs/templates/open-in-coder.md
marcpaq Sep 19, 2023
c2d992b
Fix typo
marcpaq Oct 3, 2023
c9a6c3c
remove legacy parameters and migration guide
matifali Oct 9, 2023
3efae01
Use coder templates create
marcpaq Oct 11, 2023
267639c
Added screenshot for workspace template variables
marcpaq Oct 12, 2023
5c64352
Made it prettier
marcpaq Oct 12, 2023
dbfc80d
Fixed minor typos and markdown problems
marcpaq Oct 12, 2023
6506168
edits to repairing workspaces
bpmct Oct 15, 2023
588a08a
fix broken links in product
bpmct Oct 15, 2023
151687d
Added troubleshooting, minor corrections.
marcpaq Oct 16, 2023
456f5d5
fix terminal links
bpmct Oct 16, 2023
59528ff
fmt
matifali Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revised outline for templates, added tutorial
  • Loading branch information
marcpaq committed Aug 23, 2023
commit 85535d0bb3eea836863b66a44f78ededc6a8eff3
49 changes: 26 additions & 23 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@
"path": "./templates/index.md",
"icon_path": "./images/icons/picture.svg",
"children": [
{
"title": "Creating, editing, and updating templates",
"description": "Working with templates",
"path": "./templates/creating.md"
},
{
"title": "Your first template",
"description": "A tutorial for creating your first template",
"path": "./templates/tutorial.md"
},
{
"title": "Anatomy of a template",
"description": "What makes up a template",
Expand Down Expand Up @@ -181,29 +191,22 @@
]
},
{
"title": "Integrating Coder",
"description": "Add Coder to your existing workflows",
"path": "./templates/integrating.md",
"children": [
{
"title": "Open in Coder",
"description": "Add an \"Open in Coder\" button to your repos",
"path": "./templates/open-in-coder.md",
"icon_path": "./images/icons/key.svg"
},
{
"title": "Docker in workspaces",
"description": "Use Docker inside containerized templates",
"path": "./templates/docker-in-workspaces.md",
"icon_path": "./images/icons/docker.svg"
},
{
"title": "Devcontainers",
"description": "Use devcontainers in workspaces",
"path": "./templates/devcontainers.md",
"state": "alpha"
}
]
"title": "Open in Coder",
"description": "Add an \"Open in Coder\" button to your repos",
"path": "./templates/open-in-coder.md",
"icon_path": "./images/icons/key.svg"
},
{
"title": "Docker in workspaces",
"description": "Use Docker inside containerized templates",
"path": "./templates/docker-in-workspaces.md",
"icon_path": "./images/icons/docker.svg"
},
{
"title": "Devcontainers",
"description": "Use devcontainers in workspaces",
"path": "./templates/devcontainers.md",
"state": "alpha"
}
]
},
Expand Down
File renamed without changes.
41 changes: 41 additions & 0 deletions docs/templates/creating.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Creating, editing, and updating templates

You create and edit Coder templates as [Terraform](./concepts.md) configuration files (`.tf`).

## Who creates templates?

The [Template Admin](../admin/users.md) role (and above) can create templates. End users (developers) create workspaces from them.

Templates can also be [managed witg git](./change-management.md), allowing any developer to propose changes to a template.

> [Template RBAC](../admin/rbac.md) allows you to give different users & groups access to templates.

## Starter templates

We provide starter templates for common cloud providers (e.g. AWS) and orchestrators (e.g. Kubernetes). From there, you can modify them with [Terraform](https://terraform.io) to use your own images, VPC, cloud credentials, etc. All Terraform resources and properties are supported, so fear not if your favorite cloud isn't here!

![Starter templates](https://user-images.githubusercontent.com/22407953/256705348-e6fb2963-27f5-414f-9f5c-345cd3b7ee28.png)

If you'd prefer to use the CLI, use `coder templates init`.

> The Terraform code for our starter templates are avalible on our [GitHub](https://github.com/coder/coder/tree/main/examples/templates).

## Editing templates

Our starter templates are meant to be modified work for your use cases! You can edit the Terraform code for a template directly in the UI.

![Editing a template](https://user-images.githubusercontent.com/22407953/256706060-71fb48f4-9a1b-42ad-9380-0ecc02db3218.gif)

If you'd prefer to use the CLI, use `coder templates pull` and `coder templates push`.

> Even if you are a Terraform expert, we suggest reading our full guide on [writing Coder templates](./managing.md).

## Updating templates

Templates are versioned, keeping all developer workspaces up-to-date. When a new version is published, developers are notified to get the latest infrastructure, software, or security patches.

![Template update screen](https://user-images.githubusercontent.com/22407953/256712740-96121f81-a3c8-4be0-90dc-c1c4cabed634.png)

## Next step

- [Your first templates](./tutorial.md)
41 changes: 2 additions & 39 deletions docs/templates/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,5 @@
Templates define the underlying infrastructure that workspaces run on.
All Coder [workspaces](./workspaces.md) are created from a template.

You create and edit Coder templates as [Terraform](./concepts.md) configuration files (`.tf`).

## Who creates templates?

The [Template Admin](../admin/users.md) role (and above) can create templates. End users (developers) create workspaces from them.

Templates can also be [managed witg git](./change-management.md), allowing any developer to propose changes to a template.

> [Template RBAC](../admin/rbac.md) allows you to give different users & groups access to templates.

## Starter templates

We provide starter templates for common cloud providers (e.g. AWS) and orchestrators (e.g. Kubernetes). From there, you can modify them with [Terraform](https://terraform.io) to use your own images, VPC, cloud credentials, etc. All Terraform resources and properties are supported, so fear not if your favorite cloud isn't here!

![Starter templates](https://user-images.githubusercontent.com/22407953/256705348-e6fb2963-27f5-414f-9f5c-345cd3b7ee28.png)

If you'd prefer to use the CLI, use `coder templates init`.

> The Terraform code for our starter templates are avalible on our [GitHub](https://github.com/coder/coder/tree/main/examples/templates).

## Editing templates

Our starter templates are meant to be modified work for your use cases! You can edit the Terraform code for a template directly in the UI.

![Editing a template](https://user-images.githubusercontent.com/22407953/256706060-71fb48f4-9a1b-42ad-9380-0ecc02db3218.gif)

If you'd prefer to use the CLI, use `coder templates pull` and `coder templates push`.

> Even if you are a Terraform expert, we suggest reading our full guide on [writing Coder templates](./managing.md).

## Updating templates

Templates are versioned, keeping all developer workspaces up-to-date. When a new version is published, developers are notified to get the latest infrastructure, software, or security patches.

![Template update screen](https://user-images.githubusercontent.com/22407953/256712740-96121f81-a3c8-4be0-90dc-c1c4cabed634.png)

## Next step

- [Anatomy of a template](./concepts.md)
<children>
</children>
7 changes: 0 additions & 7 deletions docs/templates/integrating.md

This file was deleted.

14 changes: 14 additions & 0 deletions docs/templates/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Your first template

## Install Docker

## Install Coder

## Choose a starter template

## Creating a template for Kubernetes

## Next steps

- [Anatomy of a template](./anatomy.md)
- [Setting up templates](./best-practices.md)