Skip to content

Commit 0856209

Browse files
committed
Merge branch 'main' into embeddeddb
2 parents 0450fcb + 0f44048 commit 0856209

File tree

8 files changed

+137
-167
lines changed

8 files changed

+137
-167
lines changed

codersdk/parameters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type ParameterSchema struct {
7272

7373
// This is a special array of items provided if the validation condition
7474
// explicitly states the value must be one of a set.
75-
ValidationContains []string `json:"validation_contains"`
75+
ValidationContains []string `json:"validation_contains,omitempty"`
7676
}
7777

7878
// CreateParameterRequest is used to create a new parameter value for a scope.

docs/README.md

Lines changed: 95 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,99 @@
1-
# Coder Documentation
1+
# About Coder
2+
3+
Coder is an open source platform for creating and managing developer workspaces
4+
on your preferred clouds and servers.
5+
6+
By building on top of common development interfaces (SSH) and infrastructure tools (Terraform), Coder aims to make the process of **provisioning** and **accessing** remote workspaces approachable for organizations of various sizes and stages of cloud-native maturity.
7+
8+
> ⚠️ Coder v2 is in **alpha** state and is not ready for production use. For
9+
> production environments, please consider [Coder v1](https://coder.com/docs) or
10+
> [code-server](https://github.com/cdr/code-server).
11+
12+
## How it works
13+
14+
Coder workspaces are represented with Terraform. But, no Terraform knowledge is
15+
required to get started. We have a database of pre-made templates built into the
16+
product.
217

318
<p align="center">
4-
<img src="images/hero-image.png">
19+
<img src="./images/providers-compute.png">
520
</p>
621

7-
## Table of Contents
8-
9-
- [About Coder](./about.md#about-coder)
10-
- [Why remote development](./about.md#why-remote-development)
11-
- [Why Coder](./about.md#why-coder)
12-
- [What Coder is not](./about.md#what-coder-is-not)
13-
- [Comparison: Coder vs. [product]](./about.md#comparison)
14-
- [Quickstart](./quickstart.md)
15-
- [Creating your first template and workspace](./quickstart.md#creating-your-first-template-and-workspace)
16-
- [Modifying templates](./quickstart.md#modifying-templates)
17-
- [Templates](./templates.md)
18-
- [Manage templates](./templates.md#manage-templates)
19-
- [Persistent and ephemeral
20-
resources](./templates.md#persistent-and-ephemeral-resources)
21-
- [Parameters](./templates.md#parameters)
22-
- [Workspaces](./workspaces.md)
23-
- [Create workspaces](./workspaces.md#create-workspaces)
24-
- [Connect with SSH](./workspaces.md#connect-with-ssh)
25-
- [Editors and IDEs](./workspaces.md#editors-and-ides)
26-
- [Workspace lifecycle](./workspaces.md#workspace-lifecycle)
27-
- [Updating workspaces](./workspaces.md#updating-workspaces)
22+
Coder workspaces don't stop at compute. You can add storage buckets, secrets, sidecars
23+
and whatever else Terraform lets you dream up.
24+
25+
[Learn more about managing infrastructure.](./templates.md)
26+
27+
## IDE Support
28+
29+
You can use any Web IDE ([code-server](https://github.com/coder/code-server), [projector](https://github.com/JetBrains/projector-server), [Jupyter](https://jupyter.org/), etc.), [JetBrains Gateway](https://www.jetbrains.com/remote-development/gateway/), [VS Code Remote](https://code.visualstudio.com/docs/remote/ssh-tutorial) or even a file sync such as [mutagen](https://mutagen.io/).
30+
31+
<p align="center">
32+
<img src="./images/ide-icons.svg" height=72>
33+
</p>
34+
35+
## Why remote development
36+
37+
Migrating from local developer machines to workspaces hosted by cloud services
38+
is an increasingly common solution for developers[^1] and organizations[^2]
39+
alike. There are several benefits, including:
40+
41+
- **Increased speed:** Server-grade compute speeds up operations in software
42+
development, such as IDE loading, code compilation and building, and the
43+
running of large workloads (such as those for monolith or microservice
44+
applications)
45+
46+
- **Easier environment management:** Tools such as Terraform, nix, Docker,
47+
devcontainers, and so on make developer onboarding and the troubleshooting of
48+
development environments easier
49+
50+
- **Increase security:** Centralize source code and other data onto private
51+
servers or cloud services instead of local developer machines
52+
53+
- **Improved compatibility:** Remote workspaces share infrastructure
54+
configuration with other development, staging, and production environments,
55+
reducing configuration drift
56+
57+
- **Improved accessibility:** Devices such as lightweight notebooks,
58+
Chromebooks, and iPads can connect to remote workspaces via browser-based IDEs
59+
or remote IDE extensions
60+
61+
## Why Coder
62+
63+
The key difference between Coder v2 and other remote IDE platforms is the added
64+
layer of infrastructure control. This additional layer allows admins to:
65+
66+
- Support ARM, Windows, Linux, and macOS workspaces
67+
- Modify pod/container specs (e.g., adding disks, managing network policies,
68+
setting/updating environment variables)
69+
- Use VM/dedicated workspaces, developing with Kernel features (no container
70+
knowledge required)
71+
- Enable persistent workspaces, which are like local machines, but faster and
72+
hosted by a cloud service
73+
74+
Coder includes [production-ready templates](../examples/templates) for use with AWS EC2,
75+
Azure, Google Cloud, Kubernetes, and more.
76+
77+
## What Coder is _not_
78+
79+
- Coder is not an infrastructure as code (IaC) platform. Terraform is the first
80+
IaC _provisioner_ in Coder, allowing Coder admins to define Terraform
81+
resources as Coder workspaces.
82+
83+
- Coder is not a DevOps/CI platform. Coder workspaces can follow best practices
84+
for cloud service-based workloads, but Coder is not responsible for how you
85+
define or deploy the software you write.
86+
87+
- Coder is not an online IDE. Instead, Coder supports common editors, such as VS
88+
Code, vim, and JetBrains, over HTTPS or SSH.
89+
90+
- Coder is not a collaboration platform. You can use git and dedicated IDE
91+
extensions for pull requests, code reviews, and pair programming.
92+
93+
- Coder is not a SaaS/fully-managed offering. You must host
94+
Coder on a cloud service (AWS, Azure, GCP) or your private data center.
95+
96+
Next: [Templates](./templates.md)
97+
98+
[^1]: alexellis.io: [The Internet is my computer](https://blog.alexellis.io/the-internet-is-my-computer/)
99+
[^2]: slack.engineering: [Development environments at Slack](https://slack.engineering/development-environments-at-slack)

docs/about.md

Lines changed: 0 additions & 99 deletions
This file was deleted.

docs/install.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ Coder publishes the following system packages [in GitHub releases](https://githu
4141
Once installed, you can run Coder as a system service:
4242

4343
```sh
44-
# Setup PostgreSQL and an external access URL
44+
# Set up an external access URL or enable CODER_TUNNEL
4545
sudo vim /etc/coder.d/coder.env
46-
sudo service coder restart
46+
# Use systemd to start Coder now and on reboot
47+
sudo systemctl enable --now coder
48+
# View the logs to ensure a successful start
49+
journalctl -u coder.service -b
4750
```
4851

4952
## docker-compose
@@ -53,53 +56,53 @@ Coder](https://github.com/coder/coder/releases) installed.
5356

5457
1. Clone the `coder` repository:
5558

56-
```console
57-
git clone git@github.com:coder/coder.git
58-
```
59+
```console
60+
git clone git@github.com:coder/coder.git
61+
```
5962

6063
1. Navigate into the `coder` folder. Coder requires a non-`localhost` access URL
61-
for non-Docker-based examples; if you have a public IP or a domain/reverse
62-
proxy, you can provide this value before running `docker-compose up` to
63-
start the service:
64-
65-
```console
66-
cd coder
67-
CODER_ACCESS_URL=https://coder.mydomain.com
68-
docker-compose up
69-
```
64+
for non-Docker-based examples; if you have a public IP or a domain/reverse
65+
proxy, you can provide this value before running `docker-compose up` to
66+
start the service:
7067

71-
Otherwise, you can start the service:
68+
```console
69+
cd coder
70+
CODER_ACCESS_URL=https://coder.mydomain.com
71+
docker-compose up
72+
```
7273

73-
```console
74-
cd coder
75-
docker-compose up
76-
```
74+
Otherwise, you can start the service:
7775

78-
Alternatively, if you would like to start a **temporary deployment**:
76+
```console
77+
cd coder
78+
docker-compose up
79+
```
7980

80-
```console
81-
docker run --rm -it \
82-
-e CODER_DEV_MODE=true \
83-
-v /var/run/docker.sock:/var/run/docker.sock \
84-
ghcr.io/coder/coder:v0.5.10
85-
```
81+
Alternatively, if you would like to start a **temporary deployment**:
82+
83+
```console
84+
docker run --rm -it \
85+
-e CODER_DEV_MODE=true \
86+
-v /var/run/docker.sock:/var/run/docker.sock \
87+
ghcr.io/coder/coder:v0.5.10
88+
```
8689

8790
1. Follow the on-screen instructions to create your first template and workspace
8891

89-
## Manual
92+
## Manual
9093

91-
We publish self-contained .zip and .tar.gz archives in [GitHub releases](https://github.com/coder/coder/releases). The archives bundle `coder` binary.
94+
We publish self-contained .zip and .tar.gz archives in [GitHub releases](https://github.com/coder/coder/releases). The archives bundle `coder` binary.
9295

9396
1. Download the [release archive](https://github.com/coder/coder/releases) appropriate for your operating system
9497

9598
1. Unzip the folder you just downloaded, and move the `coder` executable to a location that's on your `PATH`
9699

97-
```sh
98-
# ex. MacOS and Linux
99-
mv coder /usr/local/bin
100-
```
100+
```sh
101+
# ex. MacOS and Linux
102+
mv coder /usr/local/bin
103+
```
101104

102-
> Windows users: see [this guide](https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23) for adding folders to `PATH`.
105+
> Windows users: see [this guide](https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23) for adding folders to `PATH`.
103106
104107
1. Start a Coder server
105108

docs/manifest.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
{
22
"versions": ["0.6.6"],
33
"routes": [
4-
{
5-
"title": "Home",
6-
"description": "How to install and run Coder",
7-
"path": "./README.md",
8-
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16px\" xml:space=\"preserve\"><path d=\"M15.45,7L14,5.551V2c0-0.55-0.45-1-1-1h-1c-0.55,0-1,0.45-1,1v0.553L9,0.555C8.727,0.297,8.477,0,8,0S7.273,0.297,7,0.555 L0.55,7C0.238,7.325,0,7.562,0,8c0,0.563,0.432,1,1,1h1v6c0,0.55,0.45,1,1,1h3v-5c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1v5h3 c0.55,0,1-0.45,1-1V9h1c0.568,0,1-0.437,1-1C16,7.562,15.762,7.325,15.45,7z\"></path></svg>"
9-
},
104
{
115
"title": "About",
126
"description": "About Coder",
13-
"path": "./about.md",
14-
"icon": "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 2V11H2V15C2 16.7 3.3 18 5 18H15C16.7 18 18 16.7 18 15V2H6ZM16 15C16 15.6 15.6 16 15 16H8V4H16V15Z\" /><path d=\"M14 7H10V9H14V7Z\" /><path d=\"M14 11H10V13H14V11Z\" /></svg>"
7+
"path": "./README.md",
8+
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16px\" xml:space=\"preserve\"><path d=\"M15.45,7L14,5.551V2c0-0.55-0.45-1-1-1h-1c-0.55,0-1,0.45-1,1v0.553L9,0.555C8.727,0.297,8.477,0,8,0S7.273,0.297,7,0.555 L0.55,7C0.238,7.325,0,7.562,0,8c0,0.563,0.432,1,1,1h1v6c0,0.55,0.45,1,1,1h3v-5c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1v5h3 c0.55,0,1-0.45,1-1V9h1c0.568,0,1-0.437,1-1C16,7.562,15.762,7.325,15.45,7z\"></path></svg>"
159
},
1610
{
1711
"title": "Installation",

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export interface ParameterSchema {
190190
readonly validation_condition: string
191191
readonly validation_type_system: string
192192
readonly validation_value_type: string
193-
readonly validation_contains: string[]
193+
readonly validation_contains?: string[]
194194
}
195195

196196
// From codersdk/provisionerdaemons.go:33:6

site/src/components/ParameterInput/ParameterInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const ParameterInput: FC<ParameterInputProps> = ({ disabled, onChange, sc
2929
}
3030

3131
const ParameterField: React.FC<ParameterInputProps> = ({ disabled, onChange, schema }) => {
32-
if (schema.validation_contains.length > 0) {
32+
if (schema.validation_contains && schema.validation_contains.length > 0) {
3333
return (
3434
<RadioGroup
3535
defaultValue={schema.default_source_value}

site/src/components/Workspace/Workspace.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const Workspace: FC<WorkspaceProps> = ({
7777
workspace={workspace}
7878
/>
7979

80-
<WorkspaceDeletedBanner workspace={workspace} handleClick={() => navigate(`/workspaces/new`)} />
80+
<WorkspaceDeletedBanner workspace={workspace} handleClick={() => navigate(`/templates`)} />
8181

8282
<WorkspaceStats workspace={workspace} />
8383

0 commit comments

Comments
 (0)