-
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
Create UBI based images for che-theia #13765
Comments
To build To build
I've tried to leave Using official nodejs image as a base for The approach which works is to use CentOS as a base for |
Work in progress started last week here: Current TODOs: Theia-dev
Theia
|
generator was in a separated repository (ws-skeleton) and then published to npmjs as it's now in che-theia repository, it should not be retrieved through npmjs |
to be sure that the version used is working as expected. also let say you run the build 2 months later, it may not work at all |
I think from time to time content these folders changes and become outdated. Also If you want these folders in the some another images I think multi-stage build could help. |
To speed up che-theia loading we are caching che-theia scripts and push it to the CDN registry like artifact. Then on start theia browser downloads scripts from the closest CDN server, that why theia loading faster. |
Right but why a DIFFERENT version in che-theia/theia vs che-theia/theia-dev? theia-dev: @theia/generator-plugin@0.0.1-1540209403 Surely you want the same version in both? Seems like hardcoding this in the dockerfiles vs. in a package.json or yarn.lock is what's causing the mismatch (update one, forget the other) ? |
I'm not sure we can do that for the product unless we have a RH-approved repo where we're publishing. What's the full URL of the CDN we're using? |
No, I need to pull the contents of these folders so that I can push them into the Dockerfile build inside Brew. Brew can't see the outside world, so I need to tar up these node_modules and then push the tarball into pkgs.devel.redhat.com so we have a stored copy of the sources/binaries from which to build offline. |
Do you mean @eclipse-che/theia-generator or @theia/generator-plugin ? If you mean @eclipse-che/theia-generator... should we also be building @theia/generator-plugin instead of installing it from npm? Ref: https://github.com/redhat-developer/codeready-workspaces/blob/master/dependencies/che-theia/dockerfiles/theia/Dockerfile#L127 |
yes it's part of the source code of this project.
no, because the source code is external to this repository: https://github.com/eclipse/theia-generator-plugin |
If "it's in another repo" was a reason not to build something, then the whole che-theia repo wouldn't exist. :P I'm asking if it's better to use a specific binary, or to build from master. Since the version of the generator plugin is different in theia-dev vs. theia, I'd think at least we should standardize on a single version, if not using latest. Would you agree? or is there some technical reason to have them different? |
it should be the same version coming from npmjs for theia-generator-plugin in theia-dev and in theia |
@benoitf so you mean: Instead of using we should just pull the latest from npm ? or both should be using newer |
|
latest may pull unwanted versions and is not tagged/ reproducible build |
I've got a working build of theia-dev in Brew, pushed to Quay. |
Sync/trigger job for theia: https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/crw-theia_sync-github-to-pkgs.devel/ is now working. Latest tags (built locally, pushed manually): https://quay.io/repository/crw/theia-rhel8?tag=latest&tab=tags However the build is still dying in Brew because node-gyp is trying to download stuff:
-- http://download.eng.bos.redhat.com/brewroot/work/tasks/3375/23873375/x86_64.log So probably have to prefetch https://nodejs.org/download/release/v10.14.1/node-v10.14.1-headers.tar.gz and use
Unless there's a better way, @benoitf ? |
OK, got past the node-gyp download problem. Next issue:
Can we predeclare these dependencies in a yarn.lock or package.json and use that when setting up theia-dev so these will already be in the dev env? Or add them to the theia package.json and prefetch them before building theia? For easier pasting, here's the uniq'd sort'd list:
|
Also can we use a version other than @latest ? That's great for CI but terrible for products. :) If so, how do we override that, and where? |
I think it's solved with yarn offline / cache |
when/where do I have to run yarn to perform the caching? and from what folder do I then need to tar up the results? I know it's the weekend ... but your answers are not helpful :( |
the yarn cache folder: https://github.com/benoitf/che-theia-brew/blob/master/build.sh#L70 for yarn offline: it will append |
I've reworked che-theia docker image builds: Found this issue with offline mode: Here is a script to generate 'offline/ubi8 / brew compliant (hopefully) images' The build script is mostly composed of 3 parts:
|
Thanks to Florent's hard work we have theia, theia-dev, theia-endpoint images now for CRW 2.0:
|
@nickboldt @benoitf is there still something missing or we can close this issue? |
Once Florent's code is in https://github.com/redhat-developer/codeready-workspaces-theia (including whatever magic is used to produce the Dockerfile and asset*.gz files for the theia-endpoint), we can resolve this. Currently the code in https://github.com/benoitf/che-theia-brew/tree/master/conf only covers Theia and Theia dev. Need all three. Followup work in #14797 |
Code is live in https://github.com/redhat-developer/codeready-workspaces-theia but not synced with pkgs.devel repos yet |
https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/CRW_CI/view/Pipelines/job/crw-theia_master/ builds theia-dev, theia, and the endpoint runtime binary, then triggers three brew builds and pushed them to brew. Resolving. |
We need eventually move to UBI images
With this issue we can start creating POC images for che-theia
Currently there are ubi8/nodejs-10, so we can start POC using that image as base image.
I propose to start with:
theia-dev
theia
The text was updated successfully, but these errors were encountered: