diff --git a/enhancements/oc/cli_manager.md b/enhancements/oc/cli_manager.md new file mode 100644 index 00000000000..a27305ae91a --- /dev/null +++ b/enhancements/oc/cli_manager.md @@ -0,0 +1,135 @@ +--- +title: cli-manager +authors: + - "@sallyom" +reviewers: + - TBD + - "@soltysh" +approvers: + - TBD + - "@soltysh" +creation-date: 2019-12-03 +last-updated: 2019-12-03 +status: provisional|implementable|implemented|deferred|rejected|withdrawn|replaced +--- + +# cli-manager + +## Release Signoff Checklist + +- [ ] Enhancement is `implementable` +- [ ] Design details are appropriately documented from clear requirements +- [ ] Test plan is defined +- [ ] Graduation criteria for dev preview, tech preview, GA +- [ ] User-facing documentation is created in [openshift-docs](https://github.com/openshift/openshift-docs/) + +## Open Questions [optional] + +Will CLI manager be supported in disconnected environments? Currently, we provide disconnected environments +cli-artifacts and oc download links that do not require anything outside their cluster. What tools/plugins +need to be managed in disconnected? + +What CLIs will be managed? +Where will binaries be published? +[Signing binaries for macOS Catalina](https://developer.apple.com/news/?id=09032019a) +[related to above, Go toolchain issue with macOS Catalina](https://github.com/golang/go/issues/34986) + +## Summary + +This document is a proposal for a component to manage various tools available for OpenShift and related services. +A CLI manager is desired so that a user can discover, install and upgrade tools easily and from a single +location. Each component is responsible for serving their files and registering information regarding supplied binaries +to a central official location. The CLI manager will reach out to the central place and retrieve all the binaries from there. +Similarly, [kubectl plugin manager](https://github.com/GoogleContainerTools/krew/) has an [index](https://github.com/kubernetes-sigs/krew-index) +to maintain all known krew plugins. + +## Motivation + +As more services are created on top of OpenShift, more CLIs are introduced to simplify interaction with these services. +Some current examples are oc, kubectl, odo, istio, tekton, and knative. It is difficult for users to discover what tools exist, +where to download them from and which version they should download. We need to simplify as much as possible the interaction +of services on OpenShift. This is the motivation for the CLI manager. + +### Goals + +Each component wishing to provide customers with their binaries will build and publish them via an official channel to an +index location from which the CLI manager will obtain the files. + +The CLI manager will: +- List available CLI plugins - their latest version and/or the installed version +- Install appropriate versions of a chosen CLI for a given cluster +- Update installed version of a given CLI if/when updates become available + +CLIs to manage: +- **openshift-install** OpenShift Installer +- **kubectl** Kubernetes +- **oc** OpenShift +- **odo** OpenShift Developer +- **kn** Knative +- **tkn** Tekton + +### Non-Goals + +CLI manager will not build or serve the binaries. It will know where to find them. + +## Proposal + + +### User Stories [optional] + +#### Story 1 + +As a user, I want a CLI manager for various CLIs available for OpenShift and related services so that I can discover, install and upgrade them + +##### example: +``` +$ openshift-cli addons list +NAME DESC LATEST INSTALLED +----- ----- ----- ----- +openshift-installer OpenShift Installer CLI 4.4 4.3 +kubectl Kubernetes CLI 1.15 1.13 +oc OpenShift CLI 4.4 4.3 +odo OpenShift Developer CLI 1.0 Not Installed +kn Knative CLI 1.0 Not Installed +tkn Tekton CLI 1.0 Not Installed + + +$ openshift-cli addons install odo +$ openshift-cli addons install kn +$ openshift-cli addons update oc +$ openshift-cli addons remove kn +``` +## Design Details + +### Test Plan + +### Graduation Criteria + +#### Examples + +These are generalized examples to consider, in addition to the aforementioned +[maturity levels][maturity-levels]. + +##### Dev Preview -> Tech Preview + +##### Tech Preview -> GA + +### Upgrade / Downgrade Strategy + +### Version Skew Strategy + +## Implementation History + +## Drawbacks + +## Alternatives + +Other tools currently available: +- [kubectl plugin manager](https://github.com/GoogleContainerTools/krew/) - manages kubectl plugins + +- ["Uc" PoC by Hiram](https://github.com/chirino/uc) - manages Kubernetes CLI clients + +## Infrastructure Needed [optional] + +- new repository - openshift/cli-manager +- new CI repository onboarded