-
Notifications
You must be signed in to change notification settings - Fork 60
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
Move tools & configs from /home/user/ to /home/tooling/ #525
Move tools & configs from /home/user/ to /home/tooling/ #525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AObuchow do you have a built image that contains current changes, I'd like to test it with existing DS samples
@svor here's an image built from these changes: |
As discussed in standup, I will also include an extra commit to backport devfile/developer-images#135 to the downstream UDI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably OK, but some nitpicks noted could be revised.
I pushed additional commits based on the feedback so far. @svor @nickboldt thank you both for the reviews. b8ecb9a is a port of devfile/developer-images#135, with Gradle and SBT being excluded since they are not being installed on the downstream UDI. The newest changes are available for testing at: |
Good catch @amisevsk. I'm not sure why I was under the impression texinfo and texinfo-tex were available in the Code Ready Beta repo's.
Not sure yet what the cleanest and most feasible way to do this is: do we create a second dockerfile for PPC & s390x? Do we do a runtime check on the architecture? It's probably worth investigating if there's a simple way to disable the need for |
100% no, that won't work
Yes, we do this when support on various arches varies, like the versions of dotnet available on Z & P: So you would want to ONLY include stow on x64, unless you can figure out a way to build it on Z & P too. You can ask for help on those arches from @Sachin-Itagi or @ghatwala, if you want to just implement this for x64 and ignore the other two arches for now. Either way, we'll likely need to loop in @deerskindoll to add a new RNaKI item if the support is different by arch. |
@AObuchow it's not possible to build a java project with current changes, when executing mvn clean install. I didn't investigate what is the reason, but I see an error:
You can try it with lombok DS sample: Also a problem with dotnet:
And I didn't detect any problem with python, nodejs, go and php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have did some tests building, running containers and switching java version and everything worked just fine. LGTM 👍
@svor Thank you for the feedback, I'll be working on reproducing and trying to fix the issues with maven & dotnet that you described. |
@l0rd Glad to hear things seemed to work correctly in your testing. |
Thank you for the guidance @nickboldt. Something strange to note: my brew builds have actually been succeeding (including s390x & PPC). Looking at the build logs, I can see that stow seems to be getting built, and its version is being outputted correctly after building: In the logs I see that there is a texinfo-tex package for both architectures ( This doesn't mean we're in the clear yet as we're still using the Code Ready Beta repo's however. |
@svor @nickboldt For dotnet, it seems that the install is failing:
I'm not sure yet why this is happening. Adding an extra repository shouldn't cause this issue? Unless a subset of alternative packages were mistakenly installed from the additional Code Ready builder repo, and their matching dependencies (required for dotnet) aren't present. Maybe I need to disable the code ready repo after stow has been built? Edit: it seems like the UDI has |
@svor For maven, the wrong maven-resolver package was accidentally getting pulled from the code ready builder repo so I disabled it after building stow (though, maybe this should happen earlier in the dockerfile.. it looks kind of ugly, but I wasn't sure about introducing an extra layer). For dotnet, I think there was some weird upgrade that was in-flight for dotnet's dependencies when I built the image. It seems to work now. @amisevsk I addressed your feedback. I realized certain changes belonged to the wrong commits, which is why you see me deleting and re-adding the same lines (with slight modifications based on your feedback). |
Something that came to mind: maven is using Also, we might want to change GOBIN and GOPATH to point to |
The latest changes can be tested with |
Co-authored-by: Angel Misevski <[email protected]>
Co-authored-by: Angel Misevski <[email protected]>
@amisevsk I added 2 extra commits to address the PATH issue and code-ready repo disable. Though I am still waiting on my brew build to finish. |
My fix for the PATH problem was incorrect... sorry about that. Fixing it. |
Signed-off-by: Andrew Obuchowicz <[email protected]>
The latest changes can be tested with: |
I'm currently testing out the image in a Che workspace with persistUserHome enabled and something is unfortunately failing in the entrypoint, looking into it. Edit: Looks it stow is failing to due the
Edit 2: Should be fixed in 49b87a9 (see commit description). I pushed my image ( I tested things in Che with the following devfile on the dogfooding cluster, and modified the devworkspace object to use the following dwoc with persistUserHome enabled: apiVersion: controller.devfile.io/v1alpha1
config:
workspace:
persistUserHome:
enabled: true
kind: DevWorkspaceOperatorConfig
metadata:
name: custom-dwoc
namespace: aobuchow-che-1cac83 I did a quick test that involved:
|
…home/user/ In order for stow in the UDI's entrypoint to complete successfully, any files present in /home/user/ (that are not in the .stow-local-ignore) must not also exist in /home/tooling/, otherwise a conflict would occur. Since the symbolic link creation from JAVA_HOME_8/11/17 occurs before stow is executed, the symbolic link must be created from JAVA_HOME_8/11/17 -> /home/tooling/ to prevent a stow conflict. Stow will then create a symbolic link from /home/tooling/.java/current/ -> /home/user/.java/current/ so that JAVA_HOME remains valid. Signed-off-by: Andrew Obuchowicz <[email protected]>
@nickboldt If this gets a +1 from @amisevsk & @SDawley, I will squash the remaining fixup commits and this should be good to finally merge 🥳 |
Build 3.11 :: udi_3.x/389: Console, Changes, Git Data |
Build 3.11 :: get-sources-rhpkg-container-build_3.x/5203: udi : 3.x :: Failed in 57108217 : BREW:BUILD/STATUS:UNKNOWN |
…oper#525) * Use bash-completions package Signed-off-by: Andrew Obuchowicz <[email protected]> * Don't modify ~/.bashrc, use /etc/profile.d/ instead Signed-off-by: Andrew Obuchowicz <[email protected]> * Build stow from sources Signed-off-by: Andrew Obuchowicz <[email protected]> * Move tools & configs from /home/user/ to /home/tooling/ Signed-off-by: Andrew Obuchowicz <[email protected]> * Fix for multiple $KUBEDOCK_PARAMS Signed-off-by: Andrew Obuchowicz <[email protected]> * Install vim Signed-off-by: Andrew Obuchowicz <[email protected]> * Don't stow .viminfo Signed-off-by: Andrew Obuchowicz <[email protected]> * Ensure ~/.bashrc and ~/.bash_profile exist when persistUserHome enabled Signed-off-by: Andrew Obuchowicz <[email protected]> * Remove obsolete bash prompt creation from UDI entrypoint Signed-off-by: Andrew Obuchowicz <[email protected]> * Don't fail entrypoint if kubeconfig could not be found Signed-off-by: Andrew Obuchowicz <[email protected]> * chore: define user directory for binaries Signed-off-by: Andrew Obuchowicz <[email protected]> * Ensure mountpoint test doesn't cause entrypoint to fail Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/etc/entrypoint.sh Co-authored-by: Valerii Svydenko <[email protected]> * Remove redundant creation of Go bin directory Signed-off-by: Andrew Obuchowicz <[email protected]> * Remove redundant /home/tooling/ creation Signed-off-by: Andrew Obuchowicz <[email protected]> * Pre-create common tooling config directories Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/etc/entrypoint.sh Co-authored-by: Angel Misevski <[email protected]> * Disable code ready builder repo after building stow We disable the code ready builder repo on each architecture to prevent accidentally pulling in the wrong packages. For example, the maven-resolver package differs between the rhel 8 app stream repo & the code ready builder repo which leads to maven being unable to download artifacts. Signed-off-by: Andrew Obuchowicz <[email protected]> * Fix for incorrect python module Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/Dockerfile Co-authored-by: Angel Misevski <[email protected]> * Update devspaces-udi/Dockerfile Co-authored-by: Angel Misevski <[email protected]> * Ensure PATH contains /home/user/ and /home/tooling/ entries Signed-off-by: Andrew Obuchowicz <[email protected]> * fixup! Disable code ready builder repo after building stow * Create ~/.java/current/ symbolic links in /home/tooling/ instead of /home/user/ In order for stow in the UDI's entrypoint to complete successfully, any files present in /home/user/ (that are not in the .stow-local-ignore) must not also exist in /home/tooling/, otherwise a conflict would occur. Since the symbolic link creation from JAVA_HOME_8/11/17 occurs before stow is executed, the symbolic link must be created from JAVA_HOME_8/11/17 -> /home/tooling/ to prevent a stow conflict. Stow will then create a symbolic link from /home/tooling/.java/current/ -> /home/user/.java/current/ so that JAVA_HOME remains valid. Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/Dockerfile * Update devspaces-udi/Dockerfile * fixup! Disable code ready builder repo after building stow --------- Signed-off-by: Andrew Obuchowicz <[email protected]> Co-authored-by: Nick Boldt <[email protected]> Co-authored-by: Valerii Svydenko <[email protected]> Co-authored-by: Angel Misevski <[email protected]>
…de python to 3.11 (#524) (#530) * upgrade python to 3.11 (#524) Signed-off-by: Valeriy Svydenko <[email protected]> * Move tools & configs from /home/user/ to /home/tooling/ (#525) * Use bash-completions package Signed-off-by: Andrew Obuchowicz <[email protected]> * Don't modify ~/.bashrc, use /etc/profile.d/ instead Signed-off-by: Andrew Obuchowicz <[email protected]> * Build stow from sources Signed-off-by: Andrew Obuchowicz <[email protected]> * Move tools & configs from /home/user/ to /home/tooling/ Signed-off-by: Andrew Obuchowicz <[email protected]> * Fix for multiple $KUBEDOCK_PARAMS Signed-off-by: Andrew Obuchowicz <[email protected]> * Install vim Signed-off-by: Andrew Obuchowicz <[email protected]> * Don't stow .viminfo Signed-off-by: Andrew Obuchowicz <[email protected]> * Ensure ~/.bashrc and ~/.bash_profile exist when persistUserHome enabled Signed-off-by: Andrew Obuchowicz <[email protected]> * Remove obsolete bash prompt creation from UDI entrypoint Signed-off-by: Andrew Obuchowicz <[email protected]> * Don't fail entrypoint if kubeconfig could not be found Signed-off-by: Andrew Obuchowicz <[email protected]> * chore: define user directory for binaries Signed-off-by: Andrew Obuchowicz <[email protected]> * Ensure mountpoint test doesn't cause entrypoint to fail Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/etc/entrypoint.sh Co-authored-by: Valerii Svydenko <[email protected]> * Remove redundant creation of Go bin directory Signed-off-by: Andrew Obuchowicz <[email protected]> * Remove redundant /home/tooling/ creation Signed-off-by: Andrew Obuchowicz <[email protected]> * Pre-create common tooling config directories Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/etc/entrypoint.sh Co-authored-by: Angel Misevski <[email protected]> * Disable code ready builder repo after building stow We disable the code ready builder repo on each architecture to prevent accidentally pulling in the wrong packages. For example, the maven-resolver package differs between the rhel 8 app stream repo & the code ready builder repo which leads to maven being unable to download artifacts. Signed-off-by: Andrew Obuchowicz <[email protected]> * Fix for incorrect python module Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/Dockerfile Co-authored-by: Angel Misevski <[email protected]> * Update devspaces-udi/Dockerfile Co-authored-by: Angel Misevski <[email protected]> * Ensure PATH contains /home/user/ and /home/tooling/ entries Signed-off-by: Andrew Obuchowicz <[email protected]> * fixup! Disable code ready builder repo after building stow * Create ~/.java/current/ symbolic links in /home/tooling/ instead of /home/user/ In order for stow in the UDI's entrypoint to complete successfully, any files present in /home/user/ (that are not in the .stow-local-ignore) must not also exist in /home/tooling/, otherwise a conflict would occur. Since the symbolic link creation from JAVA_HOME_8/11/17 occurs before stow is executed, the symbolic link must be created from JAVA_HOME_8/11/17 -> /home/tooling/ to prevent a stow conflict. Stow will then create a symbolic link from /home/tooling/.java/current/ -> /home/user/.java/current/ so that JAVA_HOME remains valid. Signed-off-by: Andrew Obuchowicz <[email protected]> * Update devspaces-udi/Dockerfile * Update devspaces-udi/Dockerfile * fixup! Disable code ready builder repo after building stow --------- Signed-off-by: Andrew Obuchowicz <[email protected]> Co-authored-by: Nick Boldt <[email protected]> Co-authored-by: Valerii Svydenko <[email protected]> Co-authored-by: Angel Misevski <[email protected]> --------- Signed-off-by: Valeriy Svydenko <[email protected]> Signed-off-by: Andrew Obuchowicz <[email protected]> Co-authored-by: Valerii Svydenko <[email protected]> Co-authored-by: Nick Boldt <[email protected]> Co-authored-by: Angel Misevski <[email protected]>
This is a downstream port of devfile/developer-images#115, that fixes these downstream issues 1 and 2, with some adaptations made to account for some differences between the upstream and downstream UDI image, namely:
-e
in the downstream UDI's entrypoint, which cause the entrypoint to fail if any command it executes has a non-zero return codeI also ported devfile/developer-images#117 while I was at it in afb8dfe.
I tried to organize the commits in this PR to mirror their upstream equivalents. Below is a list of downstream to upstream commit conversions:
The additional commits required for this change to work on the downstream UDI are as follows:
A note on the repositories used in
content_sets.yml
: The Code Ready builder Beta repo is used for the s390x and ppc64le architectures. The non-beta version of the repo doesn't seem to exist.Testing
This changes touches a lot of tools and configuration files used in the UDI. Thus, it's worth ensuring different workflows still function correctly (e.g. java, mvn, nodejs, go, python). In addition, ensuring podman (with the podman wrapper + kubedock) works correctly is important: see devfile/developer-images#107 for testing notes, though you'll have to modify this devfile to use the downstream UDI image built from this PR.
Comparison before and after changes
For reference, I'm comparing the UDI built from my changes with
registry.redhat.io/devspaces/udi-rhel8:3.9-18
ls -la
in/home/user/
directoryBefore:
After:
/home/user/
directory treeDirectory tree can be viewed using https://github.com/a8m/tree/tree/master: installed by running
go install github.com/a8m/tree/cmd/tree@latest
thengo clean -cache && go clean -modcache && rm -rf /home/user/.cache/go-build && rm -rf /home/user/.cache/pip
Unfortunately, the trees are too large to fit within a PR description.
.bashrc
Before:
After:
Also, here are the 2 new files in
/etc/profile.d/
:$PATH
Before:
After: