-
Notifications
You must be signed in to change notification settings - Fork 475
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
CLI in-cluster management #137
Conversation
7497bd9
to
b1110a0
Compare
/uncc |
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd consider this enhancement to be place at the root directory, since it's not about oc only, but we're trying to solve a higher level issue. oc will be merely one of the consumers.
a1d3d6d
to
2d7ee86
Compare
enhancements/cli_manager.md
Outdated
index location from which the CLI manager will obtain the files. | ||
|
||
Two routes for index: | ||
1. Central index that has links to where artifacts are stored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an index exists that has the list of CLIs and their location, what would be ConsoleCLIDownload used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CRD will hold info for each CLI (available versions, download urls, description, other) that can be gathered via oc get climanageddownload okd -o yaml
for example.
or run oc get consoleclidownloads oc-cli-downloads -o yaml
to see the current consoleCLIDownload for oc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd imagine we'd deprecate ConsoleCLIDownload
in favour of the central index. All the tools serving that information should be using the new central repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a case where an optional operator can not, or doesn't want to, ship their CLI through the central index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the central index which would remove the requirement from the user to have access and be logged into a cluster when she wants to list or install plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cli-manager will be run within a cluster - so yes, users will have to be logged into a cluster to list or install CLI plugins. This way users will know they are using the CLI version that is known good with whatever version their cluster is. It will be possible to install CLIs outside a cluster, but not through cli-manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I said The cli-manager will be run within a cluster
that's not what I meant, really - each cluster will have its set of ClusterCLI CRs - those hold the the known-good CLIs (compatible or latest version, etc) for that cluster. oc
will access those when connected to a cluster. Also, I've updated this proposal to move away from cli-manager
since what we're actually proposing is extending/adding to oc
something like oc clustercli list|search|install
enhancements/cli_manager.md
Outdated
|
||
Two routes for index: | ||
1. Central index that has links to where artifacts are stored | ||
2. Central repository where all artifacts are stored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the existing mirror.openshift?
https://mirror.openshift.com/pub/openshift-v4/clients/
CLIs are already being published there today by the CLI creators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that info.
598c515
to
8f8ee7e
Compare
@smarterclayton ok to merge this now? Proposal is to keep current downloads (with new CRD instead of consol-cli-downloads) available via fileserver and adding option to install tools via oc (oc image extract logic and obtaining artifact mapping artifact info from CR) |
### Goals | ||
|
||
Each component wishing to provide customers with their binaries will build and publish artifacts via an official channel to a central index. | ||
Each component wishing to provide customers with their binaries will provide a ClusterCLI CR and will also provide a mechanism (controller) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what this means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll clarify that. Maybe this is better
Each component wishing to provide customers with binaries will create a clustercli custom resource to provide an image name and the file path within that image for the binaries. Also a controller to manage that custom resource may be added (to at least ensure that CR exists? or not). The CLIs currently offered via console-cli-downloads will be included in the reference implementation of this enhancement . oc will gather clusterclis from the cluster, and also the fileserver will offer the binaries via the console by mounting the binaries from the location/image in each custom resource.
As a user, I want a CLI manager for various CLIs available for OpenShift and related services so that I can discover, install and list them | ||
The user will invoke the following commands: | ||
|
||
* `oc clustercli list` to view installed binaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of clustercli
. Also, why do we need search? What is the difference between list and search?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need search, i'll update
the crd name is currently clusterclis.config.openshift.io
but the oc
command can be whatever. clustercli
captures the idea that these are clis offered from custom resources in a cluster, but it can be changed when i wire this into/create a new command for oc, haven't looked at that yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh list
was to view the binaries installed on one's system (at a known or given location) while search
is to list available CLIs from cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's confusing though, don't need search, removing it
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JAORMX, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@smarterclayton ok to remove the hold on this and merge? As it's written now, this will be a mechanism to extract and un-compress supported clis from either the release payload or supported image registry to a designated location on a local system. |
reviewers: | ||
- "@soltysh" | ||
approvers: | ||
- "@soltysh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add @spadgett as an approver here.
I'm not sure I fully understood what or if there would be a migration path from the existing, console shipped resource to the other and if we're going to commit to supporting both for a time since we already have a published CRD for this. Or why we wouldn't just repurpose that resource with links pointing in cluster for anything not currently doing it. @spadgett will need to be involved with that.
(we're currently providing in-cluster downloads for each platform's oc
client here right, Sam?)
Same for how we evolve the cli-downloads
artifact we currently ship that supports those in-cluster downloads.
Overall I like the idea of shipping via images and providing it all in cluster to support the disconnected experience 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @jhadvig - console operator maintainer :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been on the back burner for quite awhile. I'll add a migration path, but yes, will be a seamless transition, and the CRD should be repurposed. The add is that for supported CLIs (those currently offered via cli-downloads) there will be an image (within release payload? as oc
currently is) that will allow access to binaries from mirrored images if disconnected. I'll give this enhancement an update in the coming days, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might start out as a cli plugin w/ a configurable list of cli images. again, will give this some thought and update this proposal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep in mind that we'll want a corresponding user experience via the console. Any logic you put in the plugin either needs to be in a sharable library or API or we'll end up having to duplicate the logic in the UI. Thanks!!
|
||
##### example: | ||
``` | ||
$ oc clustercli list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we need also a column showing what is the recommended version of the CLI to be used for the target cluster. That will help the users to figure out if they must upgrade some of their clients and to use the CLI matching the current cluster version.
How do you plan to check INSTALLED
as that implies that you execute a command to check on the machine if the the CLI binary is present under by example $HOME/openshift/clients/cli1
?
Will the user be informed that they must include a new path to access the CLIs (e.g $HOME/openshift/clients/) ?
Do you plan to support to install several versions of the same client or only one (easier to maintain) ?
How do you plan to set the UID/GROUPID of the user connected to the machine to define the correct owner (e.g. chown user1:group1 $HOME/openshift/clients/cli1) ?
The user will invoke the following commands: | ||
|
||
* `oc clustercli list` will access the connected OpenShift cluster, if connected, and will retrieve information about available CLIs (clusterCLI CRs) | ||
* `oc clustercli install odo` will install `odo` to a user's home directory, as a standalone binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be great to have a command such as oc clustercli install kubetools
able to install the recommended tools: helm, kubectl, oc, odo, k9s, ... - WDYT ?
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Is this still to be implemented? We'd still like to integrate with this :) |
The OpenShift Tools Installer (https://github.com/redhat-actions/openshift-tools-installer) has shown it's possible to dynamically scan mirror & github to build a list of all the current clis and their download URLs by OS. I've been playing with this data since it seems like we should be able to automate or simplify this w/o requiring each tool to provide a custom image or contribute to an index. Likewise, the same tool could support offline/cluster-provided clis vs latest install. |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Interested to leverage this for OADP (OpenShift API for Data Protection) when it's available. |
@jwmatthews I am working on a poc here, and will keep you updated: https://github.com/sallyom/clustercli I'm only now getting back to this. I'll be updating this and and the poc this week, stay tuned. |
Rotten enhancement proposals close after 7d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Reopen the proposal by commenting /close |
@openshift-bot: Closed this PR. In response to this:
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. |
@sallyom I see this was closed recently, should the stale lifecycle be removed and this reopened? |
@deejross is working on a new version of this enhancement |
@soltysh
/cc @bparees
/cc @jwforres