Skip to content

Commit

Permalink
docs: 1. fix closing ) on projector examples 2.update jupyter section…
Browse files Browse the repository at this point in the history
… for slug config and removal of owner and workspace baseURL (#4920)
  • Loading branch information
sharkymark committed Nov 7, 2022
1 parent 641aacf commit 1545979
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions docs/ides/web-ides.md
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.

0 comments on commit 1545979

Please sign in to comment.