Skip to content

Commit c52e45c

Browse files
bpmctKatie Hornejsjoeio
authored andcommitted
feat: initial docs pages (#1107)
* docs structure and edits to getting started * draft for about page * skeleton for concepts page * attempt at explaining templates * left-align tables * add best practices and variables * update structrure * update structure * templates are shared * workspaces docs * remove coming soon * fix typos * docs structure and edits to getting started * draft for about page * skeleton for concepts page * attempt at explaining templates * left-align tables * add best practices and variables * update structrure * update structure * templates are shared * workspaces docs * remove coming soon * fix typos * fix typos * Update docs/about.md Co-authored-by: Joe Previte <jjprevite@gmail.com> * remove line breaks between bullets * rename variables to parameters * reduce limits * chore: edit text * revert some changes, fix footnotes Co-authored-by: Katie Horne <katie@coder.com> Co-authored-by: Joe Previte <jjprevite@gmail.com>
1 parent 99d6d18 commit c52e45c

File tree

6 files changed

+302
-55
lines changed

6 files changed

+302
-55
lines changed

docs/CONTRIBUTING.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,53 @@
1+
12
# Contributing
23

34
## Requirements
45

5-
`coder` requires Go 1.18+, Node 14+, and GNU Make.
6+
Coder requires Go 1.18+, Node 14+, and GNU Make.
67

7-
### Development Workflow
8+
### Development workflow
89

9-
The following `make` commands and scripts used in development:
10+
Use the following `make` commands and scripts in development:
1011

1112
- `make bin` builds binaries
1213
- `make install` installs binaries to `$GOPATH/bin`
1314
- `make test`
14-
- `make release` dry-runs a new release
15-
- `./develop.sh` hot-reloads for frontend development
15+
- `make release` dry runs a new release
16+
- `./develop.sh` hot reloads for front-end development
1617

1718
## Styling
1819

19-
### Go Style
20+
### Use Go style
2021

21-
Contributions must adhere to [Effective Go](https://go.dev/doc/effective_go). Linting rules should
22-
be preferred over documenting styles (run ours with `make lint`); humans are error prone!
22+
Contributions must adhere to the guidelines outlined in [Effective
23+
Go](https://go.dev/doc/effective_go). We prefer linting rules over documenting
24+
styles (run ours with `make lint`); humans are error-prone!
2325

24-
Read [Go's Code Review Comments Wiki](https://github.com/golang/go/wiki/CodeReviewComments) to find
26+
Read [Go's Code Review Comments
27+
Wiki](https://github.com/golang/go/wiki/CodeReviewComments) for information on
2528
common comments made during reviews of Go code.
2629

27-
#### No Unused Packages
28-
29-
Coders write packages that are used during implementation. It's difficult to validate whether an
30-
abstraction is valid until it's checked against an implementation. This results in a larger
31-
changeset but provides reviewers with an educated perspective on the contribution.
30+
### Avoid unused packages
3231

33-
## Review
32+
Coder writes packages that are used during implementation. It isn't easy to
33+
validate whether an abstraction is valid until it's checked against an
34+
implementation. This results in a larger changeset, but it provides reviewers
35+
with a holistic perspective regarding the contribution.
3436

35-
> Taken from [Go's review philosophy](https://go.dev/doc/contribute#reviews).
37+
## Reviews
3638

37-
Coders value thorough reviews. Think of each review comment like a ticket: you are expected to
38-
somehow "close" it by acting on it, either by implementing the suggestion or convincing the reviewer
39-
otherwise.
39+
> The following information has been borrowed from [Go's review
40+
> philosophy](https://go.dev/doc/contribute#reviews).
4041
41-
After you update the change, go through the review comments and make sure to reply to every one. You
42-
can click the "Done" button to reply indicating that you've implemented the reviewer's suggestion;
43-
otherwise, click on "Reply" and explain why you have not, or what you have done instead.
42+
Coder values thorough reviews. For each review comment that you receive, please
43+
"close" it by implementing the suggestion or providing an explanation on why the
44+
suggestion isn't the best option. Be sure to do this for each comment; you can
45+
click **Done** to indicate that you've implemented the suggestion, or you can
46+
add a comment explaining why you aren't implementing the suggestion (or what you
47+
chose to implement instead).
4448

45-
It is perfectly normal for changes to go through several round of reviews, with one or more
46-
reviewers making new comments every time and then waiting for an updated change before reviewing
47-
again. All contributors, including experienced maintainers, are subject to the same review cycle;
48-
this process is not meant to be applied selectively or discourage anyone from contribution.
49+
It is perfectly normal for changes to go through several rounds of reviews, with
50+
one or more reviewers making new comments every time, then waiting for an
51+
updated change before reviewing again. All contributors, including those from
52+
maintainers, are subject to the same review cycle; this process is not meant to
53+
be applied selectively or to discourage anyone from contributing.

docs/README.md

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,97 @@
11
# Coder
22

3-
[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/coder/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/coder/branch/main/graph/badge.svg?token=TNLW3OAP6G)](https://codecov.io/gh/coder/coder)
3+
[!["GitHub
4+
Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/coder/discussions)
5+
[!["Join us on
6+
Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community)
7+
[![Twitter
8+
Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq)
9+
[![codecov](https://codecov.io/gh/coder/coder/branch/main/graph/badge.svg?token=TNLW3OAP6G)](https://codecov.io/gh/coder/coder)
410

511
Provision remote development environments with Terraform.
612

713
## Highlights
814

9-
- Automate development environments for Linux, Windows, and MacOS in your cloud
15+
- Automate development environments for Linux, Windows, and macOS
1016
- Start writing code with a single command
11-
- Use one of many [examples](./examples) to get started
17+
- Get started quickly using one of the [examples](./examples) provided
1218

13-
## Getting Started
19+
## Installing Coder
1420

15-
Install [the latest release](https://github.com/coder/coder/releases).
21+
Install [the latest release](https://github.com/coder/coder/releases) on a system with
22+
at least 1 CPU core and 2 GB RAM.
1623

17-
To tinker, start with dev-mode (all data is in-memory, and is destroyed on exit):
24+
To test, start with dev mode (all data is in-memory and is destroyed on exit):
1825

1926
```bash
20-
$ coder server --dev
27+
coder server --dev
2128
```
2229

2330
To run a production deployment with PostgreSQL:
2431

2532
```bash
26-
$ CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
33+
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
2734
coder server
2835
```
2936

30-
To run as a system service, install with `.deb` or `.rpm`:
37+
To run as a system service, install with `.deb` (Debian, Ubuntu) or `.rpm`
38+
(Fedora, CentOS, RHEL, SUSE):
3139

3240
```bash
3341
# Edit the configuration!
34-
$ sudo vim /etc/coder.d/coder.env
35-
$ sudo service coder restart
42+
sudo vim /etc/coder.d/coder.env
43+
sudo service coder restart
3644
```
3745

38-
### Your First Workspace
46+
Use `coder start --help` to get a complete list of flags and environment
47+
variables.
3948

40-
In a new terminal, create a new project (eg. Develop in Linux on Google Cloud):
49+
### Your first workspace
4150

42-
```
43-
$ coder templates init
44-
$ coder templates create
51+
In a new terminal, create a template (e.g., a template to **Develop in Linux on
52+
Google Cloud**):
53+
54+
```bash
55+
coder templates init
56+
coder templates create
4557
```
4658

47-
Create a new workspace and SSH in:
59+
Create a workspace and connect to it via SSH:
4860

49-
```
50-
$ coder workspaces create my-first-workspace
51-
$ coder ssh my-first-workspace
61+
```bash
62+
coder workspaces create my-first-workspace
63+
coder ssh my-first-workspace
5264
```
5365

54-
### Working with Projects
66+
### Modifying templates
5567

56-
You can edit the Terraform from a sample project:
68+
You can edit the Terraform template using a sample template:
5769

5870
```sh
59-
$ coder templates init
60-
$ cd gcp-linux/
61-
$ vim main.tf
62-
$ coder templates update gcp-linux
71+
coder templates init
72+
cd gcp-linux/
73+
vim main.tf
74+
coder templates update gcp-linux
6375
```
6476

77+
## Documentation
78+
79+
- [About Coder](./about.md#about-coder)
80+
- [Why remote development](about.md#why-remote-development)
81+
- [Why Coder](about.md#why-coder)
82+
- [What Coder is not](about.md#what-coder-is-not)
83+
- [Templates](./templates.md)
84+
- [Manage templates](./templates.md#manage-templates)
85+
- [Persistent and ephemeral
86+
resources](./templates.md#persistent-and-ephemeral-resources)
87+
- [Variables](./templates.md#variables)
88+
- [Workspaces](./workspaces.md)
89+
- [Create workspaces](./workspaces.md#create-workspaces)
90+
- [Connect with SSH](./workspaces.md#connect-with-ssh)
91+
- [Editors and IDEs](./workspaces.md#editors-and-ides)
92+
- [Workspace lifecycle](./workspaces.md#workspace-lifecycle)
93+
- [Updating workspaces](./workspaces.md#updating-workspaces)
94+
6595
## Contributing
6696

6797
Read the [contributing docs](./CONTRIBUTING.md).
68-

docs/SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Security Policy
22

3-
Keeping your code secure is core to what we do. If you find a vulnerability,
4-
please send an email to security@coder.com, and our team will respond to you.
3+
Keeping your code secure is central to what we do. If you find a vulnerability,
4+
please send an email to security@coder.com.

docs/about.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
## Why remote development
13+
14+
Migrating from local developer machines to workspaces hosted by cloud services
15+
is an increasingly common solution for developers[^1] and organizations[^2]
16+
alike. There are several benefits, including:
17+
18+
- **Increased speed:** Server-grade compute speeds up operations in software
19+
development, such as IDE loading, code compilation and building, and the
20+
running of large workloads (such as those for monolith or microservice
21+
applications)
22+
23+
- **Easier environment management:** Tools such as Terraform, nix, Docker,
24+
devcontainers, and so on make developer onboarding and the troubleshooting of
25+
development environments easier
26+
27+
- **Increase security:** Centralize source code and other data onto private
28+
servers or cloud services instead of local developer machines
29+
30+
- **Improved compatibility:** Remote workspaces share infrastructure
31+
configuration with other development, staging, and production environments,
32+
reducing configuration drift
33+
34+
- **Improved accessibility:** Devices such as lightweight notebooks,
35+
Chromebooks, and iPads can connect to remote workspaces via browser-based IDEs
36+
or remote IDE extensions
37+
38+
## Why Coder
39+
40+
The key difference between Coder v2 and other remote IDE platforms is the added
41+
layer of infrastructure control. This additional layer allows admins to:
42+
43+
- Support ARM, Windows, Linux, and macOS workspaces
44+
- Modify pod/container specs (e.g., adding disks, managing network policies,
45+
setting/updating environment variables)
46+
- Use VM/dedicated workspaces, developing with Kernel features (no container
47+
knowledge required)
48+
- Enable persistent workspaces, which are like local machines, but faster and
49+
hosted by a cloud service
50+
51+
Coder includes [production-ready templates](../examples) for use with AWS EC2,
52+
Azure, Google Cloud, Kubernetes, and more.
53+
54+
## What Coder is *not*
55+
56+
- Coder is not an infrastructure as code (IaC) platform. Terraform is the first
57+
IaC *provisioner* in Coder, allowing Coder admins to define Terraform
58+
resources as Coder workspaces.
59+
60+
- Coder is not a DevOps/CI platform. Coder workspaces can follow best practices
61+
for cloud service-based workloads, but Coder is not responsible for how you
62+
define or deploy the software you write.
63+
64+
- Coder is not an online IDE. Instead, Coder supports common editors, such as VS
65+
Code, vim, and JetBrains, over HTTPS or SSH.
66+
67+
- Coder is not a collaboration platform. You can use git and dedicated IDE
68+
extensions for pull requests, code reviews, and pair programming.
69+
70+
- Coder is not a SaaS/fully-managed offering. You must host
71+
Coder on a cloud service (AWS, Azure, GCP) or your private data center.
72+
73+
---
74+
75+
Next: [Templates](./templates.md)
76+
77+
[^1]: alexellis.io: [The Internet is my computer](https://blog.alexellis.io/the-internet-is-my-computer/)
78+
79+
[^2]: slack.engineering: [Development environments at Slack](https://slack.engineering/development-environments-at-slack)

docs/templates.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Templates
2+
3+
Templates define the infrastructure underlying workspaces. Each Coder deployment
4+
can have multiple templates for different workloads, such as ones for front-end
5+
development, Windows development, and so on.
6+
7+
Coder manage templates, including sharing them and rolling out updates
8+
to everybody. Users can also manually update their workspaces.
9+
10+
## Manage templates
11+
12+
Coder provides production-ready [sample template](../examples/), but you can
13+
modify the templates with Terraform.
14+
15+
```sh
16+
# start from an example
17+
coder templates init
18+
19+
# optional: modify the template
20+
vim <template-name>/main.tf
21+
22+
# add the template to Coder deployment
23+
coder templates <create/update> <template-name>
24+
```
25+
26+
> We recommend source controlling your templates.
27+
28+
## Persistent and ephemeral resources
29+
30+
Coder supports both ephemeral and persistent resources in workspaces. Ephemeral
31+
resources are destroyed when a workspace is not in use (e.g., when it is
32+
stopped). Persistent resources remain. See how this works for a sample front-end
33+
template:
34+
35+
| Resource | Type |
36+
| :--------------------------- | :--------- |
37+
| google_compute_disk.home_dir | persistent |
38+
| kubernetes_pod.dev | ephemeral |
39+
| └─ nodejs (linux, amd64) | |
40+
| api_token.backend | ephemeral |
41+
42+
When a workspace is deleted, all resources are destroyed.
43+
44+
## Parameters
45+
46+
Templates often contain *parameters*. In Coder, there are two types of parameters:
47+
48+
- **Admin parameters** are set when a template is created/updated. These values
49+
are often cloud secrets, such as a `ServiceAccount` token, and are annotated
50+
with `sensitive = true` in the template code.
51+
52+
**User parameters** are set when a user creates a workspace. They are unique to
53+
each workspace, often personalization settings such as "preferred
54+
region" or "workspace image".
55+
56+
---
57+
58+
Next: [Workspaces](./workspaces.md)

0 commit comments

Comments
 (0)