troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

[Epic] Consolidated CLI for Troubleshoot

Open xavpaice opened this issue 2 years ago • 0 comments

Goal

The current Troubleshoot project ships command line tools for support-bundle, preflight, analyze and collect. These have a large amount of common functionality with code duplication, plus inconsistent command line switches and syntax.

The proposal is to create a single CLI tool with subcommands for each function, which can be implemented using Krew, to simplify usage and maintenance of the project.

Additionally, the consolidate of sbctl in #882 adds the need for a CLI tool to initiate sbctl, which would end up as a subcommand.

An additional, but no less important, part of this is that the way other projects including KOTS and kURL import Troubleshoot is not using a stable public API, resulting in risk of breaking changes and additional complexity when working within the Troubleshoot code. A consolidated CLI would be a good starting point to arrange for a stable public API which other projects can use long term.

Design Proposal

Private: working backwards doc

  • [ ] #934

Definition of done

  • [ ] One CLI entrypoint with subcommands for support-bundle, collect, analyze, redact, preflight and sbctl
  • [ ] All CLI subcommands call a stable public API which is also available for other projects to import
  • [ ] #1251
  • [ ] Docs/examples in docs.replicated.com are updated with the new CLI
  • [ ] Ensure KOTS, Vendor Portal and any other project we discover uses the new API
  • [ ] Vendor portal provides instructions using the new CLI

Subtasks

  • [x] #89
  • [ ] https://github.com/replicatedhq/sbctl/issues/26
  • [ ] #882
  • [x] https://github.com/replicatedhq/troubleshoot/issues/883
  • [ ] https://github.com/replicatedhq/troubleshoot/issues/877
  • [ ] #789
  • [ ] #1134
  • [ ] #1248
  • [ ] Create "troubleshoot inspect" subcommand to succeed the "sbctl" command
  • [ ] Create "troubleshoot preflight" subcommand to succeed the "preflight" command
  • [ ] Create "troubleshoot redact" subcommand to succeed the "redact" command
  • [ ] Create "troubleshoot analyze" subcommand to succeed the "analyze" command

Started

  • [ ]

Planned

  • [ ]

xavpaice avatar Dec 29 '22 00:12 xavpaice