-
Notifications
You must be signed in to change notification settings - Fork 902
feat: Update README with highlights and getting started guide #627
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,46 @@ | ||
[](https://github.com/coder/coder/actions/workflows/coder.yaml) | ||
[](https://codecov.io/gh/coder/coder) | ||
# Coder | ||
|
||
# Coder v2 | ||
[](https://github.com/coder/coder/discussions) [](https://coder.com/community) [](https://twitter.com/coderhq) [](https://codecov.io/gh/coder/coder) | ||
|
||
This repository contains source code for Coder V2. Additional documentation: | ||
Provision remote development environments with Terraform. | ||
|
||
- [Workspaces V2 RFC](https://www.notion.so/coderhq/b48040da8bfe46eca1f32749b69420dd?v=a4e7d23495094644b939b08caba8e381&p=e908a8cd54804ddd910367abf03c8d0a) | ||
## Highlights | ||
|
||
## Directory Structure | ||
- Automate development environments for Linux, Windows, and MacOS in your cloud | ||
- Start writing code with a single command | ||
- Use one of many [examples](./examples) to get started | ||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was gonna nit on the messaging a bit, but decided it'd be more productive once we create a messaging doc. I like the placement of these here 👍🏼 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we can totally change these whenever. Feel free to nit on em' now if you'd like. I'm all ears! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can make these a lot more compelling but I'll wait to invest until Ben takes a pass. |
||
|
||
- `.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). | ||
- [`semantic.yaml`](./github/semantic.yaml): Configuration for [semantic pull requests](https://github.com/apps/semantic-pull-requests) | ||
- `examples`: Example terraform project templates. | ||
- `site`: Front-end UI code. | ||
## Getting Started | ||
|
||
## Development | ||
|
||
### Pre-requisites | ||
|
||
- `git` | ||
- `go` version 1.17, with the `GOPATH` environment variable set | ||
- `node` | ||
- `yarn` | ||
|
||
### Cloning | ||
|
||
- `git clone https://github.com/coder/coder` | ||
- `cd coder` | ||
|
||
### Building | ||
|
||
- `make build` | ||
- `make install` | ||
|
||
The `coder` CLI binary will now be available at `$GOPATH/bin/coder` | ||
|
||
### Running | ||
|
||
After building, the binaries will be available at: | ||
- `dist/coder_{os}_{arch}/coder` | ||
Install [the latest release](https://github.com/coder/coder/releases). | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
For the purpose of these steps, an OS of `linux` and an arch of `amd64` is assumed. | ||
To tinker, start with dev-mode (all data is in-memory): | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To manually run the server and go through first-time set up, run the following commands in separate terminals: | ||
- `dist/coder_linux_amd64/coder daemon` <-- starts the Coder server on port 3000 | ||
- `dist/coder_linux_amd64/coder login http://localhost:3000` <-- runs through first-time setup, creating a user and org | ||
```bash | ||
$ coder start --dev | ||
``` | ||
|
||
You'll now be able to login and access the server. | ||
To run a production deployment with PostgreSQL: | ||
|
||
- `dist/coder_linux_amd64/coder projects create -d /path/to/project` | ||
```bash | ||
$ CODER_PG_CONNECTION_URL="..." coder start | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
### Development | ||
To run as a daemon, use the provided service (Linux only): | ||
|
||
- `./develop.sh` | ||
```bash | ||
$ sudo vim /etc/coder.d/coder.env | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$ sudo service coder restart | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
The `develop.sh` script does three things: | ||
|
||
- runs `coder daemon` locally on port `3000` | ||
- runs `webpack-dev-server` on port `8080` | ||
- sets up an initial user and organization | ||
|
||
This is the recommend flow for working on the front-end, as hot-reload is set up as part of the webpack config. | ||
|
||
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. | ||
|
||
While we're working on automating XState typegen, you may need to run `yarn typegen` from `site`. | ||
|
||
## Front-End Plan | ||
|
||
For the front-end team, we're planning on 2 phases to the 'v2' work: | ||
|
||
### Phase 1 | ||
|
||
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). | ||
## Development | ||
|
||
### Phase 2 | ||
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); these should be read prior to contributing. | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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. | ||
Requires Go 1.18+, Node 14+, and GNU Make. | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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). | ||
- `make bin` build binaries | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `make install` install binaries to `$GOPATH/bin` | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `make test` | ||
- `make release` dry-run a new release | ||
kylecarbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `./develop.sh` hot-reloads for frontend development |
Uh oh!
There was an error while loading. Please reload this page.