- Notifications
You must be signed in to change notification settings - Fork928
add docs for web IDEs (code-server, JetBrains Projector, VNC)#2448
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
6 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
88 changes: 4 additions & 84 deletionsdocs/ides.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
146 changes: 146 additions & 0 deletionsdocs/ides/configuring-web-ides.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Configuring web IDEs | ||
By default, Coder workspaces allow connections via: | ||
- Web terminal | ||
- SSH (plus any [SSH-compatible IDE](../ides.md)) | ||
It's common to also let developers to connect via web IDEs. | ||
 | ||
In Coder, web IDEs are defined as | ||
[coder_app](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app) | ||
resources in the template. This gives you full control over the version, | ||
behavior, and configuration for applications in your workspace. | ||
## code-server | ||
 | ||
[code-server](https://github.com/coder/coder) is our supported method of running VS Code in the web browser. A simple way to install code-server in Linux/MacOS workspaces is via the Coder agent in your template: | ||
```sh | ||
# edit your template | ||
cd your-template/ | ||
vim main.tf | ||
``` | ||
```hcl | ||
resource "coder_agent" "dev" { | ||
arch = "amd64" | ||
os = "linux" | ||
startup_script = <<EOF | ||
#!/bin/sh | ||
# install and start code-server | ||
curl -fsSL https://code-server.dev/install.sh | sh | ||
code-server --auth none --port 13337 | ||
EOF | ||
} | ||
``` | ||
For advanced use, we recommend installing code-server in your VM snapshot or container image. Here's a Dockerfile which leverages some special [code-server features](https://coder.com/docs/code-server/): | ||
```Dockerfile | ||
FROM codercom/enterprise-base:ubuntu | ||
# install a specific code-server version | ||
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.3.0 | ||
# pre-install versions | ||
RUN code-server --install-extension eamodio.gitlens | ||
# directly start code-server with the agent's startup_script (see above), | ||
# or use a proccess manager like supervisord | ||
``` | ||
You'll also need to specify a `coder_app` resource related to the agent. This is how code-server is displayed on the workspace page. | ||
```hcl | ||
resource "coder_app" "code-server" { | ||
agent_id = coder_agent.dev.id | ||
name = "VS Code" | ||
url = "http://localhost:13337/?folder=/home/coder" | ||
icon = "/code.svg" | ||
} | ||
``` | ||
## VNC Desktop | ||
 | ||
You may want a full desktop environment to develop with/preview specialized software. | ||
Workspace requirements: | ||
- VNC server (e.g. [tigervnc](https://tigervnc.org/)) | ||
- VNC client (e.g. [novnc](https://novnc.com/info.html)) | ||
Installation instructions will vary depending on your workspace's operating system, platform, and build system. | ||
> Coder-provided VNC clients are on the roadmap ([#2106](https://github.com/coder/coder/issues/2106)). | ||
As a starting point, see the [desktop-container](https://github.com/bpmct/coder-templates/tree/main/desktop-container) community template. It builds & provisions a Dockerized workspace with the following software: | ||
- Ubuntu 20.04 | ||
- TigerVNC server | ||
- noVNC client | ||
- XFCE Desktop | ||
## JetBrains Projector | ||
[JetBrains Projector](https://jetbrains.github.io/projector-client/mkdocs/latest/) is a JetBrains Incubator project which renders JetBrains IDEs in the web browser. | ||
 | ||
> It is common to see latency and performance issues with Projector. We recommend using [Jetbrains Gateway](https://youtrack.jetbrains.com/issues/GTW) whenever possible (also no Template edits required!) | ||
Workspace requirements: | ||
- JetBrains server | ||
- IDE (e.g IntelliJ IDEA, pyCharm) | ||
Installation instructions will vary depending on your workspace's operating system, platform, and build system. | ||
As a starting point, see the [jetbrains-container](https://github.com/bpmct/coder-templates/tree/main/jetbrains-container) community template. It builds & provisions a Dockerized workspaces for the following IDEs: | ||
- CLion | ||
- pyCharm | ||
- DataGrip | ||
- IntelliJ IDEA Community | ||
- IntelliJ IDEA Ultimate | ||
- PhpStorm | ||
- pyCharm Community | ||
- PyCharm Professional | ||
- Rider | ||
- Rubymine | ||
- WebStorm | ||
- ➕ code-server (just in case!) | ||
## Custom IDEs and applications | ||
As long as the process is running on the specified port inside your resource, you support any application. | ||
```sh | ||
# edit your template | ||
cd your-template/ | ||
vim main.tf | ||
``` | ||
```hcl | ||
resource "coder_app" "portainer" { | ||
agent_id = coder_agent.dev.id | ||
name = "portainer" | ||
icon = "https://simpleicons.org/icons/portainer.svg" | ||
url = "http://localhost:8000" | ||
relative_path = true | ||
} | ||
``` | ||
> The full `coder_app` schema is described in the | ||
> [Terraform provider](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app). | ||
```sh | ||
# update your template | ||
coder templates update your-template | ||
``` |
Binary file addeddocs/images/code-server-ide.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/custom-app.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/ide-row.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/jetbrains-projector.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/vnc-desktop.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 17 additions & 9 deletionsdocs/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.