-
Notifications
You must be signed in to change notification settings - Fork 166
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 fuse docs for Podman 5.x #2842
Open
dkwon17
wants to merge
6
commits into
eclipse-che:main
Choose a base branch
from
dkwon17:fuseupdate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d140ef6
feat: update fuse docs for Podman 5.x
dkwon17 081bc8b
Address PR feedback
dkwon17 c20131e
Update modules/administration-guide/pages/enabling-fuse-for-all-works…
dkwon17 633fbd0
Update modules/administration-guide/pages/enabling-fuse-for-all-works…
dkwon17 f764e48
Update modules/administration-guide/pages/enabling-fuse-for-all-works…
dkwon17 5795e7c
Mention Podman 5.x requirement
dkwon17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,11 @@ | |
[id="enabling-fuse-overlayfs-for-all-workspaces"] | ||
= Enabling fuse-overlayfs for all workspaces | ||
|
||
For Podman 5.x, the `/home/user/.config` must be owned by the current user for Podman to function correctly. | ||
The `storage.conf` file for Podman is typically stored in this folder. | ||
This document explains how to configure the container entrypoint script for the workspace so that fuse-overlayfs is being used. | ||
The Universal Developer Image (UDI) already contains the necessary configuration by default. | ||
deerskindoll marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.Prerequisites | ||
|
||
* The xref:administration-guide:enabling-access-to-dev-fuse-for-openshift.adoc[] section has been completed. This is not required for OpenShift versions 4.15 and later. | ||
dkwon17 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
@@ -15,34 +20,6 @@ | |
|
||
.Procedure | ||
|
||
. Create a ConfigMap that mounts the `storage.conf` file for all user workspaces. | ||
+ | ||
==== | ||
[source,yaml,subs="+quotes,+attributes"] | ||
---- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: fuse-overlay | ||
namespace: {prod-namespace} | ||
labels: | ||
app.kubernetes.io/part-of: che.eclipse.org | ||
app.kubernetes.io/component: workspaces-config | ||
annotations: | ||
controller.devfile.io/mount-as: subpath | ||
controller.devfile.io/mount-path: /home/user/.config/containers/ | ||
data: | ||
storage.conf: | | ||
[storage] | ||
driver = "overlay" | ||
|
||
[storage.options.overlay] | ||
mount_program="/usr/bin/fuse-overlayfs" | ||
---- | ||
==== | ||
+ | ||
WARNING: Creating this ConfigMap will cause all running workspaces to restart. | ||
|
||
. Set the necessary annotation in the `spec.devEnvironments.workspacesPodAnnotations` field of the CheCluster custom resource. | ||
+ | ||
==== | ||
|
@@ -62,9 +39,51 @@ spec: | |
For OpenShift versions before 4.15, the `io.openshift.podman-fuse: ""` annotation is also required. | ||
==== | ||
|
||
. If you are using a custom image for the workspace container, create the `/home/user/.config` folder and configure the `storage.conf` file on runtime via the entrypoint. | ||
To do this, create add the following to the workspace container image's entrypoint script before building the image. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. create and add? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated, it should only be |
||
+ | ||
==== | ||
[source,bash,subs="+quotes,+macros"] | ||
dkwon17 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- | ||
# Configure container builds to use vfs or fuse-overlayfs | ||
if [ ! -d "${HOME}/.config/containers" ]; then | ||
mkdir -p ${HOME}/.config/containers | ||
if [ -c "/dev/fuse" ] && [ -f "/usr/bin/fuse-overlayfs" ]; then | ||
(echo '[storage]';echo 'driver = "overlay"';echo '[storage.options.overlay]';echo 'mount_program = "/usr/bin/fuse-overlayfs"') > ${HOME}/.config/containers/storage.conf | ||
else | ||
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf | ||
fi | ||
fi | ||
---- | ||
==== | ||
+ | ||
This ensures that if the `/home/user/.config` doesn't already exist, the folder is created and owned by `user`. | ||
The `/home/user/.config` may already exist for example, if it was stored in a persistent volume. | ||
+ | ||
[NOTE] | ||
==== | ||
This is configured in the UDI by default. Therefore this step is only required if you are using a custom image for the workspace container. | ||
deerskindoll marked this conversation as resolved.
Show resolved
Hide resolved
|
||
==== | ||
|
||
.Verification steps | ||
|
||
. Start a workspace and verify that the storage driver is `overlay`. | ||
. Start a workspace and verify that the owner for `/home/user/.config` is `user`. | ||
+ | ||
[subs="+attributes,+quotes"] | ||
---- | ||
$ ls -la /home/user | ||
---- | ||
|
||
+ | ||
Example output: | ||
+ | ||
[subs="+attributes,+quotes"] | ||
---- | ||
... | ||
drwxrwsr-x. 3 user 1000660000 24 Dec 24 15:40 .config | ||
---- | ||
|
||
. Verify that the storage driver is `overlay`. | ||
+ | ||
[subs="+attributes,+quotes"] | ||
---- | ||
|
@@ -79,8 +98,8 @@ Example output: | |
graphDriverName: overlay | ||
overlay.mount_program: | ||
Executable: /usr/bin/fuse-overlayfs | ||
Package: fuse-overlayfs-1.12-1.module+el8.9.0+20326+387084d0.x86_64 | ||
fuse-overlayfs: version 1.12 | ||
Package: fuse-overlayfs-1.14-1.el9.x86_64 | ||
fuse-overlayfs: version 1.13-dev | ||
Backing Filesystem: overlayfs | ||
---- | ||
+ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
after configuration, is fuse-overlayfs used by the workspace with the configured script? the wording is a bit unclear, especially with "so that fuse-overlayfs is being used."
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.
The script is configured for the container image entrypoint. After that, a new container image is built, and whatever workspace uses that container image, will be using fuse-overlay fs for podman