Closed maximilien closed 3 years ago
Until knative setups their own homebrew repo + ci job, I've added kn
to our homebrew/ci (based on github releases):
$ brew install starkandwayne/kubernetes/knative-client
==> Installing knative-client from starkandwayne/kubernetes
==> Downloading https://github.com/knative/client/releases/download/v0.2.0/kn-darwin-amd64
...
$ kn version
Version: v0.2.0
Build Date: 2019-07-10 20:57:03
Git Revision: e1614f9
Dependencies:
- serving: v0.6.0
nice ;-) We hope to get there soon ...
expecting a official brew package soon
Hi, @drnic, did you want to contribute this officially? We'd be happy to accept? Let me know and I can help you need too. Thx.
Yes, we would be happy to include this as well in the installation documentation in https://github.com/knative/docs/blob/master/docs/install/install-kn.md
@drnic Are you still there ;-) ? Sorry for the long delay. If not, no problem, as someone else could pick this up.
@rhuss I chatted with @maximilien about the steps we need to take, the new repo + permissions I'd need. I can pair with you/someone who has those permissions? I'm in GMT+10/Brisbane AU timezone.
@drnic could you summarize what repo you would need and which structure ? I'm asking because there is a little bit of process involved in creating a new GitHub repo and adjusting the permission (as we have to ask others because we don't have enough perms for doing so). So there is unfortunately nothing we could do 'live' ;-(
knative/knative
)knative-client.rb
based on a latest https://github.com/knative/client github release and its assets.Then brew install knative/knative/knative-client
should work.
@drnic thanks for the writing down the steps required !
@mattmoor Do you think we could establish this new dedicated homebrew repo ? I guess it then can be used as a homebrew tap not only for kn
itself but also for kn
plugins or for funk
(if it should get an own cli).
Also for the CI, I guess we could use Prow for doing the file updates as part of an (auto) release.
Correct; the one repo can house lots of *.rb recipes; and the update-homebrew.sh
can bump any specific one in CI
brew install knative/knative/knative-client
is kind of a mouthful.
I think there's a very strong case for creating a repo to support this, but if its name directly affects the install experience, maybe we should bikeshed that a bit first?
Many ppl break it into two instructions:
brew tap knative/knative
brew install
-- Dr Nic Williams Stark & Wayne LLC http://starkandwayne.com +61 437 276 076 twitter @drnic
Ideally, I would like to have a knative/kn
as the preferred choice or knative/knative/kn
as a second choice. (so, replacing knative-client
by the command name how it is called: kn
).
Plugins then could be named like the command, too: kn-build
, kn-migrate
, ...), or if it's our plugin collection kn-contrib
For the second part, we could also something different than knative
to avoid repetition.
Some suggestions for the repo name:
knative/homebrew
)knative/install
)knative/client
, however only when this repo then is reserved for client binaries only).After writing this :), I like best:
https://github.com/knative/homebrew-client
repositorykn.rb
declaratorThis would lead to this UX:
# Install directly:
$ brew install knative/client/kn
$ brew install knative/client/kn-contrib # for all plugins
$ brew install knative/client/kn-funk # for individual plugins
# Install via tap:
$ brew tap knative/client
$ brew install kn
$ brew install kn-contrib
...
Many ppl break it into two instructions
I see, this seems much more reasonable, thanks for explaining!
This would lead to this UX
I like this better too.
LMK when I should start pushing for a name in particular, and I'll poke folks.
@drnic are we good with the proposal in https://github.com/knative/client/issues/400#issuecomment-585592616 ? (i.e. having a repo knative/homebrew-client
? I then would kick off the process to create that repo ...
One common tap name, if there's any pattern at all, would be to name the repo homebrew-tap
and then it would be brew install knative/tap
.
As research, here is the list of taps I have installed on my laptop. Five are called tap
, all others are unique.
$ brew tap | grep -v homebrew/
aquasecurity/trivy
buildpack/tap
cloudfoundry/tap
derailed/k9s
derailed/popeye
gobuffalo/tap
homeport/tap
jenkins-x/jx
julzdiverse/tools
k14s/tap
linode/cli
starkandwayne/cf
starkandwayne/kubernetes
As I'm not sure whether there will be other homebrew taps below knative/
I still opt for homebrew-client
(also because it seems that there is not hard convention.
Also on my machine it looks like:
appsody/appsody
azure/functions
boz/repo
d12frosted/emacs-plus
datawire/blackbird
derailed/k9s
homebrew/cask
homebrew/cask-fonts
homebrew/core
jenkins-x/jx
wagoodman/dive
(not a single tap
).
@mattmoor can you please kick the tires to create a knative/homebrew-client
repo ? This would be awesome ! The purpose of this repo would be to hold the homebrew formulas for kn
and the plugins from client-contrib
Another naming option. Call the repo homebrew-tap
. Their isn't exactly a standard here, but there are lots of examples of that. It has the advantage of avoiding some of the repetition issues.
brew install knative/tap/kn
This also has the advantage of folks being able to install one tap, and then grab this and future tools from the same place (rather than installing new taps for every new tool).
This also has the advantage of folks being able to install one tap, and then grab this and future tools from the same place (rather than installing new taps for every new tool).
I'm open for both knative/homebrew-client
or knative/homebrew-tap
, both don't suffer from any repetition issue, with homebrew-client
focussing on client tooling (as knative's backendpart won't be installed via homebrew for sure).
Let's start a quick poll, and then decide next week when we have released 0.13.0
Create GitHub repo knative/homebrew-tap which leads to an UX like
brew install knative/tap/kn
brew tap knative/tap
brew install kn
brew install kn-contrib
Upvotes only.
Create GitHub repo knative/homebrew-client which leads to a UX like
brew install knative/client/kn
brew tap knative/client
brew install kn
brew install kn-contrib
Upvotes only
This also has the advantage of folks being able to install one tap, and then grab this and future tools from the same place (rather than installing new taps for every new tool).
this i think leads to a more convenient experience.
One reason for knative/client/kn
is to anticipate other CLIs or homebrew installable components. Thinking specifically of work items from the FaaS WG that is being proposed.
Sorry for the delay. Let's settle on a knative/homebrew-client
repoistory (most votes). I will take that it get's created so that we can start to work on that to include the client.
The repo hombrew-client has been created and I added an initial formular for 0.13.1 (thanks @drnic !).
Next step is now to setup Prow properly to PR handling and CI. But I think its probably better to make the creation of the PR be part of the release process of kn
itself ? (that way we don't need to add a periodic check for a new release, and we can fail the overall release process if the update of this repo fails). wdyt ?
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/remove-lifecycle stale /reopen
for the automation step to create the brew release as part of the regular release, let's continue to work on this issue.
@rhuss: Reopened this issue.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/remove-lifecycle stale /reopen
@rhuss does this still need to remain open?
The last missing piece is to add the automatic update of the homebrew repo when a kn release has landed, i.e. creating automatically a PR against homebrew-client which updates the versions. Or, what is probably easier, create the script in homebrew-client that is then called when a release of kn is done and then add the step to call this script to the release documentation.
I think we should start with the latter so we don't have to deal with authentication during the release process.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
In what area(s)?
Installation / usability
Classifications:
Describe the feature:
Similar to #323 and #394 would be nice to have a
brew
formulae for the Kn Knative client