1package command
2
3import (
4	"strings"
5
6	"github.com/mitchellh/cli"
7)
8
9type SentinelCommand struct {
10	Meta
11}
12
13func (f *SentinelCommand) Help() string {
14	helpText := `
15Usage: nomad sentinel <subcommand> [options] [args]
16
17  This command groups subcommands for interacting with Sentinel policies.
18  Sentinel policies allow operators to express fine-grained policies as code and
19  have their policies automatically enforced. This allows operators to define a
20  "sandbox" and restrict actions to only those compliant with policy. The
21  Sentinel integration builds on the ACL System. Users can read existing
22  Sentinel policies, create new policies, delete and list existing policies, and
23  more. For a full guide on Sentinel policies see:
24  https://www.nomadproject.io/guides/sentinel-policy.html
25
26  Read an existing policy:
27
28      $ nomad sentinel read <name>
29
30  List existing policies:
31
32      $ nomad sentinel list
33
34  Create a new Sentinel policy:
35
36      $ nomad sentinel apply <name> <path>
37
38  Please see the individual subcommand help for detailed usage information.
39`
40
41	return strings.TrimSpace(helpText)
42}
43
44func (f *SentinelCommand) Synopsis() string {
45	return "Interact with Sentinel policies"
46}
47
48func (f *SentinelCommand) Name() string { return "sentinel" }
49
50func (f *SentinelCommand) Run(args []string) int {
51	return cli.RunResultHelp
52}
53