Files
nomad/command/setup.go
Piotr Kazmierczak d69a1238cd cli: consul setup command (#18820)
An interactive setup helper for configuring Consul to accept Nomad WI-enabled workloads.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-11-02 09:02:07 +01:00

40 lines
940 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"strings"
"github.com/mitchellh/cli"
)
type SetupCommand struct {
Meta
}
// Help satisfies the cli.Command Help function.
func (c *SetupCommand) Help() string {
helpText := `
Usage: nomad setup <subcommand> [options] [args]
This command groups helper subcommands used for setting up external tools.
Setup Consul for Nomad:
$ nomad setup consul -y
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
// Synopsis satisfies the cli.Command Synopsis function.
func (c *SetupCommand) Synopsis() string { return "Interact with setup helpers" }
// Name returns the name of this command.
func (c *SetupCommand) Name() string { return "setup" }
// Run satisfies the cli.Command Run function.
func (c *SetupCommand) Run(_ []string) int { return cli.RunResultHelp }