rancher-desktop icon indicating copy to clipboard operation
rancher-desktop copied to clipboard

Unattended installation for Rancher Desktop (macOS)

Open rfay opened this issue 3 years ago • 5 comments

Preflight Checklist

  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

I'd like to be able to use Rancher Desktop in CI, so need to be able to install it from the command-line. Is there a way to do this, or would appreciate adding one. Are there args for "Rancher Desktop.app"?

Proposed Solution

Add an arg to "Rancher Desktop.app" so it could be run with open -a /Applications/Rancher\ Desktop.app --args "--install" for example.

This would also mean needing to be able to configure it. For example, switch it to dockerd, which is not the default.

Additional Information

Thanks!

rfay avatar Dec 21 '21 23:12 rfay

We currently do not have any argument parsing, as Rancher Desktop is designed for interactive development use. We have not focused on non-interactive usage at this point.

I'm going to leave this open, but please be aware that (as far as I know — I'm not the PM) this is not currently in the short term road map, and there are no promises of when this may be implemented.

Thanks for filing the request!

mook-as avatar Dec 21 '21 23:12 mook-as

Thanks - It would also be fine to be able to place a config file to determine behavior.

Some background: I'm the maintainer of ddev, which is a docker-based local development tool for web developers. It currently depends on Docker Desktop (on macOS), and Rancher Desktop seems like a great fit. But every push to the ddev repo does a couple of hours of testing on each platform. And it would be ever-so-wonderful if this could be provisioned on Github Actions on macOS especially. It's always been near-impossible to do that with Docker Desktop, so all our macOS testing is currently on real macs running Buildkite. But there aren't enough of them to increase the number of platforms to be tested.

rfay avatar Dec 21 '21 23:12 rfay

I'm not sure what would be required to automate installation; it is just moving Rancher Desktop.app into the /Applications folder, and even that is not strictly necessary (but please don't run it from $TMPDIR).

Configuring it automatically is not currently supported, but can probably be made to work by pre-creating some directories and dropping some config files...

But yet another issue is that starting with RD 0.7.0 we need to install some parts as root (the vmnet software that runs as root, potentially setting up the docker.sock, and one other thing I cannot remember right now). So this will pop up a dialog asking for a sudo password on first run (plus another "explainer" dialog just before that).

I'm sure we can figure something out, even if it isn't an officially supported/endorsed mechanism, but am on vacation now until the end of the year. Will look at it again when I'm back!

jandubois avatar Dec 22 '21 00:12 jandubois

In a CI environment it would be fine to use sudo for the first startup. Back when this was repeatably possible with Docker Desktop that's the way it had to be done.

rfay avatar Dec 22 '21 00:12 rfay

There is now "brew install rancher", but this is not sufficient, more control over configuration is needed https://github.com/rancher-sandbox/rancher-desktop/issues/1672

CI is one case of an unattended installation, but developer onboarding is another one. People may tend to select undesired options like choosing nerdctl vs moby or enabling kubernetes, and this interferes with other developer tools.

I noticed a recent epic https://github.com/rancher-sandbox/rancher-desktop/issues/3104. Please consider addressing the unattended configuration too https://github.com/rancher-sandbox/rancher-desktop/issues/1149#issuecomment-999176838.

marcindulak avatar Oct 08 '22 10:10 marcindulak