-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Theia remote plug-in runtime in sidecar container improvement #13387
Comments
@benoitf WDYT? |
yes I think steps are:
|
Seems, done by @tolusha eclipse-che/che-theia#254
I complete investigation. pkg - doesn't work for our remote-plugin code, because our code uses getMac dependency(like transitive dependency). pkg unable to resolve such kind of libs, see more vercel/pkg#519 node-packer - remote-plugin-endpoint binary compiled with help this tool doesn't work for alpine images at all (pmq20/node-packer#127), and node-packer executable binary doesn't work under alpine too. On the github repo we can see that source code contains node source code with version 8.3.0, but we need node 10. appImage - main idea - package remote-plugin with help electron and generate with help electron-builder lib binary in the universal linux binary format - AppImage. But such binaries doesn't work in the docker containers, because appImage uses fuse filesystem, which works for docker containers only with privilege mode. Also fuse filesystem need fuse filesystem libs - I could not find any base linux images where are these dependencies are pre-installed. nexe - I generated binary with platform flag alpine, but this binary works for all another containers which I tested. I tested this binary with images:
|
All-in-one binary branch https://github.com/eclipse/che-theia/compare/remoteBinary |
Binary size 136.8Mb |
Hello, @davidfestal Did you mean, that we can use plugin-broker to serve remote-plugin-endpoint binary, and Eclipse CHE master could create volume for remote plugin containers and copy binary inside volume? |
Well, initially my general idea was that we could provide such binaries (or any additional standalone files) in very lightweight containers that would contain:
Then it would be added as an Such lightweight container images could be either created at build time (for the |
@davidfestal Do you have a plan to implement your initial idea or this part of task should be done by ide2 team? |
In fact it seems to me that it would be sufficient to simply:
All the rest of the work would be done in the plugin broker. However, if I find some time I might be able to prepare the plugin-broker part of this work and test it with the Che Workspace CRD Operator POC. |
@l0rd Should I open a separate issue for this ? |
@davidfestal ok to create a separate issue. But I have some comments: About the build of the init-container👍 to have an init container that copies an all-in-one binary in a volume but 👎 to build the init container image during the workspace bootstrap About the
|
Great.
OK. As soon as we have the
That was my idea.
So will the user have to ensure consistency manually ? or couldn't we use, by default, an image name based on the name of the docker image of the
Sure.
I don't see how this is related to my proposal. This is already the case and totally depends on what the |
Current implementation state To launch remote plugins we have node application https://github.com/eclipse/che-theia/tree/master/extensions/eclipse-che-theia-plugin-remote. For this application we had separated image Proposed enhancements: I proposed to define in the plugin meta.yaml PluginPatcher object: type PluginPatcher struct {
// List init containers
InitContainers []Container `json:"initContainers" yaml:"initContainers"`
// List plugin types matched to PluginPatcher
PluginTypeMatcher []string `json:"pluginTypeMatcher" yaml:"pluginTypeMatcher"`
// Command to patch original plugin container command
PluginContainerCommand []string `json:"pluginContainerCommand" yaml:"pluginContainerCommand"`
// Argument to patch original plugin container arguments
PluginContainerArgs []string `json:"pluginContainerArgs" yaml:"pluginContainerArgs"`
} PluginPatcher has initContainers. type ChePlugin struct {
…
PluginPatcher PluginPatcher
} Main idea: we are using PluginPatcher with editor ChePlugin. Che server take a look on the list workspace plugins, find editor plugin, get PluginPatcher. Than che-server get list of the init containers from plugin patcher and start them on workspace start. After init container we have copied remote binary in the volume #che-theia meta.yaml definitiion
apiVersion: v3
publisher: eclipse
name: che-theia
...
spec:
endpoints:
....
pluginPatcher:
pluginTypeMatcher: ["vs code extension", "theia plugin"]
pluginContainerCommand: ["sh", "-c"]
pluginContainerArgs: ["/plugins/remote-launcher/entrypoint.sh"]
initContainers:
- name: theia-remote-plugin-launcher
image: eclipse/che-theia-endpoint-runtime:next
initContainer: true
command: ['cp']
args: ['-rf', '/remote-plugin-launcher', '/plugins/remote-launcher']
volumes:
- mountPath: "/plugins"
name: plugins
containers:
- name: theia-ide
image: "docker.io/eclipse/che-theia:next"
env:
....
volumes:
...
ports:
...
... @sleshchenko @mario @evidolob @davidfestal @benoitf @amisevsk what do you think? |
Third iteration(Add an ability to forcibly mark a volume as ephemeral persistVolume:false):
Test devfile: |
clearly still ongoing so slip to 7.3.0 |
Detected regression: #14833 Working on fix. |
Description
Currently we have base image for remote plugin. So all remote plugin images should inherit it, which is not convenient by it self, and heavily increase remote plugin image build time. Also we have some problems when Thiea IDE and remote plugin runtime has different version(when some one doesn't update remote plugin image) which leads to very strange and difficult to detect bugs.
We can improve that with two options:
The text was updated successfully, but these errors were encountered: