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

Browser package for Blueprint #74

Open
marcdumais-work opened this issue Apr 15, 2021 · 12 comments
Open

Browser package for Blueprint #74

marcdumais-work opened this issue Apr 15, 2021 · 12 comments
Assignees
Labels
enhancement new features or requests
Milestone

Comments

@marcdumais-work
Copy link
Contributor

marcdumais-work commented Apr 15, 2021

Feature Description:

Now that we have packages for multiple operating systems, for that Electron version of Blueprint, it would be desirable to also have some sort of packaged browser version of Blueprint.

This could be easily consumed, e.g. in Docker images, instead of attempting to build the contained Theia app from scratch, each time, as has been the norm so far. We think it will lower the bar considerably, for creating Theia-based containerised vanilla IDE appliances (where no customisation of the app is required).

As a first step, we'd be happy to have a single type of package, whatever is easiest, so long as we can use it in a Docker image we intend to create in this repo.

@marcdumais-work marcdumais-work added the enhancement new features or requests label Apr 15, 2021
@marcdumais-work marcdumais-work added this to the Q2 2021 milestone Apr 15, 2021
@paul-marechal paul-marechal self-assigned this Apr 20, 2021
@paul-marechal
Copy link
Member

Note that I'm currently investigating building such a browser app as well as its packaging into an executable format.

This is in the investigation state and I'm making very slow progress on this. I'm basically trying tools such as pkg to turn a Node app into an exe, bundling the backend code using Webpack to minimize the build size, etc... Learning as I go, so it is not clear if it will actually work for Theia since the project is not trivial to bundle.

I will post my conclusion once I reach one on this task.

@brianking
Copy link

A nice first use-case or test bed for this would be if we stood up our own hosted version of Theia. However, we would need someone to contribute infrastructure for hosting it.

For current adopters, what is the current way for them to integrate Theia? Is the idea with this to make their job easier?

@paul-marechal
Copy link
Member

paul-marechal commented Apr 20, 2021

The way I see it, Theia is an appliance to get a window into a development environment. With that in mind, I was thinking that people using Theia Blueprint in the browser would define their development environment as a Dockerfile of some sort, and lastly drop in and install Theia in order to work inside it.

I think Che also focuses on the "development container" approach where Theia runs in one container dedicated for it, and when you open terminals to run your project it is actually running in the container running your development environment. While it is nice it is more complex to setup.

So the idea I'm investigating would make people's job easier in the sense that they'll be able to focus on building their containerized development environment, and have Theia/Blueprint at the ready easily deployable inside it.

For current adopters, what is the current way for them to integrate Theia?

Create images and build Theia for those themselves, usually by building directly into the image.

Is the idea with this to make their job easier?

Yes, but keep in mind that this is just an investigation so far.

[...] if we stood up our own hosted version of Theia.

I am having a hard time imagining what that would look like. It would be the most useful if people can define/pick their development environment and get to work inside it using Theia. But that's what workspace servers like Che are doing, so running a Che workspace server instance deploying Blueprint?

@marcdumais-work
Copy link
Contributor Author

if we stood up our own hosted version of Theia.

Providing a Docker image that bundles Blueprint is a step towards that direction, but like Paul says, there are important required components/services that are not part of Blueprint or Theia (e.g. authentication, managing development containers, ...). If we wanted to go in that direction, I would suggest the Foundation investigate using Che, which could probably have a version of Blueprint, adapted to run in its environment.

@paul-marechal
Copy link
Member

Progress update: I managed to package a browser version of Blueprint.

My changes are on the following branch: https://github.com/eclipse-theia/theia-blueprint/tree/mp/browser-package

See theia-blueprint-linux-prototype-1.tar.gz for a prototype binary made on Ubuntu 16.04.

Doing this work revealed a few areas that could be improved in Theia, see https://github.com/eclipse-theia/theia-blueprint/blob/mp/browser-package/applications/browser/README.md#theia-blueprint-web, I'll open issues on the relevant repositories and see if I can come up with fixes.

@paul-marechal
Copy link
Member

Note that an alternative to packaging could be to only bundle the backend using Webpack, and expecting people to run the minimized scripts using their own installed Node version (which would have to be compatible with our bundle).

The bundle size is roughly ~20MB IIRC, compared to ~200MB once packaged as executable.

The executable version is that much bigger because of the embedded Node runtime.

@jfaltermeier
Copy link
Contributor

@paul-marechal @marcdumais-work Currently this is part of the Beta 1 milestone. We would plan to announce the move from Alpha to Beta end of June. Shall we move this ticket to the next milestone?

@paul-marechal
Copy link
Member

@jfaltermeier sounds good.

@jfaltermeier jfaltermeier modified the milestones: Beta 1, Beta 2 Jun 24, 2021
@jfaltermeier jfaltermeier modified the milestones: Beta 2, Beta 3 Sep 21, 2021
@czadikem
Copy link

This still being worked on?

@koegel
Copy link

koegel commented Mar 7, 2023

Just for completeness, this question was answered here, where it was also asked: #75 (comment)

@shuaiyy
Copy link

shuaiyy commented Jun 28, 2023

This is very helpful for our production environment:

  1. In CI, the image building can be accelerated by using ADD http://xxx/thiea-ide.tar.gz.
  2. for most case with-no nodejs/theia-ide pre-installed, containers can mount the host directory or download from remote storage when they need the pakage.

@shuaiyy
Copy link

shuaiyy commented Jun 28, 2023

hi @paul-marechal , Your contributions to the browser-package are highly valuable and significant,I want to know if it will work for the latest version.

I want to build a browser package with Node.js runtime, but I'm not familiar with Node.js. I've read thisGenerate webpack config for backend bundling
#12412 and mp/browser-package , but I still don't know how to get started.

Can you provide some suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features or requests
Projects
None yet
Development

No branches or pull requests

7 participants