Skip to content

Commit

Permalink
cluster: make experimental features more visiblely marked
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis committed Dec 10, 2020
1 parent 9e5f2bd commit 5bb5a04
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
7 changes: 5 additions & 2 deletions components/cluster/command/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ func newCleanCmd() *cobra.Command {

cmd := &cobra.Command{
Use: "clean <cluster-name>",
Short: "Cleanup a specified cluster",
Long: `Cleanup a specified cluster without destroying it (experimental).
Short: "(EXPERIMENTAL) Cleanup a specified cluster",
Long: `EXPERIMENTAL: This is an experimental feature, things may or may not work,
please backup your data before process.
Cleanup a specified cluster without destroying it.
You can retain some nodes and roles data when cleanup the cluster, eg:
$ tiup cluster clean <cluster-name> --all
$ tiup cluster clean <cluster-name> --log
Expand Down
2 changes: 1 addition & 1 deletion components/cluster/command/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func newDeploy() *cobra.Command {
}

cmd.Flags().StringVarP(&opt.User, "user", "u", utils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.")
cmd.Flags().BoolVarP(&opt.SkipCreateUser, "skip-create-user", "", false, "Skip creating the user specified in topology (experimental).")
cmd.Flags().BoolVarP(&opt.SkipCreateUser, "skip-create-user", "", false, "(EXPERIMENTAL) Skip creating the user specified in topology.")
cmd.Flags().StringVarP(&opt.IdentityFile, "identity_file", "i", opt.IdentityFile, "The path of the SSH identity file. If specified, public key authentication will be used.")
cmd.Flags().BoolVarP(&opt.UsePassword, "password", "p", false, "Use password of target hosts. If specified, password authentication will be used.")
cmd.Flags().BoolVarP(&opt.IgnoreConfigCheck, "ignore-config-check", "", opt.IgnoreConfigCheck, "Ignore the config check result")
Expand Down
4 changes: 2 additions & 2 deletions components/cluster/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ func init() {
// start/stop operations is 90s, the default value of this argument is better be longer than that
rootCmd.PersistentFlags().Uint64Var(&gOpt.OptTimeout, "wait-timeout", 120, "Timeout in seconds to wait for an operation to complete, ignored for operations that don't fit.")
rootCmd.PersistentFlags().BoolVarP(&skipConfirm, "yes", "y", false, "Skip all confirmations and assumes 'yes'")
rootCmd.PersistentFlags().BoolVar(&gOpt.NativeSSH, "native-ssh", gOpt.NativeSSH, "Use the native SSH client installed on local system instead of the build-in one (experimental).")
rootCmd.PersistentFlags().StringVar((*string)(&gOpt.SSHType), "ssh", "", "(experimental) The executor type: 'builtin', 'system', 'none'.")
rootCmd.PersistentFlags().BoolVar(&gOpt.NativeSSH, "native-ssh", gOpt.NativeSSH, "(EXPERIMENTAL) Use the native SSH client installed on local system instead of the build-in one.")
rootCmd.PersistentFlags().StringVar((*string)(&gOpt.SSHType), "ssh", "", "(EXPERIMENTAL) The executor type: 'builtin', 'system', 'none'.")
_ = rootCmd.PersistentFlags().MarkHidden("native-ssh")

rootCmd.AddCommand(
Expand Down
2 changes: 1 addition & 1 deletion components/cluster/command/scale_out.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func newScaleOutCmd() *cobra.Command {
}

cmd.Flags().StringVarP(&opt.User, "user", "u", utils.CurrentUser(), "The user name to login via SSH. The user must has root (or sudo) privilege.")
cmd.Flags().BoolVarP(&opt.SkipCreateUser, "skip-create-user", "", false, "Skip creating the user specified in topology (experimental).")
cmd.Flags().BoolVarP(&opt.SkipCreateUser, "skip-create-user", "", false, "(EXPERIMENTAL) Skip creating the user specified in topology.")
cmd.Flags().StringVarP(&opt.IdentityFile, "identity_file", "i", opt.IdentityFile, "The path of the SSH identity file. If specified, public key authentication will be used.")
cmd.Flags().BoolVarP(&opt.UsePassword, "password", "p", false, "Use password of target hosts. If specified, password authentication will be used.")
cmd.Flags().BoolVarP(&opt.NoLabels, "no-labels", "", false, "Don't check TiKV labels")
Expand Down
6 changes: 4 additions & 2 deletions components/dm/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ func init() {
}

rootCmd = &cobra.Command{
Use: cliutil.OsArgs0(),
Short: "Deploy a DM cluster (experimental)",
Use: cliutil.OsArgs0(),
Short: "(EXPERIMENTAL) Deploy a DM cluster",
Long: `EXPERIMENTAL: This is an experimental feature, things may or may not work,
please backup your data before process.`,
SilenceUsage: true,
SilenceErrors: true,
Version: version.NewTiUPVersion().String(),
Expand Down

0 comments on commit 5bb5a04

Please sign in to comment.