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

Add install minikube with homebrew on Linux #9066

Closed

Conversation

inductor
Copy link
Member

Homebrew has supported Linux since a while ago and I've been using it on my Linux environment too :)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 23, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inductor
To complete the pull request process, please assign priyawadhwa
You can assign the PR to them by writing /assign @priyawadhwa in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 23, 2020
@inductor
Copy link
Member Author

/assign @priyawadhwa

@codecov-commenter
Copy link

Codecov Report

Merging #9066 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9066   +/-   ##
=======================================
  Coverage   31.55%   31.55%           
=======================================
  Files         166      166           
  Lines       11356    11356           
=======================================
  Hits         3583     3583           
  Misses       7348     7348           
  Partials      425      425           

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree with this PR that has added homebrew as a new paragraph, making the Getting Started Guide look more complicated.

if you think adding brew would add a lot of value, I recommend at least adding it in the end
and with same format as others

## Homebrew install

brew install minikube

no need to say if homebrew is installed....the shorter the Getting Started Page be the better

but overall I dont think we really need to add homebrew installation for linux.

@inductor
Copy link
Member Author

inductor commented Aug 24, 2020

@medyagh

if you think adding brew would add a lot of value, I recommend at least adding it in the end and with same format as others

Sure, but I do not think the format is h2(with ##) and Homebrew install. I followed other existing formats as follows

### Debian package
### RPM package

Also, I borrowed the "if homebrew installed" from the macOS installation. Should I remove that line too?

I didn't think it was redundant because Linux and macOS are in different tabs anyway.

brew install minikube
```

If `which minikube` fails after installation via brew, you may have to remove the minikube cask and link the binary:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rather we keep this first page short, about creating a full page for all the possible installation for linux, and then from here

that says
for hombrew and full notes see ...(link)

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 29, 2020

Worked fine here, defintely better than the other mess... (the binary, and deb and rpm "hacks")
With their sudo and multiple commands and whatever. I'll throw in 0install option too. (#7978)

Binary download

 curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
 sudo install minikube-linux-amd64 /usr/local/bin/minikube

Debian package

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb

RPM package

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -ivh minikube-latest.x86_64.rpm

Linux brew

brew install minikube

Zero Install

alias minikube='0install run https://apps.0install.net/kubernetes/minikube.xml'

Even with the long command lines of the first three, they still fail to verify the checksums.
And they also fail on some other platforms, like ARM, due to hardcoding the architecture...

@inductor
Copy link
Member Author

Worked fine here, defintely better than the other mess... (the binary, and deb and rpm "hacks")

Yeah, that's actually the biggest motivation for this Pull Request!

@afbjorklund
Copy link
Collaborator

However, the sheer amount of text / different environments is also a problem with the install page.
The first three all deliver the very same "official" binary, which is why they are prominently featured.

It is nowhere as bad as the podman/cri-o pages, with dozens and dozens of distributions, but still...
Another approach would be to use the tabs for the package managers, like is being done here:

https://kubernetes.io/docs/tasks/tools/install-kubectl/

You know, the alternative to brew install kubectl. 😃

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 29, 2020

@inductor : actually we do recommend using brew:

https://kubernetes.io/docs/tasks/tools/install-minikube/

Install kubectl
Install a Hypervisor
Install Minikube using a package
Install Minikube via direct download
Install Minikube using Homebrew

In this text, docker/podman qualifies as "hypervisor" too.

But the wording is somewhat different, for the recommendation:

macOS: "The easiest way to install Minikube on macOS is using Homebrew"
Windows: "The easiest way to install Minikube on Windows is using Chocolatey"
Linux: "As yet another alternative, you can install Minikube using Linux Homebrew"

And the package text is actually even less helpful than above:

There are experimental packages for Minikube available;
you can find Linux (AMD64) packages from Minikube's releases page on GitHub.
Use your Linux's distribution's package tool to install a suitable package.

But we should open a proper issue for this, rather than just chat in the PR....

@inductor
Copy link
Member Author

inductor commented Sep 3, 2020

@afbjorklund @medyagh

I am actually from SIG-Docs 😅
So regarding all these, what should the doc describe?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Sep 3, 2020

So regarding all these, what should the doc describe?

I think the original idea (add brew) was OK, just formatting...

  • Documentation
    • Get Started!
      • What you’ll need
      1. Installation
        • Linux
          • Binary download
          • RPM package
          • DEB package
          • Brew Package Manager
        • macOS
          • Brew Package Manager
          • Binary download
        • Windows
          • Chocolatey Package Manager
          • Binary download
      2. Start your cluster

So it is mostly about fiddling the order around, and improving wording.

It is also somewhat complicated, compared to a big Download button...

@afbjorklund
Copy link
Collaborator

afbjorklund commented Sep 3, 2020

The comment from @medyagh was that adding brew would make the Linux list too long.

Maybe nested tabs would fix, but I'm not sure about that approach either - if it even works ?

But it would be nice to come up with some way to "squash" rpm/yum deb/apt into the others...

So that there was just one "binary download" and one "package manager" entry, for Linux ?

I guess anything is better than the auto-generated release page though:

https://github.com/kubernetes/minikube/releases/tag/v1.12.3 (34 assets)

@inductor
Copy link
Member Author

inductor commented Sep 3, 2020

Maybe nested tabs would fix,

I think it's already nested

@afbjorklund
Copy link
Collaborator

afbjorklund commented Sep 3, 2020

I think it's already nested

I can only see one layer, but nested tabs is probably evil (and I'm not sure if Hugo allows it)

minikube-installation

Theoretically one could put DEB and RPM tabs, like is being done for kubectl/kubeadm now:

kubectl-installation

kubeadm-installation

But then there would be a distro tab inside an operating system tab, and it would be ugly.

And of course trying to get apt and yum working is like a whole class of fail on its own...
It is working for kubectl and kubeadm, but minikube is not allowed in the same repository.

We could of course "untab" the OS, but then the page would be longer rather than shorter ?

@priyawadhwa priyawadhwa added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Sep 9, 2020
@afbjorklund
Copy link
Collaborator

@priyawadhwa : we don't usually have priorities on PRs, so if we don't want to merge it as-is we need a backlog issue (for brew)

@medyagh : maybe we can discuss it on the next meeting, if you think that the Linux install page is indeed becoming too long ?

minikube-linux-install-brew

At the very least, we should probably work with @inductor and others to make the two install pages a bit more similar than now:

@afbjorklund afbjorklund removed the priority/backlog Higher priority than priority/awaiting-more-evidence. label Sep 12, 2020
@afbjorklund afbjorklund linked an issue Sep 12, 2020 that may be closed by this pull request
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am okay with adding home brew as an option but i would like to know first, who Maintains this minikube homebrew for linux ?

is it an automatic process to ensure we have brew for linux ? does that mean whenever we update the mac homebrew they automatically add linux version too ? till I dont know the details I am not comfortable merging this
and also we dont need the extra lines that says if it didnt work do this or that. first page should be as short as possible. u can have a Link to another page that says for more info see... (homebrew links)

@afbjorklund
Copy link
Collaborator

afbjorklund commented Oct 23, 2020

I am okay with adding home brew as an option but i would like to know first, who Maintains this minikube homebrew for linux ?

It is the same package:

https://github.com/Homebrew/homebrew-core/commits/master/Formula/minikube.rb

https://github.com/Homebrew/linuxbrew-core/commits/master/Formula/minikube.rb

Basically only header changes:

class Minikube < Formula
  desc "Run a Kubernetes cluster locally"
  homepage "https://minikube.sigs.k8s.io/"
  url "https://github.com/kubernetes/minikube.git",
      tag:      "v1.14.0",
      revision: "b09ee50ec047410326a85435f4d99026f9c4f5c4"
  license "Apache-2.0"
  head "https://github.com/kubernetes/minikube.git"

...

And then the build system builds the binaries ("bottles") from the source ("formulas")

So homebrew is not using the same binaries as available on the github download page.

They call that "cask", when speaking in 🍺 (it was used earlier, in #5081)

It (brew cask install minikube) was also the reason for those cleanup tasks.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 23, 2020
@k8s-ci-robot
Copy link
Contributor

@inductor: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@afbjorklund
Copy link
Collaborator

We close this for now, Brew and Arch are still available - even if undocumented "upstream".

https://formulae.brew.sh/formula/minikube

https://www.archlinux.org/packages/community/x86_64/minikube/

Thanks for your contribution! Maybe a future version of Getting Started will feature them...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mention brew on the linux install page too
6 participants