-
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
Build an offline version of the Devfile registry image #14733
Comments
After discussion in standup today, and discussion with @nickboldt prior, I'd like to propose an alternate solution for this issue: Difficulties with the current solutionThe required steps to implementing cached project zip files would be:
Assumptions
ProposalInstead of building a registry that has project zips cached locally (which then theia pulls and unzips to start the workspace), instead the "offline" build of the devfile registry removes sample projects from workspaces. This allows users to quickly start up workspaces with the tooling they expect, and provides a base into which they can add a project that is relevant to them. Once someone is up and running with Che, with their own project-specific devfiles ready, the devfiles in the registry become less and less useful. @l0rd @nickboldt WDYT? |
If you remove the projects (which I like as it cleans up a lot of the problems listed above), could you include a README that loads on startup of the workspace telling a user where they might find a sample project, but that they'd have to import it from zip to get around their firewall restrictions? Note that "an offline devfile registry" won't include any of the runtime images... so there's still an Ops task to fetch the containers and load them into an airgapped customer's internal registry. But +1 for removing samples, if we can't have the workspace load and then unpack a zip into /projects/ to create an offline sample project. Can't a devfile invoke shell commands on startup? Could you not |
Samples are important even in It's worth mentioning that this devfile registry image containing the source code may become the default one: it's faster, it works in offline environments and we can safely update the che-sample github repositories without worrying to break an old version of Che. @amisevsk if the problem is retrieving the internal hostname of the plugin registry from the entrypoint why don't you use For the support of zip files for projects @akurinnoy has just merged eclipse-che/che-theia#442 that should solve your problem. |
I can write the changes no problem, I just don't know how valuable it actually is. I don't think anybody is going to do actual work from the sample projects -- whether a devfile has a project or not, the user will have to add their project and update all commands. I see the sample devfiles as more of a starting point than something that would be used unmodified. Regarding the sample projects themselves, many of the projects in devfiles currently do not contain a Projects that do not have an license I see:
The issue isn't the internal hostname, the issue is that the registry has to update the devfiles to point to its public route/ingress at startup. AFAIK the only way to do that would be to set an env var on the deployment, but this would require us to
This would require some work on chectl, and would not be supported in raw templates. |
To add to the above, many sample projects won't be buildable unless we also bundle their dependencies. Even if we can import the spring-boot sample from the devfile registry, at the very least maven will need to be configured to point to your internal maven repository (assuming the dependencies are present there). |
That's a good point @amisevsk but we are not including the samples for the offline scenario only. That's supposed to become the default for the online scenario as well for the reasons that I have mentioned in the previous comment. As for the offline scenario, is much more comforting for a user starting from a working sample then from a stack that doesn't work when an arbitrary project is added.
That should be addressed as a separate issue. We are already addressing it downstream and I have created a separated issue for upstream: #14790
You are right. We need to find a way to get the domain host. That's something that may be available in the
Another good point. As of today I don't see how we could solve this easily. We can only document how to do configure maven repo mirror (as well as npm, pypi etc...). We need to think if in the future we make those che-server configuration properties, devfile extensions or something else. |
Can we zip the git repository example and host the git/zip as part of the registry as well ? |
@benoitf that's the goal yes. |
Opened PR eclipse-che/che-devfile-registry#112 Currently targets a branch until eclipse-che/che-devfile-registry#110 is merged. |
This is a good idea -- I've updated the PR to attempt to resolve the registry IP/port combo from k8s-provisioned env vars if the main override env var is not set. |
@amisevsk can we close this one taken into account that there is a separate issue for docs? |
Yes, this issue can be closed (it's possible to build an offline devfile registry, but we're currently not doing it by default). |
Is your enhancement related to a problem?
If Che is deployed on a cluster that doesn't have access to github (because behind a firewall or offline) the sample stacks won't work. For that reason we need to build a devfile registry image that contains the samples source code.
Describe the solution you'd like
The projects could be cloned, packaged as zipfiles files and copied in the images at build time. The devfiles should be edited to reference the zipfiles instead of the github repositories. That's similar to what is done for the vsix extensions and the plugin registry.
The text was updated successfully, but these errors were encountered: