Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom IDEs provided through docker images #2419

Open
meysholdt opened this issue Dec 4, 2020 · 49 comments
Open

Support custom IDEs provided through docker images #2419

meysholdt opened this issue Dec 4, 2020 · 49 comments
Labels
aspect: product integration For any 3rd party integration requests feature: documentation meta: never-stale This issue can never become stale roadmap item: gitpod code https://bit.ly/3oqjuOn team: IDE

Comments

@meysholdt
Copy link
Member

Since we now have the foundation in place to install a custom IDE in Gitpod using a Docker Image, It would be great to have a an example and docs that explain the minimal requirements Gitpod imposes on such an image.

@csweichel
Copy link
Contributor

A rough, and still changing list of requirements we have towards IDE images:

  • all static assets that we need to serve before the workspace pod is up and running MUST be in the very first layer
  • there must be an executable file in /ide/startup.sh that's executed to start the IDE itself. This can be changed in the IDE supervisor config (see below).
  • no system-folder must be overwritten, e.g. WORKDIR /usr/bin possibly creates an empty /usr/bin directory which would shadow the actual /usr/bin in the workspace.

IDE supervisor config

IDEs can provide some configuration to customise supervisor's behaviour. This file is expected in /ide/supervisor-ide-config.json and may look like this:

{
  "entrypoint": "/ide/startup.sh",
  "readinessProbe": {
    "type": "http",
    "http": {
      "path": "static/manifest.json"
    }
  }
}

The entrypoint configures the executable that get's run when starting the IDE.
The readinessProbe configures a probe that determines when the IDE is actually running. Right now we only support http probes which attempt a GET http://localhost:<ide-port>/<path> every five seconds. If that request returns 200 OK we consider the IDE running. If there's no probe configured, we consider the IDE running right after it got started (i.e. the entrypoint was executed).

Environment Variables coming from Gitpod

IDEs are expected to run on a particular port, specifically the one indicated on the GITPOD_THEIA_PORT environment variable. Expect this name to change in the near future.

Environment Variables coming from the IDE image

IDE images can contribute environment variables to a workspace.
The details are work in progress.

@csweichel
Copy link
Contributor

We might want to introduce a linter for images that can verify those requirements. In its first iteration that linter would just be a development tool, but could conceivably be integrated into the system as a whole.

Also, we should look at ways for finding good defaults to relax those constraints over time.

@akosyakov
Copy link
Member

IDE should have index.html and integrate supervisor as described in

/**
* <script type="text/javascript" src="/_supervisor/frontend/main.js" charset="utf-8"></script> should be inserted to index.html as first body script,
* all other IDE scripts should go afterwards, head element should not have scripts
*/
is another requirement.

@csweichel
Copy link
Contributor

csweichel commented Jan 29, 2021

First step would to be produce a working image for another IDE/editor, e.g. vim or https://github.com/JetBrains/projector-docker

@svenefftinge
Copy link
Member

Let's do Theia as the first step.

@svenefftinge svenefftinge changed the title Explain how to bring a custom IDE Support custom IDEs provided through docker images Feb 3, 2021
@csweichel csweichel modified the milestones: February 2021, [do-not-add-issues] March 2021 Mar 1, 2021
@svenefftinge svenefftinge removed this from the March 2021 milestone Mar 29, 2021
@svenefftinge
Copy link
Member

To create a great user experience we will need to provide a rich integration with Gitpod for accessing services such as ports, env vars, tokens etcs. We should investigate if we really want to go down the path of switching the primary IDE or rather let users start an additional IDE from within their workspaces. That way they could still use VS Code to interact with Gitpod and use A projector IDE or Jupyter Notebook for the coding task.

@yyoncho
Copy link

yyoncho commented May 24, 2021

Is there a minimal example of how to create custom IDE image? I tried to create such using python -m http.server at https://github.com/yyoncho/lsp-gitpod but still, VScode pops up.

@dunnry
Copy link

dunnry commented Dec 3, 2021

Just commenting that we would be very interested in supporting custom IDEs in Gitpod.

@stale
Copy link

stale bot commented Mar 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 6, 2022
@stale stale bot closed this as completed Mar 17, 2022
@loujaybee loujaybee added meta: never-stale This issue can never become stale and removed meta: stale This issue/PR is stale and will be closed soon labels May 11, 2022
@loujaybee
Copy link
Member

Whilst it seems very unlikely this issue will be picked up in the short-term, I'm keen to keep the issue open, to hear of other use-cases from other communities who might want to leverage this type of functionality.

@axonasif
Copy link
Member

axonasif commented Jun 3, 2022

It might make more sense for SSH users.

@inlann
Copy link

inlann commented Jun 7, 2022

I think there will be more and more specialized IDEs for different industries in the future, and cloud-based versions will be the way of the future. If Gitpod can turn the IDE access into an API, I believe more IDE companies will do business with Gitpod in the future 😄

@loujaybee loujaybee added the aspect: product integration For any 3rd party integration requests label Dec 7, 2022
@loujaybee
Copy link
Member

Re-opening as we think about the longer term possibilities of general integrations around IDEs. No guarentee of significant movement on this issue in the short term, but would like to bring again more visibility to this issue.

@loujaybee loujaybee reopened this Dec 7, 2022
@gengjiawen
Copy link
Contributor

gengjiawen commented Dec 8, 2022

Is it an options to config IDE in .gitpod.yml ?

Ref: #3274 (comment)

@erikmd
Copy link

erikmd commented May 28, 2023

Dear Gitpod maintainers,

I'm very interested to ask: what is the status of the support for custom IDEs and/or for Emacs in particular?

Just to complement my question:

  • I tested https://github.com/emacs-lsp/lsp-gitpod successfully: it is really nice! — albeit the current requirement that "a VScode tab has to be open first and kept open" is a major limitation…
  • if ever you'd remark that Emacs is not as popular as VScode or JetBrains IDEs, it still happens it is the most used IDE in the OCaml community for instance (cf. e.g. the OCaml User Survey 2022)

Thanks for your time!

@axonasif
Copy link
Member

axonasif commented May 30, 2023

Hi @erikmd,

I think emacs is very usable with Gitpod at the current state. You could configure your Emacs setup through dotfiles installation script and then use SSH or xterm.js based browser terminal (private beta).

I'm personally not very familiar with Emacs but I think I've a decent neovim setup through my dotfiles installer, it also has an option for auto installing emacs but probably incomplete.

@erikmd
Copy link

erikmd commented May 30, 2023

Hi @axonasif, thanks a lot for your quick reply!

I think emacs is very usable with Gitpod at the current state.

AFAICT, yes it works, but there is one major usability issue, as documented here:

https://github.com/emacs-lsp/lsp-gitpod#limitations

VScode tab has to be kept open and you have to click every 30 minute on it to keep the session open. This issue will be sorted out with gitpod team.

E.g. if one browses

https://gitpod.io/#ORG=emacs-lsp,PROJECT=demo-projects,PROFILE=spacemacs/https://github.com/emacs-lsp/lsp-gitpod

we get a VScode window (while we'd really like to just get an Emacs tab, out-of-the-box).

Though, your reply makes me doubt… Do you think the limitation above mentioned in the emacs-lsp project has already been addressed? so this would just be a documentation issue 🙂

Thanks!

@axonasif
Copy link
Member

@erikmd I wasn't talking about https://github.com/emacs-lsp/lsp-gitpod but the currently available Gitpod features that you could utilize to run emacs from a terminal emulator over SSH or this.

Screenshot 2023-05-30 at 10 43 47 PM

@erikmd
Copy link

erikmd commented May 30, 2023

@axonasif OK I see! thanks for this information 😊

Indeed, vanilla GNU Emacs and spacemacs provide both GUI and TTY front-ends,
but a TTY spacemacs that works out of the box in GitPod is already a very good news!

@loujaybee
Copy link
Member

loujaybee commented May 31, 2023

what is the status of the support for custom IDEs

@erikmd if you sign up at gitpod.io/labs we can sign you up for the private beta for the terminal based editor in the browser that @axonasif mentioned, it would be great to get your feedback on how/if that works for you. Regarding the emacs lsp project, we have also been experimenting with custom IDE support, which could potentially be used in this context. We've been looking for more concrete examples that might use this type of feature, so that project would also be a good one for us to experiment with.

@loujaybee loujaybee mentioned this issue May 31, 2023
13 tasks
@erikmd
Copy link

erikmd commented Jun 2, 2023

@loujaybee OK, thanks for your advice and feedback!

@erikmd you sign up at gitpod.io/labs

Done! Looking forward to being able to test all this soon 🙂

@erikmd
Copy link

erikmd commented Jun 18, 2023

Hi @loujaybee ! after I signed up at the URL you mentioned, is there any further step to do so that I'll be able to select a browser based terminal setting in https://gitpod.io/new ? Thanks for your time!

(FYI, my email set in https://gitpod.io/user/account is [email protected])

@loujaybee
Copy link
Member

Hey @erikmd, no further steps, you should have access now, can you retry?

@erikmd
Copy link

erikmd commented Jun 20, 2023

Indeed, @loujaybee, thanks !

BTW I posted some feedback on #17724 (comment)

@erikmd
Copy link

erikmd commented Jul 14, 2023

@erikmd I wasn't talking about https://github.com/emacs-lsp/lsp-gitpod but the currently available Gitpod features that you could utilize to run emacs from a terminal emulator over SSH or this.
Screenshot 2023-05-30 at 10 43 47 PM

@axonasif I was able to test emacs in a Browser Terminal workspace,
but out of curiosity, is the spacemacs-based .gitpod.yml you used in the above screenshot available online?

@axonasif
Copy link
Member

is the spacemacs-based .gitpod.yml you used in the above screenshot available online?

No, I'm using a dotfiles installation script to install it on all workspaces automatically (also mentioned in my initial message 😉 )

@erikmd
Copy link

erikmd commented Jul 14, 2023

Thanks! 👍 for the record, I needed to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect: product integration For any 3rd party integration requests feature: documentation meta: never-stale This issue can never become stale roadmap item: gitpod code https://bit.ly/3oqjuOn team: IDE
Projects
None yet
Development

No branches or pull requests