github.com/hernad/nomad@v1.6.112/command/operator_autopilot.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package command 5 6 import ( 7 "strings" 8 9 "github.com/mitchellh/cli" 10 ) 11 12 type OperatorAutopilotCommand struct { 13 Meta 14 } 15 16 func (c *OperatorAutopilotCommand) Name() string { return "operator autopilot" } 17 18 func (c *OperatorAutopilotCommand) Run(args []string) int { 19 return cli.RunResultHelp 20 } 21 22 func (c *OperatorAutopilotCommand) Synopsis() string { 23 return "Provides tools for modifying Autopilot configuration" 24 } 25 26 func (c *OperatorAutopilotCommand) Help() string { 27 helpText := ` 28 Usage: nomad operator autopilot <subcommand> [options] 29 30 This command groups subcommands for interacting with Nomad's Autopilot 31 subsystem. Autopilot provides automatic, operator-friendly management of Nomad 32 servers. The command can be used to view or modify the current Autopilot 33 configuration. For a full guide see: https://www.nomadproject.io/guides/autopilot.html 34 35 Get the current Autopilot configuration: 36 37 $ nomad operator autopilot get-config 38 39 Set a new Autopilot configuration, enabling automatic dead server cleanup: 40 41 $ nomad operator autopilot set-config -cleanup-dead-servers=true 42 43 Please see the individual subcommand help for detailed usage information. 44 ` 45 return strings.TrimSpace(helpText) 46 }