-
Notifications
You must be signed in to change notification settings - Fork 32
openSUSE & Rancher Desktop support (rootless) #1163
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
base: main
Are you sure you want to change the base?
Conversation
- Rancher Desktop support (rootless)
Uhh, great! Thanks for the PR! 🥰 The submitted additions to the install files look all sound to me. Could you also double check which libraries need to be uninstalled again in: https://github.com/green-coding-solutions/green-metrics-tool/blob/main/uninstall.sh The uninstall script gives the option to first remove all installed libraries via the install script. So it will be the same listing I guess ... unless package naming for uninstall works differently on openSUSE But also the uninstall script will remove pre-required dependencies, which we list in the docs under: https://docs.green-coding.io/docs/installation/installation-linux/#downloading-and-installing-required-packages Could you list the packages and the respective names you had to install on your distribtion in the uninstall script? I will then transport the information to the docs and update it with an Thanks again so much, we love that the tool gets used on openSUSE too :) |
Hey @thiloettelt , we haven't heard any feedback on this PR for a while. Did you read the reply? Happy to talk futher! Would be great if you could provide an update if the PR is still "alive" |
What a timing, I just resumed working on the PR. |
For conformity I'm also using lsb_release for OpenSUSE right now. |
Using |
I have replaced lsb_release for the opensuse parts wirth /etc/os-release and added some missing optional uninstall commands for opensuse. |
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 looked at the PR and have some minor questions but also a confusion with lima, then I feel it can be merged in and is a really nice addition! Thanks again!
@@ -131,6 +143,8 @@ if ! mount | grep -E '\s/tmp\s' | grep -Eq '\stmpfs\s' && [[ $ask_tmpfs == true | |||
if [[ "$tmpfs" == "Y" || "$tmpfs" == "y" ]] ; then | |||
if lsb_release -is | grep -q "Fedora"; then | |||
sudo systemctl unmask --now tmp.mount | |||
elif cat /etc/os-release | grep -q "openSUSE"; then | |||
echo "You probably already have /tmp on a tmpfs" |
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.
Can this not be force-enabled? If the user selects yes and action should happen I would argue.
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.
This is the only question open. If you could force mount on tmpfs (typically through systemd) this is ready for merge
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.
Good question, I have found out that tmpfs has been the standard for OpenSUSE almost 5 years for now.
Maybe we can skip this thing for opensuse, instead of asking the user. Or even better find out if it is already using tmpfs (which I don't know yet how to do).
Source: https://en.opensuse.org/openSUSE:Tmp_on_tmpfs
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.
It can be checked, yes.
What is the output of: findmnt -n -o FSTYPE /tmp
for you?
If it is tmpfs
than the command works as expected and I can bring it in
@@ -344,7 +344,7 @@ function build_containers() { | |||
|
|||
if [[ $build_docker_containers == true ]] ; then | |||
print_message "Building / Updating docker containers" | |||
if docker info 2>/dev/null | grep rootless || [[ $(uname) == "Darwin" ]]; then | |||
if docker info 2>/dev/null | grep rootless || docker info 2>/dev/null | grep lima-rancher-desktop || [[ $(uname) == "Darwin" ]]; then |
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.
lima to my knowledge is a VM based solution. What is the rationale here to check for this support?
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.
is the sudo call failing on your system?
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.
Yes, it's failing because Rancher Desktop registers nerdctl or corresponding docker aliases within the rc file of the user.
The intention of this line is to check if Rancher Desktop is being used and then handle everything rootless.
But not just because of the rc configuration thing, but also because the default mode of Rancher Desktop is rootless.
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.
Ok, understood. I guess it should be changed then from our side. The sudo docker
is legacy and since we now have the first quirk with it we remove it. The check for lima feels very specific and going for a general requirement to have the docker command be non-root runnable seems like the better option here. Feel free to remove the line. Otherwise I will remove it after merge.
uninstall.sh
Outdated
@@ -49,6 +51,8 @@ if [[ $(uname) == "Linux" ]]; then | |||
if [[ "$pre_install" == "Y" || "$pre_install" == "y" ]] ; then | |||
if lsb_release -is | grep -q "Fedora"; then | |||
sudo dnf remove -y curl git make gcc python3 python3-devel | |||
elif cat /etc/os-release | grep -q "openSUSE"; then | |||
sudo zypper rm --dry-run -n git make gcc python313 python313-pip python313-virtualenv |
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.
removal of curl here also? or can it not be removed as it is a core package?
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 don't know about the curl, that's in the line that is not from me.
I believe all of these packages actually come installed on OpenSUSE, so I am not sure whether there should be an option to remove them for openSUSE.
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 understand. To my research it is not installed in minimal. So in the spirit of "removing all dependencies" we will remove it. No need to update the PR. Will do it after merge
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 had accidentally introduced --dry-run, which I just corrected.
Hello,
I made some rather naive changes to the install_linux.sh and install_shared.sh in order to support installation on openSUSE (tested on tumbleweed) and also triggering rootless mode when discovering Rancher Desktop.
Sincerely,
Thilo