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 root/leaf distinction to tsh clusters #4965

Closed
webvictim opened this issue Nov 21, 2020 · 6 comments · Fixed by #5051
Closed

Add root/leaf distinction to tsh clusters #4965

webvictim opened this issue Nov 21, 2020 · 6 comments · Fixed by #5051
Assignees
Labels
good-starter-issue Good starter issue to start contributing to Teleport tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ux

Comments

@webvictim
Copy link
Contributor

webvictim commented Nov 21, 2020

Feature Request

tsh clusters doesn't give much useful information at the moment compared to the web UI (which tells you root vs leaf). It also doesn't immediately tell you at a glance what cluster you're logged into.

~ » tsh clusters
Cluster Name                  Status 
----------------------------- ------ 
ip-172-31-52-229-ec2-internal online 
ip-172-31-49-164-ec2-internal online 

Maybe we could improve it to something like this?

~ » tsh clusters
Cluster Name                  Status Cluster Type Active
----------------------------- ------ ------------ ------
ip-172-31-52-229-ec2-internal online root         
ip-172-31-49-164-ec2-internal online leaf         *

Could be a -v flag or just more information by default.

Motivation

Easier to use tsh from the command line.

Who's it for?

OSS User, Pro, Enterprise

@klizhentas klizhentas added the ux label Nov 21, 2020
@klizhentas klizhentas added this to the 5.1 "San Diego" milestone Nov 21, 2020
@klizhentas
Copy link
Contributor

great idea, we should do it in 5.1

@russjones russjones added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Nov 24, 2020
@russjones russjones added the good-starter-issue Good starter issue to start contributing to Teleport label Dec 1, 2020
@andrejtokarcik
Copy link
Contributor

What is the preferred terminology here? The code seems to prefer to use the terms "local/remote cluster" for what the docs tend to call "root/leaf cluster".

@webvictim
Copy link
Contributor Author

root and leaf is the preferred terminology now.

@andrejtokarcik
Copy link
Contributor

This question from the associated PR doesn't seem to have been properly answered yet: When indicating the active cluster, should we prefer

Cluster Name                  Status Cluster Type Active
----------------------------- ------ ------------ ------
ip-172-31-52-229-ec2-internal online root         
ip-172-31-49-164-ec2-internal online leaf         *

or rather (similar to, e.g., tsh status)

   Cluster Name                  Status Cluster Type
   ----------------------------- ------ ------------
   ip-172-31-52-229-ec2-internal online root
>  ip-172-31-49-164-ec2-internal online leaf

@webvictim
Copy link
Contributor Author

webvictim commented Dec 22, 2020

Personally I'd go with the second style to keep similarity with tsh status, but the decision is @benarent's.

@benarent
Copy link
Contributor

benarent commented Jan 4, 2021

We recently added something similar tsh kube ls can be used to select and obtain kubectl creds for Kubernetes clusters. I would use the same UX for consistency. As we expand this pattern of listing and selecting we should come back and review best practices for this specific pattern. Sorry for the delay on this and Happy New Year!

Example tsh kube ls

tsh kube ls
Kube Cluster Name        Selected
------------------------ --------
asteroid-sun.teleport.sh *
do-teleport-cloud
gke-teleport-cloud

Proposed Tweak to CLI UX

Cluster Name                  Status Cluster Type Selected
----------------------------- ------ ------------ ------
ip-172-31-52-229-ec2-internal online root         
ip-172-31-49-164-ec2-internal online leaf         *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-starter-issue Good starter issue to start contributing to Teleport tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants