Skip to content

Commit e0172dd

Browse files
authored
feat: Update README with highlights and getting started guide (coder#627)
1 parent 13cef7d commit e0172dd

File tree

2 files changed

+50
-63
lines changed

2 files changed

+50
-63
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ install: bin
5050
@echo "-- CLI available at $(shell ls $(INSTALL_DIR)/coder*)"
5151
.PHONY: install
5252

53+
lint:
54+
golangci-lint run
55+
.PHONY: lint
56+
5357
peerbroker/proto: peerbroker/proto/peerbroker.proto
5458
protoc \
5559
--go_out=. \
@@ -89,6 +93,6 @@ site/out:
8993
git checkout HEAD site/out
9094
.PHONY: site/out
9195

92-
lint:
93-
golangci-lint run
94-
.PHONY: lint
96+
test:
97+
gotestsum -- -v -short ./...
98+

README.md

Lines changed: 43 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,64 @@
1-
[![coder](https://github.com/coder/coder/actions/workflows/coder.yaml/badge.svg)](https://github.com/coder/coder/actions/workflows/coder.yaml)
2-
[![codecov](https://codecov.io/gh/coder/coder/branch/main/graph/badge.svg?token=TNLW3OAP6G)](https://codecov.io/gh/coder/coder)
1+
# Coder
32

4-
# Coder v2
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)
54

6-
This repository contains source code for Coder V2. Additional documentation:
5+
Provision remote development environments with Terraform.
76

8-
- [Workspaces V2 RFC](https://www.notion.so/coderhq/b48040da8bfe46eca1f32749b69420dd?v=a4e7d23495094644b939b08caba8e381&p=e908a8cd54804ddd910367abf03c8d0a)
7+
## Highlights
98

10-
## Directory Structure
9+
- Automate development environments for Linux, Windows, and MacOS in your cloud
10+
- Start writing code with a single command
11+
- Use one of many [examples](./examples) to get started
1112

12-
- `.github/`: Settings for [Dependabot for updating dependencies](https://docs.github.com/en/code-security/supply-chain-security/customizing-dependency-updates) and [build/deploy pipelines with GitHub Actions](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions).
13-
- [`semantic.yaml`](./github/semantic.yaml): Configuration for [semantic pull requests](https://github.com/apps/semantic-pull-requests)
14-
- `examples`: Example terraform project templates.
15-
- `site`: Front-end UI code.
13+
## Getting Started
1614

17-
## Development
18-
19-
### Pre-requisites
20-
21-
- `git`
22-
- `go` version 1.17, with the `GOPATH` environment variable set
23-
- `node`
24-
- `yarn`
25-
26-
### Cloning
27-
28-
- `git clone https://github.com/coder/coder`
29-
- `cd coder`
30-
31-
### Building
32-
33-
- `make build`
34-
- `make install`
15+
Install [the latest release](https://github.com/coder/coder/releases).
3516

36-
The `coder` CLI binary will now be available at `$GOPATH/bin/coder`
17+
To tinker, start with dev-mode (all data is in-memory, and is destroyed on exit):
3718

38-
### Running
19+
```bash
20+
$ coder start --dev
21+
```
3922

40-
After building, the binaries will be available at:
41-
- `dist/coder_{os}_{arch}/coder`
23+
To run a production deployment with PostgreSQL:
4224

43-
For the purpose of these steps, an OS of `linux` and an arch of `amd64` is assumed.
25+
```bash
26+
$ CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
27+
coder start
28+
```
4429

45-
To manually run the server and go through first-time set up, run the following commands in separate terminals:
46-
- `dist/coder_linux_amd64/coder daemon` <-- starts the Coder server on port 3000
47-
- `dist/coder_linux_amd64/coder login http://localhost:3000` <-- runs through first-time setup, creating a user and org
30+
To run as a system service, install with `.deb` or `.rpm`:
4831

49-
You'll now be able to login and access the server.
32+
```bash
33+
# Edit the configuration!
34+
$ sudo vim /etc/coder.d/coder.env
35+
$ sudo service coder restart
36+
```
5037

51-
- `dist/coder_linux_amd64/coder projects create -d /path/to/project`
38+
### Your First Workspace
5239

53-
### Development
40+
In a new terminal, create a new project (eg. Develop in Linux on Google Cloud):
5441

55-
- `./develop.sh`
42+
```
43+
$ coder projects init
44+
$ coder projects create
45+
```
5646

57-
The `develop.sh` script does three things:
47+
Create a new workspace and SSH in:
5848

59-
- runs `coder daemon` locally on port `3000`
60-
- runs `webpack-dev-server` on port `8080`
61-
- sets up an initial user and organization
49+
```
50+
$ coder workspaces create my-first-workspace
51+
$ coder ssh my-first-workspace
52+
```
6253

63-
This is the recommend flow for working on the front-end, as hot-reload is set up as part of the webpack config.
64-
65-
Note that `./develop.sh` creates a user and allows you to log into the UI, but does not log you into the CLI, which is required for creating a project. Use the `login` command above before the `projects create` command.
66-
67-
While we're working on automating XState typegen, you may need to run `yarn typegen` from `site`.
68-
69-
## Front-End Plan
70-
71-
For the front-end team, we're planning on 2 phases to the 'v2' work:
72-
73-
### Phase 1
74-
75-
Phase 1 is the 'new-wine-in-an-old-bottle' approach - we want to preserve the look and feel (UX) of v1, while testing and validating the market fit of our new v2 provisioner model. This means that we'll preserve Material UI and re-use components from v1 (porting them over to the v2 codebase).
54+
## Development
7655

77-
### Phase 2
56+
The code structure is inspired by [Basics of Unix Philosophy](https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html) and [Effective Go](https://go.dev/doc/effective_go).
7857

79-
Phase 2 is the 'new-wine-in-a-new-bottle' - which we can do once we've successfully packaged the new wine in the old bottle.
58+
Coder requires Go 1.18+, Node 14+, and GNU Make.
8059

81-
In other words, once we've validated that the new strategy fits and is desirable for our customers, we'd like to build a new, v2-native UI (leveraging designers on the team to build a first-class experience around the new provisioner model).
60+
- `make bin` builds binaries
61+
- `make install` installs binaries to `$GOPATH/bin`
62+
- `make test`
63+
- `make release` dry-runs a new release
64+
- `./develop.sh` hot-reloads for frontend development

0 commit comments

Comments
 (0)