Skip to content
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

Command to install/remove symlink for oc and podman #15

Open
guillaumerose opened this issue Apr 20, 2021 · 5 comments
Open

Command to install/remove symlink for oc and podman #15

guillaumerose opened this issue Apr 20, 2021 · 5 comments

Comments

@guillaumerose
Copy link
Contributor

One big pain with crc is the use of crc oc-env or crc podman-env.
It brings nothing and it will be a good improvement to directly put oc and podman directly in the PATH of the user.

When the crc VM is started, crc could install the symlink. When the VM is stopped, crc could remove (or restore it).
Same for podman.

The admin-helper can do this job:

  • one command to install and backup /usr/local/bin/oc symlink.
  • one command ro remove and restore the symlink.
@cfergeau
Copy link
Contributor

symlinks from /usr/local to user home dir is a bit weird, what about systems with 2 users, in particular if they want to run different crc versions.
And having crc's oc/podman in the default PATH caused issues in the past, this was the reason for moving oc to its own dir, this was the reason for the podman naming discussion, we need to be careful with this.
crc oc-env is also used to propagate the proxy settings, so we'll still need some -env command in some cases.

@praveenkumar
Copy link
Member

praveenkumar commented Apr 20, 2021

I would not recommend it because then we are updating a binary path without user notice it. Assume I have production cluster of version 3.11 or 4.3 so I have my oc binary in the path accordingly but as soon as I use CRC if that changes then my interaction with those cluster break if oc binary is not compatible :(

@guillaumerose
Copy link
Contributor Author

symlinks from /usr/local to user home dir is a bit weird

Combined with crc-org/crc#2251, oc would come from a shared location.

And having crc's oc/podman in the default PATH caused issues in the past

Maybe we can add an option? If oc is already installed by brew or so, we could say 'please use crc oc-env'.
I understand some people might complain but it solves the issue for 90% of people maybe. At least, on macOS and Windows, crc could come with good defaults.

@cfergeau
Copy link
Contributor

cfergeau commented Apr 20, 2021

symlinks from /usr/local to user home dir is a bit weird
Combined with crc-org/crc#2251, oc would come from a shared location.

yup, only saw this issue after this one :) On Linux, it would still be installed in the user homedir, which should not block macos/windows improvements, but we also want the experience to be as consistent as possible/easy to document.
~/.local/bin or ~/bin could be used on linux, but I think it was explicitly something we did not want to do in the past.

@gbraad
Copy link
Contributor

gbraad commented May 12, 2021

it will be a good improvement to directly put oc and podman directly in the PATH of the user.

this would override the users installed binaries and should therefore be an option that can be set from the installer; possible for MSI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants