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