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