GithubHelp home page GithubHelp logo

osc / bc_osc_codeserver Goto Github PK

View Code? Open in Web Editor NEW
16.0 13.0 19.0 70.42 MB

BETA - Batch Connect - OSC Code Server

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

License: GNU General Public License v3.0

HTML 63.49% Shell 36.51%

bc_osc_codeserver's Introduction

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

    /fs/project/PZS0714/mrodgers/bin/code-server-2.1523-vsc1.38.1 \
    :

     # 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

bc_osc_codeserver's People

Contributors

ericfranz avatar hazelgrant avatar johrstrom avatar jose-d avatar msquee avatar oglopf avatar treydock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bc_osc_codeserver's Issues

Fix env setup to make suitable for production release

Currently, there is extra code in the script to support having a symlink in bin of the app root to point to code server, in addition to an env var pointing to the code server binary. These should be removed.

Instead, a single env var to the code server binary should be set (setting with the default value trick if it isn't already set), and a comment above indicating that this needs to change based on where code server is deployed.

In may OnDemand depoyments the app is deployed on the local disk of the web node, unavailable to the compute nodes.

404 not found issue

Hello

I was testing code-server on our OOD but got 404 not found error.

Some reason the redirect URL has "rnode/udc-aw37-23d/26361/" twice like this;
https://rivanna-portal-dev.hpc.virginia.edu/rnode/udc-aw37-23d/26361/rnode/udc-aw37-23d/26361/

If I manually modify the URL to https://rivanna-portal-dev.hpc.virginia.edu/rnode/udc-aw37-23d/26361/, I can see VS page.
Any idea how to solve this issue?

Didn't modify the "view.html.erb"

<form action="/rnode/<%= host %>/<%= port %>/login" method="post" target="_blank">
  <input type="hidden" name="password" value="<%= password %>">
  <button class="btn btn-primary" type="submit">
    <i class="fa fa-cogs"></i> Connect to Code Server
  </button>
</form>

When I click an existing session, it went to /login but got a white page. removing "login" from URL showed VS page.

Best,
Gisoo

udpate for codeserver 3.9.3

We have this module available, so let's update the app to be able to use it. Note that the form should now have a version dropdown so folks can keep using the old version.

app_code_server/3.9.3

Update Readme

Context

Looking at the install instructions for this app one sees scl being used, but I'm not sure that is still the current way this app is being used.

Questions

  • Should this be updated to use lmod or rpm commands instead?
  • Do we use scl still or do other sites?
  • Should we just have different markdown headings to handle which method a sys-admin is deploying with?

OSC CodeServer with Slurm

Hello,

Is it possible for us to add osc codeserver while having ondemand on Slurm workload manager ?

App opens incorrect URL

Hi,

When I click the blue Connect to VS Code button, the app tries to open /rnode/<%= host %>/<%= port %>/rnode/<%= host %>/<%= port %>.

If I rewrite the URL in the browser to /rnode/<%= host %>/<%= port %>?folder=/home/btsherid, then VS Code launches and seems to work fine.

I'm assuming the extra part of the URL is coming from the code of this app but I'm not sure where that is getting appended from. Any help figuring this out would be appreciated.

Thanks,
Brendan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.