Skip to content
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

docs: 1. fix closing ) on projector examples 2.update jupyter section… #4920

Merged
merged 1 commit into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 10 additions & 15 deletions docs/ides/web-ides.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ projector:

- PyCharm
([Docker](https://github.com/sharkymark/v2-templates/tree/main/docker-with-pycharm),
[Kubernetes](https://github.com/sharkymark/v2-templates/tree/main/multi-projector-pycharm)
[Kubernetes](https://github.com/sharkymark/v2-templates/tree/main/multi-projector-pycharm))

> You need to have a valid `~/.kube/config` on your Coder host and a namespace
> on a Kubernetes cluster to use the Kubernetes pod template examples.
Expand All @@ -153,39 +153,34 @@ Configure your agent and `coder_app` like so to use Jupyter:
```hcl
data "coder_workspace" "me" {}

## The name of the app must always be equal to the "/apps/<name>"
## string in the base_url. This caveat is unique to Jupyter.

locals {
jupyter_base_path = "/@${data.coder_workspace.me.owner}/${data.coder_workspace.me.name}/apps/JupyterLab/"
}

resource "coder_agent" "coder" {
os = "linux"
arch = "amd64"
dir = "/home/coder"
startup_script = <<-EOF
pip3 install jupyterlab
$HOME/.local/bin/jupyter lab --ServerApp.base_url=${local.jupyter_base_path} --ServerApp.token='' --ip='*'
$HOME/.local/bin/jupyter lab --ServerApp.token='' --ip='*'
EOF
}

resource "coder_app" "jupyter" {
agent_id = coder_agent.coder.id
slug = "jupyter"
display_name = "JupyterLab"
url = "http://localhost:8888${local.jupyter_base_path}"
url = "http://localhost:8888"
icon = "/icon/jupyter.svg"
share = "owner"
subdomain = true

healthcheck {
url = "http://localhost:8888${local.jupyter_base_path}"
url = "http://localhost:8888/healthz"
interval = 5
threshold = 10
}
}
```

![JupyterLab in Coder](../images/jupyterlab-port-forward.png)
![JupyterLab in Coder](../images/jupyter-on-docker.png)


### RStudio
Expand Down Expand Up @@ -218,7 +213,7 @@ resource "coder_app" "rstudio" {
url = "http://localhost:8787/healthz"
interval = 3
threshold = 10
}
}
}
```

Expand Down Expand Up @@ -254,7 +249,7 @@ resource "coder_app" "airflow" {
url = "http://localhost:8080/healthz"
interval = 10
threshold = 60
}
}
}
```

Expand All @@ -265,4 +260,4 @@ resource "coder_app" "airflow" {
If you prefer to run web IDEs in localhost, you can port forward using
[SSH](../ides.md#ssh) or the Coder CLI `port-forward` sub-command. Some web IDEs
may not support URL base path adjustment so port forwarding is the only
approach.
approach.
Binary file added docs/images/jupyter-on-docker.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/jupyterlab-port-forward.png
Binary file not shown.