vmware-tanzu / tanzu-framework

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.
Apache License 2.0
197 stars 194 forks source link

Tanzu Version Manager #2324

Open karuppiah7890 opened 2 years ago

karuppiah7890 commented 2 years ago

Describe the feature request

Tanzu Version Manager similar to other version management tools like rvm for Ruby, nvm for NodeJS, gvm for Golang

Describe alternatives you've considered

Install the version of tanzu I want to use and then later reinstall different version when I want to use different version

Affected product area (please put an X in all that apply)

Additional context

vuil commented 1 year ago

Thanks for the submission @karuppiah7890 . Can you provide more details? Do you have recommendations for the CLI UX for this functionality?

marckhouzam commented 1 year ago

An approach to this would be to use the ASDF project (https://asdf-vm.com/ or https://github.com/asdf-vm/asdf). It is a generic version manager that supports a lot of different tools. I use it to handle multiple versions of Go for example. It allows me to use one version of Go globally, and a different version within specific directories or shells. Specifically, I have go 1.18 installed globally but transparently use go 1.17 when I'm in the tanzu-framework.

In fact, there is an issue on TCE about packaging it for ASDF: https://github.com/vmware-tanzu/community-edition/issues/5025

marckhouzam commented 1 year ago

The context-aware plugin document seems to imply that we would like to reach a point where a single version of the Tanzu core CLI would work with any context/plugin. See this section https://github.com/vmware-tanzu/tanzu-framework/blob/main/docs/design/context-aware-plugin-discovery-design.md#version-compatibility.

If that is the target then there should be no need for a version manager. The CLI Core would instead make every effort to remain backward-compatible, allowing users to use the same recent version of the CLI all the time.