An Open OnDemand Batch Connect app that launches Code Server as an interactive web-based session on OSC HPC clusters. Code Server provides a full VS Code editing experience running on a compute node and accessible through a browser.
This app uses the Batch Connect basic template with Slurm and supports
clusters: Ascend and Pitzer.
- Upstream project: Code Server / VS Code
- Batch Connect template:
basic - Scheduler: Slurm
- Full VS Code editor experience in the browser via Code Server
- Multi-cluster support (Ascend, Pitzer)
- Working directory selector for the Code Server session
- Dynamic Code Server module selection via
auto_modules_app_code_server - Password-authenticated sessions
- C/C++ extension support with IntelliSense database on local filesystem
- Telemetry disabled by default
- Module-based software loading via Lmod (
project/ondemand,app_code_server/)
This Batch Connect app requires the following software be installed on the compute nodes that the batch job is intended to run on (NOT the OnDemand node):
- Lmod
6.0.1+ or any other
module purgeandmodule load <modules>based CLI used to load appropriate environments within the batch job before launching Code Server - Code Server 2.x+ available from GitHub: https://github.com/coder/code-server/releases
- Tested to work with the latest version of Open OnDemand
- Slurm scheduler
cd /var/www/ood/apps/sys
git clone https://github.com/OSC/bc_osc_codeserver.git
cd bc_osc_codeserver
# Pin to a release (recommended)
git checkout v0.13.0No restart is needed -- Batch Connect apps are not Passenger apps and are detected automatically.
If you are not using the app_code_server/ module, you can deploy the
code-server binary manually:
# Replace URL with latest release from code-server
wget https://github.com/coder/code-server/releases/download/<version>/code-server-<version>-linux-amd64.tar.gz
tar -xzf code-server-<version>-linux-amd64.tar.gzEdit form.yml and update these values for your cluster:
| Attribute | OSC Default | Change to |
|---|---|---|
cluster |
ascend, pitzer |
Your cluster name(s) |
auto_modules_app_code_server |
(dynamic) | Code Server module name(s) on your system |
In script.sh.erb, the app loads modules with:
module load project/ondemand app_code_server/<version>
Ensure equivalent modules are available on your system, or update the script to point to your code-server binary path.
cd /var/www/ood/apps/sys/bc_osc_codeserver
git fetch
git checkout <tag>No restart is needed.
| Attribute | Widget | Description | Default |
|---|---|---|---|
cluster |
select | Target cluster ID(s) | ascend, pitzer |
bc_num_hours |
number | Maximum wall time (hours) | 1 |
working_dir |
path_selector | Working directory for the Code Server session | $HOME |
auto_modules_app_code_server |
select | Code Server module version to load (auto-detected) | (dynamic) |
- In-app installation of extensions does not work
- The authentication provided by code-server is unencrypted
The app may need more time to start. Increase the connection timeout or check that the compute node can open the required port.
| Site | OOD Version | Scheduler | Status |
|---|---|---|---|
| Ohio Supercomputer Center | 4.2.2 | Slurm | Production |
- Fork it ( https://github.com/OSC/bc_osc_codeserver/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
For bugs or feature requests, open an issue.
- Code Server -- the application launched by this app
- VS Code -- the editor Code Server is based on
- code-server GitHub releases -- binary releases of Code Server
- Open OnDemand -- the HPC portal framework
- OOD Batch Connect app development docs
- Changelog -- release history for this app
- Documentation, website content, and logo is licensed under CC-BY-4.0
- Code is licensed under GPL-3.0 (See LICENSE.xt)
This app is built on Open OnDemand, developed and maintained by the Ohio Supercomputer Center (OSC).
Open OnDemand is supported by the National Science Foundation under awards NSF SI2-SSE-1534949 and NSF CSSI-Frameworks-1835725.
