An improved file viewer / editor for OSC OnDemand that launches a Code Server within an Owens batch job. Code Server leverages VSCode as its editor.
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 purge
andmodule 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/cdr/code-server/releases
-
Use Git to clone this app and checkout the desired branch/version you want to use and place this wherever you store batch connect apps (
/var/www/ood/apps/sys
or~/ondemand/dev
):scl enable git29 -- git clone <repo> cd <dir> scl enable git29 -- git checkout <tag/branch>
-
Deploy code-server on your systems.
# replace URL with latest release from code-server wget https://github.com/cdr/code-server/releases/download/3.2.0/code-server-3.2.0-linux-x86_64.tar.gz tar -xzf code-server-3.2.0-linux-x86_64.tar.gz
-
You will notice code-server is an executable inside that directory and can get the full path:
$ readlink -f code-server-3.2.0-linux-x86_64.tar.gz /users/PZS0562/efranz/code-server-3.2.0-linux-x86_64.tar.gz
-
Update the path to the code-server binary in the script https://github.com/OSC/bc_osc_codeserver/blob/3082790ee69c82fe6fe757074da7d8d18c7d7e3d/template/script.sh.erb#L27:
# An arbitrary path... - /fs/project/PZS0714/mrodgers/bin/code-server-2.1523-vsc1.38.1 \ + /users/PZS0562/efranz/code-server-3.2.0-linux-x86_64/code-server \ --auth=password \ --port="$port" \
-
Update form.yml to use the correct cluster, and any other changes as necessary to form.yml or submit.yml that is appropriate for your cluster.
To update the app you would:
cd <dir>
scl enable git29 -- git fetch
scl enable git29 -- git checkout <tag/branch>
Again, you do not need to restart the app as it isn't a Passenger app.
- In-app installation of extensions does not work
- The authentication provided by code-server is unencrypted
- 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