-
Notifications
You must be signed in to change notification settings - Fork 63
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
Update ubi to configure kubedock and podman #179
Conversation
Signed-off-by: David Kwon <[email protected]>
Signed-off-by: David Kwon <[email protected]>
b41754e
to
c338029
Compare
@dkwon17 Looks good to me so far, will continue testing & reviewing on Monday 👍 |
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.
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.
Tested following the PR instructions & everything seems to work as expected :) Left some comments.
base/ubi8/podman-wrapper.sh
Outdated
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.
Shouldn't we remove the podman wrapper from the universal image now that it's moved to the base image?
@svor did your workspace restart after patching in KUBEDOCK_ENABLED? i.e. In my testing, I got |
Yes, I've restarted my workspace. I'll do another try tomorrow, maybe I've missed something 🤔 |
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.
@svor that would make things simpler, but the downside is that it would increase the size of the base image from ~150MB to ~280MB I prefer the simpler way and have podman in the base image |
I also prefer the simpler way to have podman in the base image, but an increase of the base image from ~150MB to ~280MB is roughly a 187% increase in size. I don't know if we should assume that users (consumers of the UBI) will always want to be able to build containers. Kubedock is only ~30mb in size, so the majority of the increase in image size is caused by installing podman. IMO the current approach makes sense for a base image. |
also it could be confused a bit that we have ENVs like PODMAN_WRAPPER_PATH and PODMAN_ORIGINAL_PATH in base image but no podman |
That's a good point. I don't think we have an official page for universal developer (and base) image documentation in the Che Docs. When looking at the docs, I only see mentions of the UDI. The change made by this PR might warrant adding a Che Docs page on the UBI & UDI, where we could mention that installing podman on the UBI will automatically install kubedock? There we could also mention the existence of the podman and dnf wrapper potentially, to clarify any confusion. |
I'm +1 for this. If consumers of the UBI complain about it's size, we always could go with the current approach of using a wrapper script for dnf. |
Signed-off-by: David Kwon <[email protected]>
Signed-off-by: David Kwon <[email protected]>
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.
LGTM
@dkwon17 am I right that each image that extends base image should have source kubedock_setup
in entrypoint.json to enable kubedock? If it's true, maybe we could add this information into README?
@svor Yes, that's correct, I will update the readme too for more details |
Signed-off-by: David Kwon <[email protected]>
I've updated the README |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: AObuchow, dkwon17, ibuziuk, svor The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR adds podman/buildah and kubedock functionality to the ubi8 image.
To summarize the changes:In the dockerfile, download kubedock and create wrapper files arounddnf
andpodman
Thednf
wrapper checks whether podman is installed. If it is installed, podman and kubedock are configured as it's done in the UDI8 image.I had trouble building the images with podman, so the following instructions use docker, just like the contributing guide here
To test:
First, replace line 4 of the udi dockerfile here so that the base image matches the base image built from step 2.
Then, run the following:
Case 1
The workspace starts with the base image
<CHE_HOST>/#https://github.com/dkwon17/empty?image=<BASE_IMAGE>
Case 2
The workspace starts with the UDI image
<CHE_HOST>/#https://github.com/dkwon17/quarkus-api-example/tree/per-workspace?image=<UDI>
Next, verify that the following command runs without any errors:
Run the
Package
andBuild image
devfile tasks to verify that podman image builds are also working.Lastly, test kubedock by adding the
KUBEDOCK_ENABLED=true
env variable in the tooling container:and by running the following when the workspace restarts: