cli

package
v0.0.0-...-3bfe646 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(g *Application) error

Types

type Application

type Application struct {
	*cli.Application
	// InstallCmd is the extended "gravity install" command
	InstallCmd InstallCmd
	// StatusCmd is the extended "gravity status" command
	StatusCmd StatusCmd
	// UpdateDownloadCmd manages new app versions downloads
	UpdateDownloadCmd UpdateDownloadCmd
	// OpsGenerateCmd generates a standalone installer via an Ops Center
	OpsGenerateCmd OpsGenerateCmd
	// TunnelCmd combines support tunnel related subcommands
	TunnelCmd TunnelCmd
	// TunnelEnableCmd turns remote support on
	TunnelEnableCmd TunnelEnableCmd
	// TunnelDisableCmd turns remote support off
	TunnelDisableCmd TunnelDisableCmd
	// TunnelStatusCmd shows remote support status
	TunnelStatusCmd TunnelStatusCmd
	// LicenseCmd combines subcommands for licenses
	LicenseCmd LicenseCmd
	// LicenseInstallCmd installs license into cluster
	LicenseInstallCmd LicenseInstallCmd
	// LicenseNewCmd generates new license
	LicenseNewCmd LicenseNewCmd
	// LicenseShowCmd displays currently installed license
	LicenseShowCmd LicenseShowCmd
}

Application is the extended gravity CLI application

func RegisterCommands

func RegisterCommands(app *kingpin.Application) *Application

type InstallCmd

type InstallCmd struct {
	*cli.InstallCmd
	// License is app license
	License *string
	// LicenseFile is path to the license file.
	LicenseFile *string
	// OpsAdvertiseAddr is advertise address for Ops Center
	//
	// TODO(r0mant): REMOVE IN 7.0. This flag is obsolete.
	OpsAdvertiseAddr *string
	// HubAdvertiseAddr is advertise address of Gravity Hub
	HubAdvertiseAddr *string
	// OperationID is existing operation ID
	OperationID *string
	// OpsCenterURL is remote Ops Center URL
	OpsCenterURL *string
	// OpsCenterToken is remote Ops Center token
	OpsCenterToken *string
	// OpsCenterTunnelToken is remote Ops Center gatekeeper token
	OpsCenterTunnelToken *string
	// OpsCenterSNIHost is remote Ops Center SNI host
	OpsCenterSNIHost *string
}

InstallCmd is the extended "gravity install" command

type InstallConfig

type InstallConfig struct {
	// InstallConfig is the open-source installer CLI config
	cli.InstallConfig
	// License is the cluster License
	License string
	// LicenseFile is the path to the license file
	LicenseFile string
	// OpsAdvertiseAddr is the advertise address configuration for Ops Center
	OpsAdvertiseAddr string
	// RemoteOpsURL is the URL of the remote Ops Center
	RemoteOpsURL string
	// RemoteOpsToken is the auth token of the remote Ops Center
	RemoteOpsToken string
	// OperationID is the existing operation ID when installing via Ops Center
	OperationID string
	// OpsTunnelToken is the token used to connect to remote Ops Center
	OpsTunnelToken string
	// OpsSNIHost is the remote Ops Center SNI host
	OpsSNIHost string
}

InstallConfig extends the open-source installer CLI config

func NewInstallConfig

func NewInstallConfig(env *localenv.LocalEnvironment, g *Application) (*InstallConfig, error)

NewInstallConfig creates install config from the passed CLI args and flags

func (*InstallConfig) LicenseFilePath

func (i *InstallConfig) LicenseFilePath() (string, error)

LicenseFilePath returns path to the license file used for installation.

func (*InstallConfig) NewInstallerConfig

func (i *InstallConfig) NewInstallerConfig(env *localenv.LocalEnvironment, wizard *localenv.RemoteEnvironment, process process.GravityProcess) (*install.Config, error)

NewInstallerConfig returns new installer configuration for this configuration object

func (*InstallConfig) NewProcessConfig

func (i *InstallConfig) NewProcessConfig() (*processconfig.Config, error)

NewProcessConfig returns new gravity process configuration for this configuration object

type LicenseCmd

type LicenseCmd struct {
	*kingpin.CmdClause
}

LicenseCmd combines subcommands for licenses

type LicenseInstallCmd

type LicenseInstallCmd struct {
	*kingpin.CmdClause
	// Path is license file path
	Path *string
}

LicenseInstallCmd installs license into cluster

type LicenseNewCmd

type LicenseNewCmd struct {
	*kingpin.CmdClause
	// MaxNodes is permitted cluster size
	MaxNodes *int
	// ValidFor is license validity period
	ValidFor *string
	// StopApp stops app when license expires
	StopApp *bool
	// CACert is certificate authority certificate
	CACert *string
	// CAKey is certificate authority private key
	CAKey *string
	// EncryptionKey is encryption key to encode
	EncryptionKey *string
	// CustomerName is name of customer the license is for
	CustomerName *string
	// CustomerEmail is email of customer the license is for
	CustomerEmail *string
	// CustomerMetadata is additional metadata
	CustomerMetadata *string
	// ProductName is product the license is for
	ProductName *string
	// ProductVersion is product the license is for
	ProductVersion *string
}

LicenseNewCmd generates new license

type LicenseShowCmd

type LicenseShowCmd struct {
	*kingpin.CmdClause
	// Output is output format
	Output *constants.Format
}

LicenseShowCmd displays installed license

type OpsGenerateCmd

type OpsGenerateCmd struct {
	*kingpin.CmdClause
	// Package is app locator
	Package *loc.Locator
	// Dir is the directory where installer files will be written to
	Dir *string
	// CACert is certificate authority to put into installer
	CACert *string
	// EncryptionKey encrypts installer packages
	EncryptionKey *string
	// OpsCenterURL is the operator service URL
	OpsCenterURL *string
}

OpsGenerateCmd generates an installer tarball

type StatusCmd

type StatusCmd struct {
	*cli.StatusCmd
	// Tunnel displays only remote support status
	Tunnel *bool
}

StatusCmd is the extended "gravity status" command

type TunnelCmd

type TunnelCmd struct {
	*kingpin.CmdClause
}

TunnelCmd combines support tunnel related subcommands

type TunnelDisableCmd

type TunnelDisableCmd struct {
	*kingpin.CmdClause
}

TunnelDisableCmd turns remote support off

type TunnelEnableCmd

type TunnelEnableCmd struct {
	*kingpin.CmdClause
}

TunnelEnableCmd turns remote support on

type TunnelStatusCmd

type TunnelStatusCmd struct {
	*kingpin.CmdClause
}

TunnelStatusCmd shows remote support status

type UpdateDownloadCmd

type UpdateDownloadCmd struct {
	*kingpin.CmdClause
	// Every adjusts update check interval
	Every *string
}

UpdateDownloadCmd manages new app version downloads

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL