Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

🧙 POC: Implements wizard command for unmanaged-cluster #4212

Closed
wants to merge 1 commit into from

Conversation

jpmcb
Copy link
Contributor

@jpmcb jpmcb commented Apr 26, 2022

Summary

Include a proof of concept wizard command in the unmanaged-cluster plugin which provides an interactive terminal user interface for bootstrapping clusters and gain community feedback.

Fixes: #3588

Motivation

In addition to the Guided Graphical UI in #3235, users need a terminal based wizard. At a high level, this should walk users through bootstrapping cluster, right in the CLI.

Sure, cool. But why?

Some users don't have access to a web browser (like in a headless environment or when on a remote server). Or their network configuration won't allow for easily tunneling a request to their bootstrapping machine (like deploying through a jumpbox). In short, we should make deploying a cluster as simple as possible via the CLI.

This PR implements that proof of concept in unmanaged-cluster and includes 3 options: cluster name, number of worker nodes, & number of control plane nodes

🔉 Demo Video

um-wizard.mp4

Goals

  • Bootstrap unmanaged-clusters using options configured interactively in the CLI

Non-goals

  • Create 1 to 1 parity of options with the browser based GUI
  • Bootstrap managed-clusters
  • Create a separate wizard plugin
User Story 1: Configuration
  • User can configure unmanaged-cluster name for cluster via typing their prefered cluster name in the TUI.
  • User can configure unmanaged-cluster number of worker nodes via typing their preferred node count in the TUI
  • User can configure unmanaged-cluster number of control plane nodes via typing their preferred control plane node count in the TUI
User Story 2: Validation (still to do)
  • User receives immediate feedback on their inputs given constraints of unmanaged-cluster:
    • If user provides no name in TUI user is interactively prompted to provide a name.

Graduation details

This POC is ready to go and would be an ok starting point to get community feedback. Otherwise, we can iterate here and add more configuration options and features as we go.

Looking for feedback on this as well.

Implementation details

This rough POC uses bubble and bubbletea for the TUI control flow and interactive components. Note the additions to the go.mod and go.sum

Describe testing done for PR

tanzu unmanaged-cluster wizard

Appendix / useful terms

Useful examples in other CLIs & inspiration:

( ⬇️ go ahead and give this a thumbs up / thumbs down to reflect your thoughts here!)

Signed-off-by: John McBride <jmcbride@vmware.com>
@davidvonthenen
Copy link
Contributor

Dude yes!!!! I love this!!!

@garrying
Copy link
Contributor

Really into this!

@joshrosso
Copy link
Contributor

joshrosso commented Apr 27, 2022

This is really awesome!

Based on the demo, I wonder if:

  1. wizard should not actually trigger bootstrapping, but instead be a way to generate a proper config file. I’d be open to it prompting to jump right into bootstrapping, but this decoupling seems good for us.
  2. wizard should not be another command (thus having 2 ways to create a cluster and 2 ways to configure a cluster) but instead be a flag on the existing configure command.

@RussellHamker
Copy link

Looks great. Really love the idea of having a terminal wizard! Keep up the great work.

@garrying
Copy link
Contributor

A thought while I stepped through the POC: I wonder if there should be messaging to help users know how to escape from the wizard. ctrl-cing doesn't escape (was my initial intuition), while esc does.

@jpmcb
Copy link
Contributor Author

jpmcb commented May 6, 2022

ctrl-cing doesn't escape (was my initial intuition), while esc does.

Sure thing, that actually wouldn't be difficult to also add as functionality alongside <esc> 👍🏼

@joshrosso joshrosso removed the area/cli label Jun 7, 2022
@jdumars jdumars closed this Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Introduce wizard bootstrapping plugin
7 participants