Skip to content

BETA - Batch Connect - OSC Code Server

License

Notifications You must be signed in to change notification settings

chenggroup/bc_osc_codeserver

 
 

Repository files navigation

Batch Connect - OSC Code Server

GitHub Release GitHub License

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.

Prerequisites

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):

Install

  1. 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>
  2. 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
  3. 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
  4. 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" \
  5. 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.

Update

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.

Known Issues

  • In-app installation of extensions does not work
  • The authentication provided by code-server is unencrypted

Contributing

  1. Fork it ( https://github.com/OSC/bc_osc_codeserver/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

BETA - Batch Connect - OSC Code Server

https://osc.github.io/Open-OnDemand/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 64.3%
  • Shell 35.7%