website icon indicating copy to clipboard operation
website copied to clipboard

remove dependency on golang from cmctl and kubectl-plugin installation documentation

Open mirogta opened this issue 2 years ago • 2 comments

The current documentation for installing cmctl and kubectl-plugin relies on curl and golang being installed.

This is far from ideal.

It's probably OK to expect that curl is installed. This could be improved to not only expect it, but also validate (like it's already done here and here and here.

But it's not so nice to expect golang to be installed in the system just to get the correct OS/ARCH combination to then get the correct matching URL to be downloaded via curl. It seems that installing golang is an overkill, just to run go env because the OS/ARCH combination can be already determined without using golang.

This would make the end user experience much more pleasant.

This issue is to remove go env from the installation documentation and use something else, like

os=$(uname -s)
arch=$(uname -m)

See the discussion from https://github.com/cert-manager/website/pull/807#commitcomment-66026621 onwards.

And a proposed solution/inspiration in https://github.com/cert-manager/website/pull/807#issuecomment-1030352907

mirogta avatar Feb 04 '22 22:02 mirogta

@wallrj this should take care of the Linux/MacOS installation.

How much do you care about the comfort of installing it on Windows? The current steps for Windows are too manual (download, rename, move...) and perhaps it would be more appropriate to package it up and offer automated installation via chocolatey or winget or scoop instead?

See how to install kubectl on Windows

mirogta avatar Feb 04 '22 22:02 mirogta

@wallrj I've created a gist with the install script so anyone can try it out.

url="https://gist.githubusercontent.com/mirogta/8e79f33f6c6fa9ceafcafd1fe7e10540/raw/de023115eede47dd1f31bac92cf771db36a26b80/kubectl-cert-manager-install.sh"
curl -sL $url | sh
sudo mv kubectl-cert_manager /usr/local/bin
kubectl cert-manager --help

If you're happy with the concept, I'm happy to raise a merge request for both cmctl and kubectl-plugin install scripts that would work in a similar manner, but it's not clear to me where should they go?

Maybe under tools, as two separate files, install-cmctl.sh and install-kubectl-plugin.sh ?

mirogta avatar Feb 04 '22 22:02 mirogta