Skip to content

docs: restructure docs #14182

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

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
13d4f56
docs offsite day 1
bpmct May 22, 2024
3cf73ed
updated coder tour and screenshots
stirby May 23, 2024
5bcaf81
edit manifest
bpmct May 23, 2024
e97dcba
incomplete info on schedule
stirby May 23, 2024
1352640
changes
bpmct May 23, 2024
56ef29e
rebase on `main`
matifali Aug 6, 2024
d9b2b76
removed stub on coder tour
stirby May 23, 2024
de4599c
workspace README page and tour cleanup
stirby May 23, 2024
2c277df
fixed tour MD linksg
stirby May 23, 2024
ad4bb0c
replaced broken pngs
stirby May 23, 2024
920ac48
moved workspace access to a directory
stirby May 23, 2024
133721a
rebase on `main`
matifali Aug 6, 2024
762b680
workspace access docs
stirby May 23, 2024
f74f54d
user guides manifest
stirby May 23, 2024
eab79b3
rebase on `main`
matifali Aug 6, 2024
af700c3
vscode
stirby May 23, 2024
442b6fd
add schedule
bpmct May 23, 2024
c4de546
title case for user guides
stirby May 24, 2024
248bbc2
workspace scheduling
stirby May 24, 2024
48bdc86
added workspace updating to main user guide
stirby May 24, 2024
39185ed
dotfiles page done
stirby May 24, 2024
0cc2d32
fleshed out vscode page
stirby May 24, 2024
bec25cb
weekend
stirby May 26, 2024
79ee974
templates
bpmct May 24, 2024
a3f2e84
integrations
stirby May 26, 2024
c0784a4
removed other platforms page
stirby May 26, 2024
1753902
cleanup
stirby May 29, 2024
90d92e1
some reorg and writing
bpmct May 27, 2024
03f5a93
migrated guides to tutorials
stirby May 30, 2024
ee2c576
infrastructure landing page
bpmct Jun 8, 2024
2dcf91e
add guide for creating templates
bpmct Jun 8, 2024
1907108
new format
bpmct Jun 8, 2024
1215e22
consider linking to tf
bpmct Jun 8, 2024
ca1a458
install landing page
bpmct Jun 8, 2024
9b55009
post pto sync
stirby Jun 12, 2024
6267964
in flight admin-workspace changes
stirby Jun 12, 2024
13716a1
fixing images in about page
stirby Jun 12, 2024
17fcea1
reference/cli proper structure
bpmct Jun 15, 2024
fc159ce
rebase on `main`
matifali Aug 6, 2024
330132b
rebase on `main`
matifali Aug 6, 2024
1efad16
fixups for cli and api gen
bpmct Jun 15, 2024
215a3ac
modify to look for Command Line nested in manifest
bpmct Jun 15, 2024
0041e8c
rebase on `main`
matifali Aug 6, 2024
822130a
wip
matifali Aug 6, 2024
293e07c
wip
matifali Aug 6, 2024
259668b
add screenshots
bpmct Jun 15, 2024
bcfe8ba
workspace lifecycle WIP
stirby Jun 20, 2024
dd73049
added workspace lifecycle to manifest for preview
stirby Jun 20, 2024
d6f2a8c
moved resource definition outside of user guides
stirby Jun 20, 2024
15592cb
fixed manifext typo
stirby Jun 20, 2024
875274d
rough draft of workspace lifecycle
stirby Jun 20, 2024
ce0cd54
cleaned up user guide for workspace scheduling
stirby Jun 20, 2024
d47245b
linked workspace scheduling guide in workspace lifecycle
stirby Jun 20, 2024
bc7db22
started 'extending templates' rearranged resource persistence
stirby Jun 22, 2024
2da48b9
copied secrets.md under admin/security
stirby Jun 24, 2024
5d07ed9
wip
matifali Aug 6, 2024
1235238
partial completion of admin/templates/extending-templates
stirby Jun 24, 2024
22c4a55
additional extending templates refactors
stirby Jun 24, 2024
8add1d7
finished 'extending templates' with variables.md from old docs
stirby Jun 24, 2024
51365cd
added manifest for extending templates
stirby Jun 24, 2024
3a46ccd
added secrets to manifest
stirby Jun 24, 2024
6c269eb
added FAQs as a subsection of guides. Going to keep them for now.
stirby Jul 19, 2024
9ac4f3f
migrated networking docs
stirby Jul 19, 2024
cf13803
added control plane configuration docs
stirby Jul 19, 2024
4098a8c
add integration guides
matifali Aug 6, 2024
34b2ed6
fix manifest
matifali Aug 6, 2024
5ca11b0
fmt and typos
matifali Aug 6, 2024
1447aea
fixup!
matifali Aug 6, 2024
d00cc9b
fix some links
matifali Aug 6, 2024
cafa035
fixup!
matifali Aug 6, 2024
7963a1a
`make fmt`
matifali Aug 6, 2024
aa7d43c
`make gen`
matifali Aug 6, 2024
adfc34c
`make fmt`
matifali Aug 6, 2024
1d21c9a
fixup!
matifali Aug 6, 2024
5f5b3d9
fix capitalization
matifali Aug 6, 2024
4e43821
add scaling to manifest
matifali Aug 6, 2024
0d20438
fix link
matifali Aug 6, 2024
0763b35
rebase on `main`
matifali Aug 7, 2024
bf5535c
rebase on `main`
matifali Aug 7, 2024
2e4b218
fmt and typos
matifali Aug 6, 2024
0996219
`make fmt`
matifali Aug 7, 2024
990d440
`make gen`
matifali Aug 7, 2024
66ff05e
chore: bump github.com/ory/dockertest/v3 from 3.10.0 to 3.11.0 (#14237)
dependabot[bot] Aug 12, 2024
3b099fd
added workspace proxies from lost branch
stirby Aug 13, 2024
2f14a08
chore(docs): move scaling docs under admin/infrastructure (#14270)
stirby Aug 15, 2024
ad16573
chore(docs): add WebRDP to restructure docs (#14385)
stirby Aug 21, 2024
579778e
wip
matifali Aug 22, 2024
e8eb3e4
fixup!
matifali Aug 22, 2024
4b9c2c6
fmt
matifali Aug 22, 2024
01707ec
add snap
matifali Aug 22, 2024
e034239
fixup!
matifali Aug 22, 2024
c021161
fix IDEs mess
matifali Aug 22, 2024
3ef9932
fmt
matifali Aug 23, 2024
d3b4b78
link change management
matifali Aug 23, 2024
18a498d
add terraform modules
matifali Aug 23, 2024
801d4fa
delete filebrowser
matifali Aug 23, 2024
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
wip
  • Loading branch information
matifali committed Aug 22, 2024
commit 579778e91e6068a81afdc0e440c4acb44e7c99ea
257 changes: 257 additions & 0 deletions docs/admin/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,263 @@ To configure Coder behind a corporate proxy, set the environment variables
`HTTP_PROXY` and `HTTPS_PROXY`. Be sure to restart the server. Lowercase values
(e.g. `http_proxy`) are also respected in this case.

## External Authentication

To add an external authentication provider, you'll need to create an OAuth
application. The following providers are supported:

- [GitHub](#github)
- [GitLab](https://docs.gitlab.com/ee/integration/oauth_provider.html)
- [BitBucket](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
- [Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops)
- [Azure DevOps (via Entra ID)](https://learn.microsoft.com/en-us/entra/architecture/auth-oauth2)

The next step is to configure the Coder server to use the OAuth application by
setting the following environment variables:

```env
CODER_EXTERNAL_AUTH_0_ID="<USER_DEFINED_ID>"
CODER_EXTERNAL_AUTH_0_TYPE=<github|gitlab|azure-devops|bitbucket-cloud|bitbucket-server|etc>
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx

# Optionally, configure a custom display name and icon
CODER_EXTERNAL_AUTH_0_DISPLAY_NAME="Google Calendar"
CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://mycustomicon.com/google.svg"
```

The `CODER_EXTERNAL_AUTH_0_ID` environment variable is used for internal
reference. Therefore, it can be set arbitrarily (e.g., `primary-github` for your
GitHub provider).

### GitHub

> If you don't require fine-grained access control, it's easier to configure a
> GitHub OAuth app!

1. [Create a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)

- Set the callback URL to
`https://coder.example.com/external-auth/USER_DEFINED_ID/callback`.
- Deactivate Webhooks.
- Enable fine-grained access to specific repositories or a subset of
permissions for security.

![Register GitHub App](../images/admin/github-app-register.png)

2. Adjust the GitHub App permissions. You can use more or less permissions than
are listed here, this is merely a suggestion that allows users to clone
repositories:

![Adjust GitHub App Permissions](../images/admin/github-app-permissions.png)

| Name | Permission | Description |
| ------------- | ------------ | ------------------------------------------------------ |
| Contents | Read & Write | Grants access to code and commit statuses. |
| Pull requests | Read & Write | Grants access to create and update pull requests. |
| Workflows | Read & Write | Grants access to update files in `.github/workflows/`. |
| Metadata | Read-only | Grants access to metadata written by GitHub Apps. |
| Members | Rad-only | Grabts access to organization members and teams. |

3. Install the App for your organization. You may select a subset of
repositories to grant access to.

![Install GitHub App](../images/admin/github-app-install.png)

```env
CODER_EXTERNAL_AUTH_0_ID="USER_DEFINED_ID"
CODER_EXTERNAL_AUTH_0_TYPE=github
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
```

### GitHub Enterprise

GitHub Enterprise requires the following environment variables:

```env
CODER_EXTERNAL_AUTH_0_ID="primary-github"
CODER_EXTERNAL_AUTH_0_TYPE=github
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://github.example.com/api/v3/user"
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token"
```

### Bitbucket Server

Bitbucket Server requires the following environment variables:

```env
CODER_EXTERNAL_AUTH_0_ID="primary-bitbucket-server"
CODER_EXTERNAL_AUTH_0_TYPE=bitbucket-server
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxx
CODER_EXTERNAL_AUTH_0_AUTH_URL=https://bitbucket.domain.com/rest/oauth2/latest/authorize
```

### Azure DevOps

Azure DevOps requires the following environment variables:

```env
CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops"
CODER_EXTERNAL_AUTH_0_TYPE=azure-devops
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
# Ensure this value is your "Client Secret", not "App Secret"
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://app.vssps.visualstudio.com/oauth2/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token"
```

### Azure DevOps (via Entra ID)

Azure DevOps (via Entra ID) requires the following environment variables:

```env
CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops"
CODER_EXTERNAL_AUTH_0_TYPE=azure-devops-entra
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://login.microsoftonline.com/<TENANT ID>/oauth2/authorize"
```

> Note: Your app registration in Entra ID requires the `vso.code_write` scope

### GitLab self-managed

GitLab self-managed requires the following environment variables:

```env
CODER_EXTERNAL_AUTH_0_ID="primary-gitlab"
CODER_EXTERNAL_AUTH_0_TYPE=gitlab
# This value is the "Application ID"
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://gitlab.company.org/oauth/token/info"
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://gitlab.company.org/oauth/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://gitlab.company.org/oauth/token"
CODER_EXTERNAL_AUTH_0_REGEX=gitlab\.company\.org
```

### Gitea

```env
CODER_EXTERNAL_AUTH_0_ID="gitea"
CODER_EXTERNAL_AUTH_0_TYPE=gitea
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
# If self managed, set the Auth URL to your Gitea instance
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://gitea.com/login/oauth/authorize"
```

The Redirect URI for Gitea should be
https://coder.company.org/external-auth/gitea/callback

### Self-managed git providers

Custom authentication and token URLs should be used for self-managed Git
provider deployments.

```env
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/oauth/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/oauth/token"
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
CODER_EXTERNAL_AUTH_0_REGEX=github\.company\.org
```

> Note: The `REGEX` variable must be set if using a custom git domain.

### JFrog Artifactory

See [this](../admin/integrations/jfrog-artifactory.md) guide on instructions on
how to set up for JFrog Artifactory.

### Custom scopes

Optionally, you can request custom scopes:

```env
CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key"
```

### Multiple External Providers (enterprise)

Multiple providers are an Enterprise feature. [Learn more](../enterprise.md).
Below is an example configuration with multiple providers.

```env
# Provider 1) github.com
CODER_EXTERNAL_AUTH_0_ID=primary-github
CODER_EXTERNAL_AUTH_0_TYPE=github
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_REGEX=github.com/orgname

# Provider 2) github.example.com
CODER_EXTERNAL_AUTH_1_ID=secondary-github
CODER_EXTERNAL_AUTH_1_TYPE=github
CODER_EXTERNAL_AUTH_1_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_1_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_1_REGEX=github.example.com
CODER_EXTERNAL_AUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize"
CODER_EXTERNAL_AUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token"
CODER_EXTERNAL_AUTH_1_VALIDATE_URL="https://github.example.com/api/v3/user"
```

To support regex matching for paths (e.g. github.com/orgname), you'll need to
add this to the
[Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script):

```shell
git config --global credential.useHttpPath true
```

### Kubernetes environment variables

If you deployed Coder with Kubernetes you can set the environment variables in
your `values.yaml` file:

```yaml
coder:
env:
# […]
- name: CODER_EXTERNAL_AUTH_0_ID
value: USER_DEFINED_ID

- name: CODER_EXTERNAL_AUTH_0_TYPE
value: github

- name: CODER_EXTERNAL_AUTH_0_CLIENT_ID
valueFrom:
secretKeyRef:
name: github-primary-basic-auth
key: client-id

- name: CODER_EXTERNAL_AUTH_0_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: github-primary-basic-auth
key: client-secret
```

You can set the secrets by creating a `github-primary-basic-auth.yaml` file and
applying it.

```yaml
apiVersion: v1
kind: Secret
metadata:
name: github-primary-basic-auth
type: Opaque
stringData:
client-secret: xxxxxxxxx
client-id: xxxxxxxxx
```

Make sure to restart the affected pods for the change to take effect.

## Up Next

- [Learn how to upgrade Coder](./upgrade.md).
9 changes: 6 additions & 3 deletions docs/admin/integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ workspaces can include any Terraform resource. See our

You can host your deployment on almost any infrastructure. To learn how, read our [installation guides](../../install/README.md).

The following resources may help as you're deploying Coder.
<children></children>

- [Deploy workspaces on multiple Kubernetes Clusters](./multiple-kube-clusters.md)
<!-- - [Deploy workspaces on multiple Kubernetes Clusters](./multiple-kube-clusters.md)
- [Get workspace build logs from Kubernetes](./kubernetes-logs.md)
- [Track deployment metrics with Prometheus](./prometheus.md)
- [Track deployment metrics with Prometheus](./prometheus.md) -->

The following resources may help as you're deploying Coder.

- [Coder packages: one-click install on cloud providers](https://github.com/coder/packages)
- [Deploy Coder offline](../../install/offline.md)
- [Supported resources (Terraform registry)](https://registry.terraform.io)
Expand Down
6 changes: 3 additions & 3 deletions docs/admin/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ After learning the basics, use starter templates to import a template with sensi

It's often necessary to extend the template to make it generally useful to end users. Common modifications are:

- Your image(s) (e.g. a Docker image with languages and tools installed)
- Additional parameters (e.g. disk size, instance type, or region)
- Additional IDEs (e.g. JetBrains) or features (e.g. dotfiles, RDP)
- Your image(s) (e.g. a Docker image with languages and tools installed). Docs: [Image management](./extending-templates/image-management.md).
- Additional parameters (e.g. disk size, instance type, or region). Docs: [Template parameters](./extending-templates/parameters.md).
- Additional IDEs (e.g. JetBrains) or features (e.g. dotfiles, RDP). Docs: [Adding IDEs and features](./extending-templates/ides/README.md).

Learn more about the various ways you can [extend your templates](./extending-templates.md).

Expand Down
14 changes: 11 additions & 3 deletions docs/admin/templates/extending-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ Template resources follow the [behavior of Terraform resources](https://develope

A common configuration is a template whose only persistent resource is the home directory. This allows the developer to retain their work while ensuring the rest of their environment is consistently up-to-date on each workspace restart.

When a workspace is deleted, the Coder server essentially runs a
[terraform destroy](https://www.terraform.io/cli/commands/destroy) to remove all
resources associated with the workspace.

> Terraform's
> [prevent-destroy](https://www.terraform.io/language/meta-arguments/lifecycle#prevent_destroy)
> and
> [ignore-changes](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changes)
> meta-arguments can be used to prevent accidental data loss.

## Coder apps

Additional IDEs, documentation, or services can be associated to your workspace using the [`coder_app`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app) resource.
Expand All @@ -47,6 +57,4 @@ Note that some apps are associated to the agent by default as [`display_apps`](h

Check out our [module registry](https://registry.coder.com/modules) for additional Coder apps from the team and our OSS community.

<children>

</children>
<children></children>
Loading