Documentation
¶
Index ¶
- Constants
- Variables
- func AborterForMode(serviceName, mode string, env *localenv.LocalEnvironment) func(context.Context) error
- func BootstrapSELinuxAndRespawn(ctx context.Context, config libselinux.BootstrapConfig, printer utils.Printer) error
- func ConfigureEnvironment() error
- func ConfigureNoProxy()
- func DebugReportPath() (path string)
- func Execute(g *Application, cmd string, extraArgs []string) (err error)
- func InitAndCheck(g *Application, cmd string) error
- func InstallerCleanup(serviceName string) error
- func InstallerClient(env *localenv.LocalEnvironment, config installerclient.Config) error
- func InstallerCompleteOperation(serviceName string, env *localenv.LocalEnvironment) installerclient.CompletionHandler
- func InstallerGenerateLocalReport(env *localenv.LocalEnvironment) func(context.Context, string) error
- func Locator(s kingpin.Settings) *loc.Locator
- func NewDefaultClusterOperationHandler(factory LocalEnvironmentFactory) gravity.ClusterOperationHandler
- func NewInstallerConnectStrategy(env *localenv.LocalEnvironment, config InstallConfig, ...) (strategy *installerclient.InstallerStrategy, err error)
- func NewServiceListener(socketPath string) (net.Listener, error)
- func Run(g *Application) (err error)
- func SwitchPrivileges(uid, gid int) error
- func TerminationHandler(interrupt *signals.InterruptHandler, printer utils.Printer)
- type APIKeyCmd
- type APIKeyCreateCmd
- type APIKeyDeleteCmd
- type APIKeyListCmd
- type AppCmd
- type AppDeleteCmd
- type AppExportCmd
- type AppHistoryCmd
- type AppHookCmd
- type AppImportCmd
- type AppIndexCmd
- type AppInfo
- type AppInstallCmd
- type AppListCmd
- type AppPackageCmd
- type AppPackageListCmd
- type AppPackageUninstallCmd
- type AppPullCmd
- type AppPushCmd
- type AppRebuildIndexCmd
- type AppRollbackCmd
- type AppSearchCmd
- type AppStatusCmd
- type AppSyncCmd
- type AppUninstallCmd
- type AppUnpackCmd
- type AppUpgradeCmd
- type Application
- func (g *Application) NewInstallEnv() (env *localenv.LocalEnvironment, err error)
- func (g *Application) NewJoinEnv(stateDir string) (*localenv.LocalEnvironment, error)
- func (g *Application) NewLocalEnv() (env *localenv.LocalEnvironment, err error)
- func (g *Application) NewUpdateEnv() (*localenv.LocalEnvironment, error)
- type AutoJoinCmd
- type BackupCmd
- type CheckCmd
- type ClusterInfo
- type CmdExecer
- type Dimensions
- type EnterCmd
- type ExecCmd
- type Executable
- type GarbageCollectCmd
- type GarbageCollectPlanCmd
- type InstallCmd
- type InstallConfig
- func (i *InstallConfig) Apply(cluster storage.Site, operation storage.SiteOperation)
- func (i *InstallConfig) BootstrapSELinux(ctx context.Context, printer utils.Printer) error
- func (i *InstallConfig) CheckAndSetDefaults(validator resources.Validator) (err error)
- func (i *InstallConfig) NewInstallerConfig(env *localenv.LocalEnvironment, wizard *localenv.RemoteEnvironment, ...) (*install.Config, error)
- func (i *InstallConfig) NewProcessConfig() (*processconfig.Config, error)
- func (i *InstallConfig) RunLocalChecks() error
- type InstallPlanCmd
- type InstallPlanDisplayCmd
- type JoinCmd
- type JoinConfig
- type LeaveCmd
- type LocalEnvironmentFactory
- type LocalSiteCmd
- type OpsAgentCmd
- type OpsCmd
- type OpsConnectCmd
- type OpsDisconnectCmd
- type OpsListCmd
- type PackCmd
- type PackCommandCmd
- type PackConfigureCmd
- type PackDeleteCmd
- type PackExportCmd
- type PackImportCmd
- type PackLabelsCmd
- type PackListCmd
- type PackPullCmd
- type PackPushCmd
- type PackUnpackCmd
- type PhaseParams
- type PlanCmd
- type PlanCompleteCmd
- type PlanDisplayCmd
- type PlanExecuteCmd
- type PlanResumeCmd
- type PlanRollbackCmd
- type PlanSetCmd
- type PlanetCmd
- type PlanetEnterCmd
- type PlanetStatusCmd
- type RPCAgentCmd
- type RPCAgentDeployCmd
- type RPCAgentInstallCmd
- type RPCAgentRunCmd
- type RPCAgentShutdownCmd
- type RPCAgentStatusCmd
- type RegistryCmd
- type RegistryListCmd
- type RemoveCmd
- type ReportCmd
- type ResourceCmd
- type ResourceCreateCmd
- type ResourceGetCmd
- type ResourceRemoveCmd
- type RestoreCmd
- type ResumeCmd
- type RollbackCmd
- type SetPhaseParams
- type ShellCmd
- type SiteCmd
- type SiteCompleteCmd
- type SiteInfoCmd
- type SiteInitCmd
- type SiteListCmd
- type SiteResetPasswordCmd
- type SiteStartCmd
- type SiteStatusCmd
- type StartCmd
- type StatusClusterCmd
- type StatusCmd
- type StatusHistoryCmd
- type StatusResetCmd
- type StopCmd
- type SystemClusterInfoCmd
- type SystemCmd
- type SystemExportCACmd
- type SystemExportRuntimeJournalCmd
- type SystemGCJournalCmd
- type SystemGCPackageCmd
- type SystemGCRegistryCmd
- type SystemHistoryCmd
- type SystemPullUpdatesCmd
- type SystemReinstallCmd
- type SystemReportCmd
- type SystemRollbackCmd
- type SystemRotateCertsCmd
- type SystemSelinuxBootstrapCmd
- type SystemServiceCmd
- type SystemServiceInstallCmd
- type SystemServiceJournalCmd
- type SystemServiceListCmd
- type SystemServiceStartCmd
- type SystemServiceStatusCmd
- type SystemServiceStopCmd
- type SystemServiceUninstallCmd
- type SystemStateDirCmd
- type SystemStepDownCmd
- type SystemStreamRuntimeJournalCmd
- type SystemTeleportCmd
- type SystemTeleportShowConfigCmd
- type SystemUninstallCmd
- type SystemUpdateCmd
- type TopCmd
- type UpdateCheckCmd
- type UpdateCmd
- type UpdateCompleteCmd
- type UpdatePlanInitCmd
- type UpdateSystemCmd
- type UpdateTriggerCmd
- type UpdateUploadCmd
- type UpgradeCmd
- type UpgradePlanCmd
- type UpgradePlanDisplayCmd
- type UserCmd
- type UserCreateCmd
- type UserDeleteCmd
- type UsersCmd
- type UsersInviteCmd
- type UsersResetCmd
- type VersionCmd
- type WizardCmd
Constants ¶
const ErrorBootstrapSELinuxPolicy = `` /* 246-byte string literal not displayed */
ErrorBootstrapSELinuxPolicy is the error message resulting when bootstrapping step fails.
const ( // NoOperationStateBanner specifies the message for when the operation // cannot be retrieved from the installer process and that the operation // should be restarted NoOperationStateBanner = `` /* 228-byte string literal not displayed */ )
Variables ¶
var InterruptSignals = signals.WithSignals( os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP, )
InterruptSignals lists signals installer service considers interrupts
Functions ¶
func AborterForMode ¶
func AborterForMode(serviceName, mode string, env *localenv.LocalEnvironment) func(context.Context) error
AborterForMode returns the Aborter implementation specific to given installation mode
func BootstrapSELinuxAndRespawn ¶
func BootstrapSELinuxAndRespawn(ctx context.Context, config libselinux.BootstrapConfig, printer utils.Printer) error
BootstrapSELinuxAndRespawn prepares the node for the installation with SELinux support and restarts the process under the proper SELinux context if necessary
func ConfigureEnvironment ¶
func ConfigureEnvironment() error
ConfigureEnvironment updates PATH environment variable to include gravity binary search locations
func ConfigureNoProxy ¶
func ConfigureNoProxy()
ConfigureNoProxy configures the current process to not use any configured HTTP proxy when connecting to any destination by IP address, or a domain with a suffix of .local. Gravity internally connects to nodes by IP address, and by queries to kubernetes using the .local suffix. The side effect is, connections towards the internet by IP address and not a configured domain name will not be able to invoke a proxy. This should be a reasonable tradeoff, because with a cluster that changes over time, it's difficult for us to accuratly detect what IP addresses need to have no_proxy set.
func DebugReportPath ¶
func DebugReportPath() (path string)
DebugReportPath returns the default path for the debug report file
func Execute ¶
func Execute(g *Application, cmd string, extraArgs []string) (err error)
Execute executes the gravity command given with cmd
func InitAndCheck ¶
func InitAndCheck(g *Application, cmd string) error
InitAndCheck initializes the CLI application according to the provided flags and checks that the command is being executed in an appropriate environmnent
func InstallerCleanup ¶
InstallerCleanup uninstalls the services and cleans up operation state
func InstallerClient ¶
func InstallerClient(env *localenv.LocalEnvironment, config installerclient.Config) error
InstallerClient runs the client for the installer service. The client is responsible for triggering the install operation and observing operation progress
func InstallerCompleteOperation ¶
func InstallerCompleteOperation(serviceName string, env *localenv.LocalEnvironment) installerclient.CompletionHandler
InstallerCompleteOperation implements the clean up phase when the installer service shuts down after a successfully completed operation
func InstallerGenerateLocalReport ¶
func InstallerGenerateLocalReport(env *localenv.LocalEnvironment) func(context.Context, string) error
InstallerGenerateLocalReport creates a host-local debug report in the specified file
func NewDefaultClusterOperationHandler ¶
func NewDefaultClusterOperationHandler(factory LocalEnvironmentFactory) gravity.ClusterOperationHandler
NewDefaultClusterOperationHandler creates an instance of the default cluster operation handler
func NewInstallerConnectStrategy ¶
func NewInstallerConnectStrategy(env *localenv.LocalEnvironment, config InstallConfig, commandArgs cli.CommandArgs) (strategy *installerclient.InstallerStrategy, err error)
NewInstallerConnectStrategy returns default installer service connect strategy
func NewServiceListener ¶
NewServiceListener returns a new listener for the installer service
func Run ¶
func Run(g *Application) (err error)
Run parses CLI arguments and executes an appropriate gravity command
func SwitchPrivileges ¶
SwitchPrivileges switches user privileges and executes the same command but with different user id and group id
func TerminationHandler ¶
func TerminationHandler(interrupt *signals.InterruptHandler, printer utils.Printer)
TerminationHandler implements the default interrupt handler for the installer service
Types ¶
type APIKeyCmd ¶
type APIKeyCmd struct {
*kingpin.CmdClause
}
APIKeyCmd combines subcommands for API tokens
type APIKeyCreateCmd ¶
type APIKeyCreateCmd struct { *kingpin.CmdClause // Email is user token is for Email *string // OpsCenterURL is cluster URL OpsCenterURL *string }
APIKeyCreateCmd creates a new token
type APIKeyDeleteCmd ¶
type APIKeyDeleteCmd struct { *kingpin.CmdClause // Token is token to delete Token *string // Email is user the token belongs to Email *string // OpsCenterURL is cluster URL OpsCenterURL *string }
APIKeyDeleteCmd deletes specified token
type APIKeyListCmd ¶
type APIKeyListCmd struct { *kingpin.CmdClause // Email is user to show tokens for Email *string // OpsCenterURL is cluster URL OpsCenterURL *string }
APIKeyListCmd lists tokens
type AppCmd ¶
type AppCmd struct { *kingpin.CmdClause // Namespace specifies the namespace scope for the request. Namespace *string }
AppCmd combines subcommands for app service
type AppDeleteCmd ¶
type AppDeleteCmd struct { *kingpin.CmdClause // Locator is app locator Locator *string // OpsCenterURL is ops service URL OpsCenterURL *string // Force suppresses not found errors Force *bool }
AppDeleteCmd deletes the specified app
type AppExportCmd ¶
type AppExportCmd struct { *kingpin.CmdClause // Locator is app locator Locator *string // RegistryURL is Docker registry URL RegistryURL *string // OpsCenterURL is app service URL OpsCenterURL *string }
AppExportCmd exports specified app into registry
type AppHistoryCmd ¶
type AppHistoryCmd struct { *kingpin.CmdClause // Release is a release name to display revisions for. Release *string }
AppHistoryCmd displays application revision history.
type AppHookCmd ¶
type AppHookCmd struct { *kingpin.CmdClause // Package is app locator Package *loc.Locator // HookName specifies hook to launch HookName *string // Env is additional environment variables to provide to hook Env *map[string]string }
AppHookCmd launches specified app hook
type AppImportCmd ¶
type AppImportCmd struct { *kingpin.CmdClause // Source is app tarball Source *string // Repository sets app repository Repository *string // Name sets app name Name *string // Version sets app version Version *string // RegistryURL is Docker registry URL RegistryURL *string // DockerURL is Docker daemon URL DockerURL *string // OpsCenterURL is cluster URL to import to OpsCenterURL *string // Vendor turns on Docker image vendoring Vendor *bool // Force overwrites existing app Force *bool // Excludes is a list of files to exclude from installer tarball Excludes *[]string // IncludePatterns is a list of files to include into tarball IncludePaths *[]string // VendorPatterns is a list of file patterns to exclude when searching for images VendorPatterns *[]string // VendorIgnorePatterns is a list of file patterns to look in for images VendorIgnorePatterns *[]string // SetImages sets specified image versions SetImages *loc.DockerImages // SetDeps sets specified dependency versions SetDeps *loc.Locators // Parallel defines the number of tasks to execute concurrently Parallel *int }
AppImportCmd imports app into cluster
type AppIndexCmd ¶
type AppIndexCmd struct { *kingpin.CmdClause // MergeInto is the index file to merge generated index file into. MergeInto *string }
AppIndexCmd generates Helm chart repository index file.
type AppInfo ¶
type AppInfo struct { // Name is the app name Name string `json:"name"` // Version is the app version Version string `json:"version"` }
AppInfo contains the information about the application running on local cluster
type AppInstallCmd ¶
type AppInstallCmd struct { *kingpin.CmdClause // Image specifies the application image to install. Image *string // Name is an optional release name. Name *string // Set is a list of values set on the CLI. Set *[]string // Values is a list of YAML files with values. Values *[]string // Registry is a registry address where images will be pushed. Registry *string // RegistryCA is a registry CA certificate path. RegistryCA *string // RegistryCert is a registry client certificate path. RegistryCert *string // RegistryKey is a registry client private key path. RegistryKey *string // RegistryUsername is registry username for basic auth. RegistryUsername *string // RegistryPassword is registry password for basic auth. RegistryPassword *string // RegistryPrefix is registry prefix when pushing images. RegistryPrefix *string }
AppInstallCmd installs an application from an application image.
type AppListCmd ¶
type AppListCmd struct { *kingpin.CmdClause // All displays releases with all possible statuses. All *bool }
AppListCmd shows all application releases.
type AppPackageCmd ¶
type AppPackageCmd struct {
*kingpin.CmdClause
}
AppPackageCmd displays the name of app in installer tarball
type AppPackageListCmd ¶
type AppPackageListCmd struct { *kingpin.CmdClause // Repository is repository to list apps from Repository *string // Type is type of apps to list Type *string // ShowHidden shows hidden apps as well ShowHidden *bool // OpsCenterURL is app service URL OpsCenterURL *string }
AppPackageListCmd lists all app packages
type AppPackageUninstallCmd ¶
type AppPackageUninstallCmd struct { *kingpin.CmdClause // Locator is the application locator Locator *loc.Locator }
AppPackageUninstallCmd launches application uninstall hook
type AppPullCmd ¶
type AppPullCmd struct { *kingpin.CmdClause // Package is app locator Package *loc.Locator // OpsCenterURL is app service URL to pull from OpsCenterURL *string // Labels is labels to apply to pulled app Labels *configure.KeyVal // Force overwrites existing app Force *bool }
AppPullCmd pulls app from specified cluster
type AppPushCmd ¶
type AppPushCmd struct { *kingpin.CmdClause // Package is app locator Package *loc.Locator // OpsCenterURL is app service URL to push to OpsCenterURL *string }
AppPushCmd pushes app to specified cluster
type AppRebuildIndexCmd ¶
type AppRebuildIndexCmd struct {
*kingpin.CmdClause
}
AppRebuildIndexCmd rebuilds Helm chart repository index.
type AppRollbackCmd ¶
type AppRollbackCmd struct { *kingpin.CmdClause // Release is a release to rollback. Release *string // Revision is a version number to rollback to. Revision *int }
AppRollbackCmd rolls back a release.
type AppSearchCmd ¶
type AppSearchCmd struct { *kingpin.CmdClause // Pattern is an application name pattern. Pattern *string // Remote displays remote applications. Remote *bool // All displays both local and remote applications. All *bool }
AppSearchCmd searches for applications.
type AppStatusCmd ¶
type AppStatusCmd struct { *kingpin.CmdClause // Locator is app locator Locator *loc.Locator // OpsCenterURL is app service URL OpsCenterURL *string }
AppStatusCmd shows app status
type AppSyncCmd ¶
type AppSyncCmd struct { *kingpin.CmdClause // Image specifies the application image to sync. Image *string // Registry is a registry address where images will be pushed. Registry *string // RegistryCA is a registry CA certificate path. RegistryCA *string // RegistryCert is a registry client certificate path. RegistryCert *string // RegistryKey is a registry client private key path. RegistryKey *string // RegistryUsername is registry username for basic auth. RegistryUsername *string // RegistryPassword is registry password for basic auth. RegistryPassword *string // RegistryPrefix is registry prefix when pushing images. RegistryPrefix *string // ScanningRepository is a docker repository to push a copy of all vendored images // Used internally so the registry can scan those images and report on vulnerabilities ScanningRepository *string // ScanningTagPrefix is a prefix to add to each tag when pushed to help identify the image from the scan results ScanningTagPrefix *string }
AppSyncCmd synchronizes an application image with a cluster.
type AppUninstallCmd ¶
type AppUninstallCmd struct { *kingpin.CmdClause // Release is a release name to uninstall. Release *string }
AppUninstallCmd uninstalls a release.
type AppUnpackCmd ¶
type AppUnpackCmd struct { *kingpin.CmdClause // Package is app locator Package *loc.Locator // Dir is unpack location Dir *string // OpsCenterURL is app service URL to pull app from OpsCenterURL *string // ServiceUID is user ID to change unpacked resources ownership to ServiceUID *string }
AppUnpackCmd unpacks app resources
type AppUpgradeCmd ¶
type AppUpgradeCmd struct { *kingpin.CmdClause // Release is the release name to upgrade. Release *string // Image specifies the application image to upgrade to. Image *string // Set is a list of values set on the CLI. Set *[]string // Values is a list of YAML files with values. Values *[]string // Registry is a registry address where images will be pushed. Registry *string // RegistryCA is a registry CA certificate path. RegistryCA *string // RegistryCert is a registry client certificate path. RegistryCert *string // RegistryKey is a registry client private key path. RegistryKey *string // RegistryUsername is registry username for basic auth. RegistryUsername *string // RegistryPassword is registry password for basic auth. RegistryPassword *string // RegistryPrefix is registry prefix when pushing images. RegistryPrefix *string }
AppUpgradeCmd upgrades a release.
type Application ¶
type Application struct { *kingpin.Application // Debug allows to run the command in debug mode Debug *bool // Silent allows to suppress console output Silent *bool // Insecure turns off TLS hostname validation Insecure *bool // StateDir is the local state directory StateDir *string // EtcdRetryTimeout is the retry timeout for transient etcd errors EtcdRetryTimeout *time.Duration // UID is the user ID to run the command as UID *int // GID is the group ID to run the command as GID *int // ProfileEndpoint allows to enable profiling endpoint ProfileEndpoint *string // ProfileTo is the location for periodic profiling snapshots ProfileTo *string // UserLogFile is the path to the user-friendly log file UserLogFile *string // SystemLogFile is the path to the system log file SystemLogFile *string // VersionCmd output the binary version VersionCmd VersionCmd // InstallCmd launches cluster installation InstallCmd InstallCmd // JoinCmd joins to the installer or existing cluster JoinCmd JoinCmd // AutoJoinCmd uses cloud provider info to join existing cluster AutoJoinCmd AutoJoinCmd // LeaveCmd removes the current node from the cluster LeaveCmd LeaveCmd // RemoveCmd removes the specified node from the cluster RemoveCmd RemoveCmd // StopCmd stops all gravity services on the node StopCmd StopCmd // StartCmd starts all gravity services on the node StartCmd StartCmd // PlanCmd manages an operation plan PlanCmd PlanCmd // UpdatePlanInitCmd creates a new update operation plan UpdatePlanInitCmd UpdatePlanInitCmd // PlanDisplayCmd displays plan of an operation PlanDisplayCmd PlanDisplayCmd // PlanExecuteCmd executes a phase of an active operation PlanExecuteCmd PlanExecuteCmd // PlanRollbackCmd rolls back a phase of an active operation PlanRollbackCmd PlanRollbackCmd // PlanSetCmd sets the specified phase state without executing it PlanSetCmd PlanSetCmd // ResumeCmd resumes active operation ResumeCmd ResumeCmd // PlanResumeCmd resumes active operation PlanResumeCmd PlanResumeCmd // PlanCompleteCmd completes the operation plan PlanCompleteCmd PlanCompleteCmd // RollbackCmd performs operation rollback RollbackCmd RollbackCmd // UpdateCmd combines app update related commands UpdateCmd UpdateCmd // UpdateCheckCmd checks if a new app version is available UpdateCheckCmd UpdateCheckCmd // UpdateTriggerCmd launches app update UpdateTriggerCmd UpdateTriggerCmd // UpdateUploadCmd uploads new app version to local cluster UpdateUploadCmd UpdateUploadCmd // UpdateCompleteCmd marks update operation as complete UpdateCompleteCmd UpdateCompleteCmd // UpdateSystemCmd updates system packages UpdateSystemCmd UpdateSystemCmd // UpgradeCmd launches app upgrade UpgradeCmd UpgradeCmd // StatusCmd combines subcommands for displaying status information StatusCmd StatusCmd // StatusClusterCmd displays the current cluster status StatusClusterCmd StatusClusterCmd // StatusHistoryCmd displays the cluster status history StatusHistoryCmd StatusHistoryCmd // StatusResetCmd resets the cluster to active state StatusResetCmd StatusResetCmd // RegistryCmd allows to interact with the cluster private registry RegistryCmd RegistryCmd // RegistryListCmd displays images from the registry RegistryListCmd RegistryListCmd // BackupCmd launches app backup hook BackupCmd BackupCmd // RestoreCmd launches app restore hook RestoreCmd RestoreCmd // CheckCmd checks that the host satisfies app manifest requirements CheckCmd CheckCmd // AppCmd combines subcommands for app service AppCmd AppCmd // AppInstallCmd installs an application from an application image AppInstallCmd AppInstallCmd // AppListCmd shows all application releases AppListCmd AppListCmd // AppUpgradeCmd upgrades a release AppUpgradeCmd AppUpgradeCmd // AppRollbackCmd rolls back a release AppRollbackCmd AppRollbackCmd // AppUninstallCmd uninstalls a release AppUninstallCmd AppUninstallCmd // AppHistoryCmd displays revision history for a release AppHistoryCmd AppHistoryCmd // AppSyncCmd synchronizes an application image with a cluster AppSyncCmd AppSyncCmd // AppSearchCmd searches for applications. AppSearchCmd AppSearchCmd // AppRebuildIndexCmd rebuilds Helm chart repository index. AppRebuildIndexCmd AppRebuildIndexCmd // AppIndexCmd generates Helm chart repository index file. AppIndexCmd AppIndexCmd // AppImportCmd imports an app into cluster AppImportCmd AppImportCmd // AppExportCmd exports specified app into registry AppExportCmd AppExportCmd // AppDeleteCmd deletes the specified app AppDeleteCmd AppDeleteCmd // AppPackageListCmd lists all app packages AppPackageListCmd AppPackageListCmd // AppPackageUninstallCmd launches app uninstall hook AppPackageUninstallCmd AppPackageUninstallCmd // AppStatusCmd output app status AppStatusCmd AppStatusCmd // AppPullCmd pulls app from specified cluster AppPullCmd AppPullCmd // AppPushCmd pushes app to specified cluster AppPushCmd AppPushCmd // AppHookCmd launches specified app hook AppHookCmd AppHookCmd // AppUnpackCmd unpacks specified app resources AppUnpackCmd AppUnpackCmd // WizardCmd starts installer in UI mode WizardCmd WizardCmd // AppPackageCmd displays the name of app in installer tarball AppPackageCmd AppPackageCmd // OpsCmd combines subcommands for ops service OpsCmd OpsCmd // OpsConnectCmd logs into specified cluster OpsConnectCmd OpsConnectCmd // OpsDisconnectCmd logs out of specified cluster OpsDisconnectCmd OpsDisconnectCmd // OpsListCmd lists ops credentials OpsListCmd OpsListCmd // OpsAgentCmd launches install agent OpsAgentCmd OpsAgentCmd // PackCmd combines subcommands for package service PackCmd PackCmd // PackImportCmd imports package into cluster PackImportCmd PackImportCmd // PackUnpackCmd unpacks specified package PackUnpackCmd PackUnpackCmd // PackExportCmd exports package from cluster PackExportCmd PackExportCmd // PackListCmd lists packages PackListCmd PackListCmd // PackDeleteCmd deletes specified package PackDeleteCmd PackDeleteCmd // PackConfigureCmd configures package PackConfigureCmd PackConfigureCmd // PackCommandCmd launches package command PackCommandCmd PackCommandCmd // PackPushCmd pushes package into specified cluster PackPushCmd PackPushCmd // PackPullCmd pulls package from specified cluster PackPullCmd PackPullCmd // PackLabelsCmd updates package labels PackLabelsCmd PackLabelsCmd // UserCmd combines user related subcommands UserCmd UserCmd // UserCreateCmd creates a new user UserCreateCmd UserCreateCmd // UserDeleteCmd deletes specified user UserDeleteCmd UserDeleteCmd // UsersCmd combines users related subcommands UsersCmd UsersCmd // UsersInviteCmd generates a new user invite link UsersInviteCmd UsersInviteCmd // UsersResetCmd generates a user password reset link UsersResetCmd UsersResetCmd // APIKeyCmd combines subcommands for API tokens APIKeyCmd APIKeyCmd // APIKeyCreateCmd creates a new token APIKeyCreateCmd APIKeyCreateCmd // APIKeyListCmd lists tokens APIKeyListCmd APIKeyListCmd // APIKeyDeleteCmd deletes specified token APIKeyDeleteCmd APIKeyDeleteCmd // ReportCmd generates cluster debug report ReportCmd ReportCmd // SiteCmd combines cluster related subcommands SiteCmd SiteCmd // SiteListCmd lists all clusters SiteListCmd SiteListCmd // SiteStartCmd starts gravity site SiteStartCmd SiteStartCmd // SiteInitCmd initializes gravity site from specified state SiteInitCmd SiteInitCmd // SiteStatusCmd displays cluster status SiteStatusCmd SiteStatusCmd // SiteInfoCmd displays some cluster information SiteInfoCmd SiteInfoCmd // SiteCompleteCmd marks cluster as finished final install step SiteCompleteCmd SiteCompleteCmd // SiteResetPasswordCmd resets password for local cluster user SiteResetPasswordCmd SiteResetPasswordCmd // LocalSiteCmd displays local cluster name LocalSiteCmd LocalSiteCmd // RPCAgentCmd combines subcommands for RPC agents RPCAgentCmd RPCAgentCmd // RPCAgentDeployCmd deploys RPC agents on cluster nodes RPCAgentDeployCmd RPCAgentDeployCmd // RPCAgentShutdownCmd requests RPC agents to shut down RPCAgentShutdownCmd RPCAgentShutdownCmd // RPCAgentInstallCmd installs and launches local RPC agent service RPCAgentInstallCmd RPCAgentInstallCmd // RPCAgentRunCmd runs RPC agent RPCAgentRunCmd RPCAgentRunCmd // RPCAgentStatusCmd requests RPC agent statuses RPCAgentStatusCmd RPCAgentStatusCmd // SystemCmd combines system subcommands SystemCmd SystemCmd // SystemTeleportCmd combines internal Teleport commands SystemTeleportCmd SystemTeleportCmd // SystemTeleportShowConfigCmd displays Teleport config SystemTeleportShowConfigCmd SystemTeleportShowConfigCmd // SystemRotateCertsCmd renews cluster certificates on local node SystemRotateCertsCmd SystemRotateCertsCmd // SystemExportCACmd exports cluster CA SystemExportCACmd SystemExportCACmd // SystemUninstallCmd uninstalls all gravity services from local node SystemUninstallCmd SystemUninstallCmd // SystemPullUpdatesCmd pulls updates for system packages SystemPullUpdatesCmd SystemPullUpdatesCmd // SystemUpdateCmd updates system packages SystemUpdateCmd SystemUpdateCmd // SystemReinstallCmd reinstalls specified system package SystemReinstallCmd SystemReinstallCmd // SystemHistoryCmd displays system update history SystemHistoryCmd SystemHistoryCmd // SystemClusterInfoCmd dumps cluster info suitable for debugging SystemClusterInfoCmd SystemClusterInfoCmd // SystemStepDownCmd asks active gravity master to step down SystemStepDownCmd SystemStepDownCmd // SystemRollbackCmd rolls back last system update SystemRollbackCmd SystemRollbackCmd // SystemServiceCmd combines subcommands for systems services SystemServiceCmd SystemServiceCmd // SystemServiceInstallCmd installs systemd service SystemServiceInstallCmd SystemServiceInstallCmd // SystemServiceUninstallCmd uninstalls systemd service SystemServiceUninstallCmd SystemServiceUninstallCmd // SystemServiceStatusCmd queries the runtime status of a package service SystemServiceStatusCmd SystemServiceStatusCmd // SystemServiceListCmd lists systemd services SystemServiceListCmd SystemServiceListCmd // SystemServiceStopCmd stops a package service SystemServiceStopCmd SystemServiceStopCmd // SystemServiceStartCmd stops or restarts a package service SystemServiceStartCmd SystemServiceStartCmd // SystemServiceJournalCmd queries the system journal of a package service SystemServiceJournalCmd SystemServiceJournalCmd // SystemReportCmd generates tarball with system diagnostics information SystemReportCmd SystemReportCmd // SystemStateDirCmd shows local state directory SystemStateDirCmd SystemStateDirCmd // SystemExportRuntimeJournalCmd exports runtime journal to a file SystemExportRuntimeJournalCmd SystemExportRuntimeJournalCmd // SystemStreamRuntimeJournalCmd streams contents of the runtime journal to a file SystemStreamRuntimeJournalCmd SystemStreamRuntimeJournalCmd // SystemSelinuxBootstrapCmd configures SELinux file contexts and ports on the node SystemSelinuxBootstrapCmd SystemSelinuxBootstrapCmd // SystemGCJournalCmd cleans up stale journal files SystemGCJournalCmd SystemGCJournalCmd // SystemGCPackageCmd removes unused packages SystemGCPackageCmd SystemGCPackageCmd // SystemGCRegistryCmd removes unused docker images SystemGCRegistryCmd SystemGCRegistryCmd // GarbageCollectCmd prunes unused resources (package/journal files/docker images) // in the cluster GarbageCollectCmd GarbageCollectCmd // PlanetCmd combines planet subcommands PlanetCmd PlanetCmd // [DEPRECATED] PlanetEnterCmd enters planet container PlanetEnterCmd PlanetEnterCmd // ExecCmd executes a command in a running container ExecCmd ExecCmd // ShellCmd starts interactive shell in a running planet container ShellCmd ShellCmd // PlanetStatusCmd displays planet status PlanetStatusCmd PlanetStatusCmd // EnterCmd enters planet container EnterCmd EnterCmd // ResourceCmd combines resource related subcommands ResourceCmd ResourceCmd // ResourceCreateCmd creates specified resource ResourceCreateCmd ResourceCreateCmd // ResourceRemoveCmd removes specified resource ResourceRemoveCmd ResourceRemoveCmd // ResourceGetCmd shows specified resource ResourceGetCmd ResourceGetCmd // TopCmd displays cluster metrics in terminal TopCmd TopCmd }
Application represents the command-line "gravity" application and contains definitions of all its flags, arguments and subcommands
func RegisterCommands ¶
func RegisterCommands(app *kingpin.Application) *Application
RegisterCommands registers all gravity tool flags, arguments and subcommands
func (*Application) NewInstallEnv ¶
func (g *Application) NewInstallEnv() (env *localenv.LocalEnvironment, err error)
NewInstallEnv returns an instance of the local environment for commands that initialize cluster environment (i.e. install or join).
func (*Application) NewJoinEnv ¶
func (g *Application) NewJoinEnv(stateDir string) (*localenv.LocalEnvironment, error)
NewJoinEnv returns an instance of local environment where join-specific data is stored
func (*Application) NewLocalEnv ¶
func (g *Application) NewLocalEnv() (env *localenv.LocalEnvironment, err error)
NewLocalEnv returns an instance of the local environment.
func (*Application) NewUpdateEnv ¶
func (g *Application) NewUpdateEnv() (*localenv.LocalEnvironment, error)
NewUpdateEnv returns an instance of the local environment that is used only for updates
type AutoJoinCmd ¶
type AutoJoinCmd struct { *kingpin.CmdClause // ClusterName is cluster name ClusterName *string // Role is new node profile Role *string // SystemDevice is device to use for system data SystemDevice *string // Mounts is additional app mounts Mounts *configure.KeyVal // ServiceAddr specifies the service URL of the cluster to join ServiceAddr *string // AdvertiseAddr is local node advertise IP address AdvertiseAddr *string // Token is join token Token *string // SELinux specifies whether to run with SELinux support. // This flag makes the installer run in its own SELinux domain SELinux *bool // FromService specifies whether this process runs in service mode. // // The agent runs the install/join code in service mode, while // the client will simply connect to the service and stream its output and errors // and control whether it should stop FromService *bool // Region specifies the region the cluster controllers is running in, so the worker can discover the cluster // in the correct region Region *string }
AutoJoinCmd uses cloud provider info to join existing cluster
type BackupCmd ¶
type BackupCmd struct { *kingpin.CmdClause // Tarball is backup tarball name Tarball *string // Timeout is operation timeout Timeout *time.Duration // Follow tails operation logs Follow *bool }
BackupCmd launches app backup hook
type CheckCmd ¶
type CheckCmd struct { *kingpin.CmdClause // ManifestFile is path to app manifest file ManifestFile *string // Profile is profile name to check against Profile *string // AutoFix enables automatic fixing of some failed checks AutoFix *bool // ImagePath is path to unpacked cluster image ImagePath *string // Timeout is the time allotted to run preflight checks Timeout *time.Duration }
CheckCmd checks that the host satisfies app manifest requirements
type ClusterInfo ¶
type ClusterInfo struct { // App contains the information about the application running in cluster App AppInfo `json:"app"` // Endpoints is cluster's application endpoints Endpoints []ops.Endpoint `json:"endpoints"` }
ClusterInfo collects information about the local cluster
func GetLocalClusterInfo ¶
func GetLocalClusterInfo(env *localenv.LocalEnvironment) (*ClusterInfo, error)
GetLocalClusterInfo returns information about the local cluster
type CmdExecer ¶
type CmdExecer struct { // Exe specifies an executable gravity command. Exe Executable // Parser specifies the gravity arguments parser function. Parser cli.ArgsParserFunc // Args specifies the provided gravity command arguments. Args []string // ExtraArgs specifies the provided extra arguments. ExtraArgs []string }
CmdExecer handles execution of a gravity command.
type Dimensions ¶
Dimensions contains dimensions (height/width) for terminal widgets.
type EnterCmd ¶
type EnterCmd struct { *kingpin.CmdClause // Args is additional arguments to the command Args *[]string }
EnterCmd enters planet container
type ExecCmd ¶
type ExecCmd struct { *kingpin.CmdClause // TTY allocates a pseudo-TTY TTY *bool // Stdin attaches stdin Stdin *bool // Cmd is a command to execute Cmd *string // Args is additional arguments to the command Cmd Args *[]string }
ExecCmd runs process in the running container
type GarbageCollectCmd ¶
type GarbageCollectCmd struct { *kingpin.CmdClause // Manual is whether the operation is not executed automatically Manual *bool // Confirmed is whether the user has confirmed the removal of custom docker // images Confirmed *bool }
GarbageCollectCmd prunes unused cluster resources
type GarbageCollectPlanCmd ¶
type GarbageCollectPlanCmd struct { *kingpin.CmdClause // Format is the output format Format *constants.Format }
GarbageCollectPlanCmd displays the plan of the garbage collection operation
type InstallCmd ¶
type InstallCmd struct { *kingpin.CmdClause // Path is the state directory path Path *string // AdvertiseAddr is local node advertise IP address AdvertiseAddr *string // Token is unique install token Token *string // CloudProvider enables cloud provider integration CloudProvider *string // Cluster is cluster name Cluster *string // App is app to install App *string // Flavor is app flavor to install Flavor *string // Role is local node profile Role *string // ResourcesPath is the path to user defined Kubernetes resources ResourcesPath *string // Wizard launches UI installer mode Wizard *bool // Mode is installation mode Mode *string // SystemDevice is device to use for system data SystemDevice *string // Mounts is a list of additional app mounts Mounts *configure.KeyVal // PodCIDR overrides default pod network PodCIDR *string // ServiceCIDR overrides default service network ServiceCIDR *string // VxlanPort overrides default overlay network port VxlanPort *int // DNSListenAddrs specifies listen addresses for planet DNS. DNSListenAddrs *[]net.IP // DNSPort overrides default DNS port for planet DNS. DNSPort *int // DockerStorageDriver specifies Docker storage driver to use DockerStorageDriver *dockerStorageDriverValue // DockerArgs specifies additional Docker arguments DockerArgs *[]string // ServiceUID is system user ID ServiceUID *string // ServiceGID is system user group ID ServiceGID *string // GCENodeTags lists additional node tags on GCE GCENodeTags *[]string // DNSHosts is a list of DNS host overrides DNSHosts *[]string // DNSZones is a list of DNS zone overrides DNSZones *[]string // Remote specifies whether the host should not be part of the cluster Remote *bool // SELinux specifies whether to run with SELinux support. // This flag makes the installer run in its own SELinux domain SELinux *bool // FromService specifies whether this process runs in service mode. // // The installer runs the main installer code in service mode, while // the client will simply connect to the service and stream its output and errors // and control whether it should stop FromService *bool // Set is a list of Helm chart values set on the CLI. Set *[]string // Values is a list of YAML files with Helm chart values. Values *[]string // AcceptEULA allows to auto-accept end-user license agreement. AcceptEULA *bool }
InstallCmd launches cluster installation
func (InstallCmd) DNSConfig ¶
func (r InstallCmd) DNSConfig() (config storage.DNSConfig)
DNSConfig returns DNS configuration
type InstallConfig ¶
type InstallConfig struct { logrus.FieldLogger // AdvertiseAddr is advertise address of this server. // Also specifies the address advertised as wizard service endpoint AdvertiseAddr string // Token is install token Token string // CloudProvider is optional cloud provider CloudProvider string // StateDir is directory with local installer state StateDir string // SystemStateDir specifies the custom state directory. // If specified, will affect the local file contexts generated // when SELinux configuration is bootstrapped SystemStateDir string // UserLogFile is the log file where user-facing operation logs go UserLogFile string // SystemLogFile is the log file for system logs SystemLogFile string // SiteDomain is the name of the cluster SiteDomain string // Flavor is installation flavor Flavor string // DisabledWebUI specifies whether OpsCenter and WebInstallWizard are disabled DisabledWebUI bool // Role is server role Role string // AppPackage is the application being installed AppPackage string // RuntimeResources specifies optional Kubernetes resources to create // If specified, will be combined with Resources RuntimeResources []runtime.Object // ClusterResources specifies optional cluster resources to create // If specified, will be combined with Resources // TODO(dmitri): externalize the ClusterConfiguration resource and create // default provider-specific cloud-config on Gravity side ClusterResources []storage.UnknownResource // SystemDevice is a device for gravity data SystemDevice string // Mounts is a list of mount points (name -> source pairs) Mounts map[string]string // DNSOverrides contains installer node DNS overrides DNSOverrides storage.DNSOverrides // PodCIDR is a pod network CIDR PodCIDR string // ServiceCIDR is a service network CIDR ServiceCIDR string // VxlanPort is the overlay network port VxlanPort int // DNSConfig overrides the local cluster DNS configuration DNSConfig storage.DNSConfig // Docker specifies docker configuration Docker storage.DockerConfig // Insecure allows to turn off cert validation Insecure bool // LocalPackages is the machine-local package service LocalPackages *localpack.PackageServer // LocalApps is the machine-local apps service LocalApps appservice.Applications // LocalBackend is the machine-local backend LocalBackend storage.LocalBackend // GCENodeTags defines the VM instance tags on GCE GCENodeTags []string // LocalClusterClient is a factory for creating client to the installed cluster LocalClusterClient func(...httplib.ClientOption) (*opsclient.Client, error) // Mode specifies the installer mode Mode string // DNSHosts is a list of DNS host overrides DNSHosts []string // DNSZones is a list of DNS zone overrides DNSZones []string // ResourcesPath is the additional Kubernetes resources to create ResourcesPath string // ServiceUID is the ID of the service user as configured externally ServiceUID string // ServiceGID is the ID of the service group as configured externally ServiceGID string // Remote specifies whether the installer executes the operation remotely // (i.e. installer node will not be part of cluster) Remote bool // Printer specifies the output for progress messages utils.Printer // ProcessConfig specifies the Gravity process configuration ProcessConfig *processconfig.Config // ServiceUser is the computed service user ServiceUser *systeminfo.User // SELinux specifies whether the installer runs with SELinux support. // This makes the installer run in its own domain SELinux bool // FromService specifies whether the process runs in service mode FromService bool // AcceptEULA allows to auto-accept end-user license agreement. AcceptEULA bool // Values are helm values in marshaled yaml format Values []byte // contains filtered or unexported fields }
InstallConfig defines the configuration for the install command
func NewInstallConfig ¶
func NewInstallConfig(env *localenv.LocalEnvironment, g *Application) (*InstallConfig, error)
NewInstallConfig creates install config from the passed CLI args and flags
func NewWizardConfig ¶
func NewWizardConfig(env *localenv.LocalEnvironment, g *Application) (*InstallConfig, error)
NewWizardConfig returns new configuration for the interactive installer
func (*InstallConfig) Apply ¶
func (i *InstallConfig) Apply(cluster storage.Site, operation storage.SiteOperation)
Apply updates the config with the data found from the cluster/operation.
func (*InstallConfig) BootstrapSELinux ¶
BootstrapSELinux configures SELinux on a node prior to installation
func (*InstallConfig) CheckAndSetDefaults ¶
func (i *InstallConfig) CheckAndSetDefaults(validator resources.Validator) (err error)
CheckAndSetDefaults validates the configuration object and populates default values
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
func (*InstallConfig) RunLocalChecks ¶
func (i *InstallConfig) RunLocalChecks() error
RunLocalChecks executes host-local preflight checks for this configuration
type InstallPlanCmd ¶
type InstallPlanCmd struct {
*kingpin.CmdClause
}
InstallPlanCmd combines subcommands for install plan
type InstallPlanDisplayCmd ¶
type InstallPlanDisplayCmd struct { *kingpin.CmdClause // Output is output format Output *constants.Format }
InstallPlanDisplayCmd displays install operation plan
type JoinCmd ¶
type JoinCmd struct { *kingpin.CmdClause // PeerAddr is installer or cluster address PeerAddr *string // AdvertiseAddr is local node advertise IP address AdvertiseAddr *string // Token is join token Token *string // Role is local node profile Role *string // SystemDevice is device to use for system data SystemDevice *string // ServerAddr is RPC server address ServerAddr *string // Mounts is additional app mounts Mounts *configure.KeyVal // CloudProvider turns on cloud provider integration CloudProvider *string // OperationID is the ID of the operation created via UI OperationID *string // SELinux specifies whether to run with SELinux support. // This flag makes the installer run in its own SELinux domain SELinux *bool // FromService specifies whether this process runs in service mode. // // The agent runs the install/join code in service mode, while // the client will simply connect to the service and stream its output and errors // and control whether it should stop FromService *bool }
JoinCmd joins to the installer or existing cluster
type JoinConfig ¶
type JoinConfig struct { // SystemLogFile is gravity-system log file path SystemLogFile string // UserLogFile is gravity-install log file path UserLogFile string // AdvertiseAddr is the advertise IP for the joining node AdvertiseAddr string // ServerAddr is the installer RPC server address as host:port ServerAddr string // PeerAddrs is the list of peers to try connecting to PeerAddrs string // Token is the join token Token string // Role is the joining node profile Role string // SystemDevice is device for gravity data SystemDevice string // Mounts is a list of additional mounts Mounts map[string]string // CloudProvider is the node cloud provider CloudProvider string // Manual turns on manual plan execution mode Manual bool // Phase is the plan phase to execute Phase string // OperationID is ID of existing expand operation OperationID string // SELinux specifies whether the installer runs with SELinux support. // This makes the installer run in its own domain SELinux bool // FromService specifies whether the process runs in service mode FromService bool // SkipWizard specifies to the join agents that this join request is not too a wizard, // and as such wizard connectivity should be skipped SkipWizard bool // SystemStateDir specifies the custom state directory. // If specified, will affect the local file contexts generated // when SELinux configuration is bootstrapped SystemStateDir string }
JoinConfig describes command line configuration of the join command
func NewJoinConfig ¶
func NewJoinConfig(g *Application) JoinConfig
NewJoinConfig populates join configuration from the provided CLI application
func (*JoinConfig) CheckAndSetDefaults ¶
func (j *JoinConfig) CheckAndSetDefaults() (err error)
CheckAndSetDefaults validates the configuration and sets default values
func (*JoinConfig) GetPeers ¶
func (j *JoinConfig) GetPeers() ([]string, error)
GetPeers returns a list of peers parsed from the peers CLI argument
func (*JoinConfig) GetRuntimeConfig ¶
func (j *JoinConfig) GetRuntimeConfig() proto.RuntimeConfig
GetRuntimeConfig returns the RPC agent runtime configuration
func (*JoinConfig) NewPeerConfig ¶
func (j *JoinConfig) NewPeerConfig(env, joinEnv *localenv.LocalEnvironment) (config *expand.PeerConfig, err error)
NewPeerConfig converts the CLI join configuration to peer configuration
type LeaveCmd ¶
type LeaveCmd struct { *kingpin.CmdClause // Force suppresses operation failures Force *bool // Confirm suppresses confirmation prompt Confirm *bool }
LeaveCmd removes the current node from the cluster
type LocalEnvironmentFactory ¶
type LocalEnvironmentFactory interface { // NewLocalEnv creates a new default environment. // It will use the location pointer file to find the location of the custom state // directory if available and will fall back to defaults.GravityDir otherwise. // All other environments are located under this common root directory NewLocalEnv() (*localenv.LocalEnvironment, error) // TODO(dmitri): generalize operation environment under a single // NewOperationEnv API // NewUpdateEnv creates a new environment for update operations NewUpdateEnv() (*localenv.LocalEnvironment, error) // NewJoinEnv creates a new environment for join operations NewJoinEnv(stateDir string) (*localenv.LocalEnvironment, error) }
LocalEnvironmentFactory defines an interface for creating operation-specific environments
type LocalSiteCmd ¶
type LocalSiteCmd struct {
*kingpin.CmdClause
}
LocalSiteCmd displays local cluster name
type OpsAgentCmd ¶
type OpsAgentCmd struct { *kingpin.CmdClause // PackageAddr is address of package service to bootstrap credentials from PackageAddr *string // AdvertiseAddr is agent advertise IP address AdvertiseAddr *net.IP // ServerAddr is RPC server address ServerAddr *string // Token is agent token Token *string // ServiceName is systemd service name to launch ServiceName *string // Vars is additional agent vars Vars *configure.KeyVal // ServiceUID is system user ID ServiceUID *string // ServiceGID is system user group ID ServiceGID *string // CloudProvider enables cloud provider integration CloudProvider *string }
OpsAgentCmd launches install agent
type OpsConnectCmd ¶
type OpsConnectCmd struct { *kingpin.CmdClause // OpsCenterURL is ops service URL OpsCenterURL *string // Username is agent username Username *string // Password is agent password Password *string }
OpsConnectCmd logs into specified cluster
type OpsDisconnectCmd ¶
type OpsDisconnectCmd struct { *kingpin.CmdClause // OpsCenterURL is ops service URL OpsCenterURL *string }
OpsDisconnectCmd logs out of specified cluster
type PackCmd ¶
type PackCmd struct {
*kingpin.CmdClause
}
PackCmd combines subcommands for package service
type PackCommandCmd ¶
type PackCommandCmd struct { *kingpin.CmdClause // Command is package command to run Command *string // Package is package locator Package *loc.Locator // ConfPackage is configuration package locator ConfPackage *loc.Locator // Args is additional arguments to the package command Args *[]string }
PackCommandCmd launches package command
type PackConfigureCmd ¶
type PackConfigureCmd struct { *kingpin.CmdClause // Package is package locator Package *loc.Locator // ConfPackage is configuration package locator ConfPackage *loc.Locator // Args is additional arguments to the configure command Args *[]string }
PackConfigureCmd configures package
type PackDeleteCmd ¶
type PackDeleteCmd struct { *kingpin.CmdClause // Force suppresses not found errors Force *bool // Locator is package locator Locator *loc.Locator // OpsCenterURL is pack service URL OpsCenterURL *string }
PackDeleteCmd deletes specified package
type PackExportCmd ¶
type PackExportCmd struct { *kingpin.CmdClause // Locator is package locator Locator *loc.Locator // File is file name to export to File *string // OpsCenterURL is pack service URL OpsCenterURL *string // FileMask is file mask for exported package FileMask *string // FileLabel optionally specifies SELinux label FileLabel *string }
PackExportCmd exports package from cluster
type PackImportCmd ¶
type PackImportCmd struct { *kingpin.CmdClause // CheckManifest validates package manifest CheckManifest *bool // OpsCenterURL is pack service URL OpsCenterURL *string // Path is package tarball Path *string // Locator is package locator Locator *loc.Locator // Labels is labels to update pulled package with Labels *configure.KeyVal }
PackImportCmd imports package into cluster
type PackLabelsCmd ¶
type PackLabelsCmd struct { *kingpin.CmdClause // Package is package name Package *loc.Locator // OpsCenterURL is pack service URL OpsCenterURL *string // Add is a map of labels to add Add *configure.KeyVal // Remove is a list of labels to remove Remove *[]string }
PackLabelsCmd updates package labels
type PackListCmd ¶
type PackListCmd struct { *kingpin.CmdClause // Repository is repository to list packages from Repository *string // OpsCenterURL is pack service URL OpsCenterURL *string }
PackListCmd lists packages
type PackPullCmd ¶
type PackPullCmd struct { *kingpin.CmdClause // Package is package locator Package *loc.Locator // OpsCenterURL is pack service URL to pull from OpsCenterURL *string // Labels is labels to update pulled package with Labels *configure.KeyVal // Force overwrites existing package Force *bool }
PackPullCmd pulls package from specified cluster
type PackPushCmd ¶
type PackPushCmd struct { *kingpin.CmdClause // Package is package locator Package *loc.Locator // OpsCenterURL is pack service URL to push into OpsCenterURL *string }
PackPushCmd pushes package into specified cluster
type PackUnpackCmd ¶
type PackUnpackCmd struct { *kingpin.CmdClause // Locator is package locator Locator *loc.Locator // Dir is directory to unpack to Dir *string // OpsCenterURL is pack service URL OpsCenterURL *string }
PackUnpackCmd unpacks specified package
type PhaseParams ¶
type PhaseParams struct { // PhaseID is the ID of the phase to execute PhaseID string // OperationID specifies the operation to work with. // If unspecified, last operation is used. // Some commands will require the last operation to also be active OperationID string // Force allows to force phase execution Force bool // Timeout is phase execution timeout Timeout time.Duration // SkipVersionCheck overrides the verification of binary version compatibility SkipVersionCheck bool // DryRun allows to only print execute/rollback phases DryRun bool // Block indicates whether the command should be run in foreground or as a systemd unit Block bool }
PhaseParams is a set of parameters for a single phase execution
type PlanCmd ¶
type PlanCmd struct { *kingpin.CmdClause // OperationID is optional ID of operation to show the plan for OperationID *string // SkipVersionCheck suppresses version mismatch errors SkipVersionCheck *bool }
PlanCmd manages an operation plan
type PlanCompleteCmd ¶
type PlanCompleteCmd struct {
*kingpin.CmdClause
}
PlanCompleteCmd completes the operation plan
type PlanDisplayCmd ¶
type PlanDisplayCmd struct { *kingpin.CmdClause // Output is output format Output *constants.Format // Short is a shorthand for short output format Short *bool // Follow allows to follow the operation plan progress Follow *bool }
PlanDisplayCmd displays plan of a specific operation
type PlanExecuteCmd ¶
type PlanExecuteCmd struct { *kingpin.CmdClause // Phase is the phase to execute Phase *string // Force forces execution of the given phase Force *bool // PhaseTimeout is the execution timeout PhaseTimeout *time.Duration }
PlanExecuteCmd executes a phase of an active operation
type PlanResumeCmd ¶
type PlanResumeCmd struct { *kingpin.CmdClause // Force forces rollback of the phase given in Phase Force *bool // PhaseTimeout is the rollback timeout PhaseTimeout *time.Duration // Block indicates whether the command should run in foreground or as a systemd unit Block *bool }
PlanResumeCmd resumes active operation
type PlanRollbackCmd ¶
type PlanRollbackCmd struct { *kingpin.CmdClause // Phase is the phase to rollback Phase *string // Force forces rollback of the phase given in Phase Force *bool // PhaseTimeout is the rollback timeout PhaseTimeout *time.Duration }
PlanRollbackCmd rolls back a phase of an active operation
type PlanSetCmd ¶
type PlanSetCmd struct { *kingpin.CmdClause // Phase is the phase to set state for Phase *string // State is the new phase state State *string }
PlanSetCmd sets the specified phase state without executing it
type PlanetEnterCmd ¶
type PlanetEnterCmd struct {
*kingpin.CmdClause
}
PlanetEnterCmd enters planet container
type PlanetStatusCmd ¶
type PlanetStatusCmd struct {
*kingpin.CmdClause
}
PlanetStatusCmd displays planet status
type RPCAgentCmd ¶
type RPCAgentCmd struct {
*kingpin.CmdClause
}
RPCAgentCmd combines subcommands for RPC agents
type RPCAgentDeployCmd ¶
type RPCAgentDeployCmd struct { *kingpin.CmdClause // LeaderArgs is additional arguments to the leader agent LeaderArgs *string // NodeArgs is additional arguments to the regular agent NodeArgs *string // Version specifies the version of the agent to be deployed Version *string }
RPCAgentDeployCmd deploys RPC agents on cluster nodes
type RPCAgentInstallCmd ¶
type RPCAgentInstallCmd struct { *kingpin.CmdClause // Args is additional arguments to the agent Args *[]string }
RPCAgentInstallCmd installs and launches local RPC agent service
type RPCAgentRunCmd ¶
type RPCAgentRunCmd struct { *kingpin.CmdClause // Args is additional arguments to the agent Args *[]string }
RPCAgentRunCmd runs RPC agent
type RPCAgentShutdownCmd ¶
type RPCAgentShutdownCmd struct {
*kingpin.CmdClause
}
RPCAgentShutdownCmd requests RPC agents to shut down
type RPCAgentStatusCmd ¶
type RPCAgentStatusCmd struct {
*kingpin.CmdClause
}
RPCAgentStatusCmd requests RPC agent statuses
type RegistryCmd ¶
type RegistryCmd struct {
*kingpin.CmdClause
}
RegistryCmd allows to interact with the cluster private registry
type RegistryListCmd ¶
type RegistryListCmd struct { *kingpin.CmdClause // Registry is the address of registry to list contents in Registry *string // CAPath is path to registry CA certificate CAPath *string // CertPath is path to registry client certificate CertPath *string // KeyPath is path to registry client private key KeyPath *string // Format is the output format Format *constants.Format }
RegistryListCmd lists images in the registry
type RemoveCmd ¶
type RemoveCmd struct { *kingpin.CmdClause // Node is the node to remove Node *string // Force suppresses operation failures Force *bool // Confirm suppresses confirmation prompt Confirm *bool }
RemoveCmd removes the specified node from the cluster
type ReportCmd ¶
type ReportCmd struct { *kingpin.CmdClause // FilePath is the report tarball path FilePath *string // Since is the duration before now that specifies the start of the time // filter. Only log entries from the start of the time filter until now will // be included in the report. Since *time.Duration }
ReportCmd generates cluster debug report
type ResourceCmd ¶
type ResourceCmd struct {
*kingpin.CmdClause
}
ResourceCmd combines resource related subcommands
type ResourceCreateCmd ¶
type ResourceCreateCmd struct { *kingpin.CmdClause // Filename is path to file with resource definition Filename *string // Upsert overwrites existing resource Upsert *bool // User is resource owner User *string // Manual controls whether an operation is created in manual mode. // If resource is managed with the help of a cluster operation, // setting this to true will not cause the operation to start automatically Manual *bool // Confirmed suppresses confirmation prompt Confirmed *bool }
ResourceCreateCmd creates specified resource
type ResourceGetCmd ¶
type ResourceGetCmd struct { *kingpin.CmdClause // Kind is resource kind Kind *string // Name is resource name Name *string // Format is output format Format *constants.Format // WithSecrets show normally hidden resource fields WithSecrets *bool // User is resource owner User *string }
ResourceGetCmd shows specified resource
type ResourceRemoveCmd ¶
type ResourceRemoveCmd struct { *kingpin.CmdClause // Kind is resource kind Kind *string // Name is resource name Name *string // Force suppresses not found errors Force *bool // User is resource owner User *string // Manual controls whether an operation is created in manual mode. // If resource is managed with the help of a cluster operation, // setting this to true will not cause the operation to start automatically Manual *bool // Confirmed suppresses confirmation prompt Confirmed *bool }
ResourceRemoveCmd removes specified resource
type RestoreCmd ¶
type RestoreCmd struct { *kingpin.CmdClause // Tarball is tarball to restore from Tarball *string // Timeout is operation timeout Timeout *time.Duration // Follow tails operation logs Follow *bool }
RestoreCmd launches app restore hook
type ResumeCmd ¶
type ResumeCmd struct { *kingpin.CmdClause // OperationID is optional ID of operation to show the plan for OperationID *string // SkipVersionCheck suppresses version mismatch errors SkipVersionCheck *bool // Force forces rollback of the phase given in Phase Force *bool // PhaseTimeout is the rollback timeout PhaseTimeout *time.Duration }
ResumeCmd resumes active operation
type RollbackCmd ¶
type RollbackCmd struct { *kingpin.CmdClause // PhaseTimeout is the individual phase rollback timeout PhaseTimeout *time.Duration // OperationID is optional ID of operation to rollback OperationID *string // SkipVersionCheck suppresses version mismatch errors SkipVersionCheck *bool // Confirmed suppresses confirmation prompt Confirmed *bool // DryRun prints rollback phases without actually performing them DryRun *bool }
RollbackCmd performs operation rollback
type SetPhaseParams ¶
type SetPhaseParams struct { // OperationID is an optional ID of the operation the phase belongs to. OperationID string // PhaseID is ID of the phase to set the state. PhaseID string // State is the new phase state. State string }
SetPhaseParams contains parameters for setting phase state.
type ShellCmd ¶
type ShellCmd struct {
*kingpin.CmdClause
}
ShellCmd is an alias for exec with -ti /bin/bash
type SiteCmd ¶
type SiteCmd struct {
*kingpin.CmdClause
}
SiteCmd combines cluster related subcommands
type SiteCompleteCmd ¶
type SiteCompleteCmd struct { *kingpin.CmdClause // Support turns on remote support Support *string }
SiteCompleteCmd marks cluster as finished final install step
type SiteInfoCmd ¶
type SiteInfoCmd struct { *kingpin.CmdClause // DomainName is cluster name DomainName *string // Format is output format Format *constants.Format }
SiteInfoCmd displays some cluster information
type SiteInitCmd ¶
type SiteInitCmd struct { *kingpin.CmdClause // ConfigPath is path to config file ConfigPath *string // InitPath is path to init from InitPath *string }
SiteInitCmd initializes gravity site from specified state
type SiteListCmd ¶
type SiteListCmd struct { *kingpin.CmdClause // OpsCenterURL is cluster URL OpsCenterURL *string }
SiteListCmd lists all clusters
type SiteResetPasswordCmd ¶
type SiteResetPasswordCmd struct {
*kingpin.CmdClause
}
SiteResetPasswordCmd resets password for local cluster user
type SiteStartCmd ¶
type SiteStartCmd struct { *kingpin.CmdClause // ConfigPath is path to config file ConfigPath *string // InitPath is path to init from InitPath *string }
SiteStartCmd starts gravity site
type SiteStatusCmd ¶
type SiteStatusCmd struct {
*kingpin.CmdClause
}
SiteStatusCmd displays cluster status
type StartCmd ¶
type StartCmd struct { *kingpin.CmdClause // AdvertiseAddr is the new node advertise address. AdvertiseAddr *string // FromService indicates that the command is running as a systemd service. FromService *bool // Confirmed suppresses confirmation prompt. Confirmed *bool }
StartCmd starts all Gravity services on the node.
type StatusClusterCmd ¶
type StatusClusterCmd struct { *kingpin.CmdClause // Token displays only join token Token *bool // Tail follows current operation logs Tail *bool // OperationID displays operation status OperationID *string // Seconds displays status continuously Seconds *int // Output is output format Output *constants.Format }
StatusClusterCmd displays current cluster status
type StatusCmd ¶
type StatusCmd struct {
*kingpin.CmdClause
}
StatusCmd combines subcommands for displaying status information
type StatusHistoryCmd ¶
type StatusHistoryCmd struct {
*kingpin.CmdClause
}
StatusHistoryCmd displays cluster status history
type StatusResetCmd ¶
type StatusResetCmd struct { *kingpin.CmdClause // Confirmed suppresses confirmation prompt Confirmed *bool }
StatusResetCmd resets cluster to active state
type StopCmd ¶
type StopCmd struct { *kingpin.CmdClause // Confirmed suppresses confirmation prompt. Confirmed *bool }
StopCmd stops all Gravity services on the node.
type SystemClusterInfoCmd ¶
type SystemClusterInfoCmd struct {
*kingpin.CmdClause
}
SystemClusterInfoCmd dumps kubernetes cluster info suitable for debugging. It is a convenience wrapper around 'kubectl cluster-info dump --all-namespaces'
type SystemExportCACmd ¶
type SystemExportCACmd struct { *kingpin.CmdClause // ClusterName is local cluster name ClusterName *string // CAPath is path to export CA to CAPath *string }
SystemExportCACmd exports cluster CA
type SystemExportRuntimeJournalCmd ¶
type SystemExportRuntimeJournalCmd struct { *kingpin.CmdClause // OutputFile specifies the path of the resulting tarball OutputFile *string // Since is the duration before now that specifies the start of the time // filter. Only log entries from the start of the time filter until now will // be included in the report. Since *time.Duration // Export serializes the journal into a binary stream. Export *bool }
SystemExportRuntimeJournalCmd exports runtime journal to a file
type SystemGCJournalCmd ¶
type SystemGCJournalCmd struct { *kingpin.CmdClause // LogDir specifies the alternative location of the journal files. // If unspecified, defaults.JournalLogDir is used LogDir *string // MachineIDFile specifies the alternative location of the systemd machine-id file. // If unspecified, defaults.SystemdMachineID is used MachineIDFile *string }
SystemGCJournalCmd manages cleanup of journal files
type SystemGCPackageCmd ¶
type SystemGCPackageCmd struct { *kingpin.CmdClause // DryRun displays the packages to be removed // without actually removing anything DryRun *bool // Cluster specifies whether to prune cluster packages Cluster *bool }
SystemGCPackageCmd removes unused packages
type SystemGCRegistryCmd ¶
type SystemGCRegistryCmd struct { *kingpin.CmdClause // Confirm specifies the user consent that external docker images // (images not part of the installation) are to be removed from the // local docker registry Confirm *bool // DryRun displays the images to be removed // without actually removing anything DryRun *bool }
SystemGCRegistryCmd removes unused docker images
type SystemHistoryCmd ¶
type SystemHistoryCmd struct {
*kingpin.CmdClause
}
SystemHistoryCmd displays system update history
type SystemPullUpdatesCmd ¶
type SystemPullUpdatesCmd struct { *kingpin.CmdClause // OpsCenterURL is cluster URL OpsCenterURL *string // RuntimePackage specifies the runtime package to update to RuntimePackage *loc.Locator }
SystemPullUpdatesCmd pulls updates for system packages
type SystemReinstallCmd ¶
type SystemReinstallCmd struct { *kingpin.CmdClause // Package is package locator Package *loc.Locator // ServiceName is systemd service name to launch ServiceName *string // Labels defines the labels to identify the package with Labels *configure.KeyVal // ClusterRole is the node's cluster role (master or node) ClusterRole *string }
SystemReinstallCmd reinstalls specified system package
type SystemReportCmd ¶
type SystemReportCmd struct { *kingpin.CmdClause // Filter allows to collect only specific diagnostics Filter *[]string // Compressed allows to gzip the tarball Compressed *bool // Output optionally specifies output file path Output *string // Since is the duration before now that specifies the start of the time // filter. Only log entries from the start of the time filter until now will // be included in the report. Since *time.Duration }
SystemReportCmd generates tarball with system diagnostics information
type SystemRollbackCmd ¶
type SystemRollbackCmd struct { *kingpin.CmdClause // ChangesetID is changeset ID to rollback ChangesetID *string // ServiceName is systemd service name to launch ServiceName *string // WithStatus waits for operation to finish WithStatus *bool }
SystemRollbackCmd rolls back last system update
type SystemRotateCertsCmd ¶
type SystemRotateCertsCmd struct { *kingpin.CmdClause // ClusterName is local cluster name ClusterName *string // ValidFor is validity period for new certificates ValidFor *time.Duration // CAPath is CA to use CAPath *string }
SystemRotateCertsCmd renews cluster certificates on local node
type SystemSelinuxBootstrapCmd ¶
type SystemSelinuxBootstrapCmd struct { *kingpin.CmdClause // Path specifies the optional output file where the bootstrap script is saved. // In this case, the command does not execute the script Path *string // VxlanPort optionally specifies the new vxlan port VxlanPort *int }
SystemSelinuxBootstrapCmd configures SELinux file contexts and ports on the node
type SystemServiceCmd ¶
type SystemServiceCmd struct {
*kingpin.CmdClause
}
SystemServiceCmd combines subcommands for systems services
type SystemServiceInstallCmd ¶
type SystemServiceInstallCmd struct { *kingpin.CmdClause // Package is system service package locator Package *loc.Locator // ConfigPackage is config package locator ConfigPackage *loc.Locator // StartCommand is systemd unit StartCommand StartCommand *string // StartPreCommand is systemd unit StartPreCommand StartPreCommand *string // StartPostCommand is systemd unit StartPostCommand StartPostCommand *string // StopCommadn is systemd unit StopCommand StopCommand *string // StopPostCommand is systemd unit StopPostCommand StopPostCommand *string // Timeout is systemd unit timeout Timeout *int // Type is systemd unit type Type *string // Restart is systemd unit restart policy Restart *string // LimitNoFile is systemd unit file limit LimitNoFile *int // KillMode is systemd unit kill mode KillMode *string }
SystemServiceInstallCmd installs systemd service
type SystemServiceJournalCmd ¶
type SystemServiceJournalCmd struct { *kingpin.CmdClause // Package specifies the service either a package locator // or a partial unique pattern (i.e. 'planet') Package *string // Args optionally lists additional arguments to journalctl Args *[]string }
SystemServiceJournalCmd queries the system journal of a package service
type SystemServiceListCmd ¶
type SystemServiceListCmd struct {
*kingpin.CmdClause
}
SystemServiceListCmd lists systemd services
type SystemServiceStartCmd ¶
type SystemServiceStartCmd struct { *kingpin.CmdClause // Package specifies the service either a package locator // or a partial unique pattern (i.e. 'planet') Package *string }
SystemServiceStartCmd starts or restart a package service
type SystemServiceStatusCmd ¶
type SystemServiceStatusCmd struct { *kingpin.CmdClause // Package specifies the service either a package locator // or a partial unique pattern (i.e. 'planet') Package *string }
SystemServiceStatusCmd queries the runtime status of a package service
type SystemServiceStopCmd ¶
type SystemServiceStopCmd struct { *kingpin.CmdClause // Package specifies the service either a package locator // or a partial unique pattern (i.e. 'planet') Package *string }
SystemServiceStopCmd stops a running package service
type SystemServiceUninstallCmd ¶
type SystemServiceUninstallCmd struct { *kingpin.CmdClause // Package is system service package locator Package *loc.Locator // Name is service name Name *string }
SystemServiceUninstallCmd uninstalls systemd service
type SystemStateDirCmd ¶
type SystemStateDirCmd struct {
*kingpin.CmdClause
}
SystemStateDirCmd shows local state directory
type SystemStepDownCmd ¶
type SystemStepDownCmd struct {
*kingpin.CmdClause
}
SystemStepDownCmd asks active gravity master to step down
type SystemStreamRuntimeJournalCmd ¶
type SystemStreamRuntimeJournalCmd struct { *kingpin.CmdClause // Since is the duration before now that specifies the start of the time // filter. Only log entries from the start of the time filter until now will // be included in the report. Since *time.Duration // Export serializes the journal into a binary stream. Export *bool }
SystemStreamRuntimeJournalCmd streams contents of the runtime journal
type SystemTeleportCmd ¶
type SystemTeleportCmd struct {
*kingpin.CmdClause
}
SystemTeleportCmd combines internal Teleport commands
type SystemTeleportShowConfigCmd ¶
type SystemTeleportShowConfigCmd struct { *kingpin.CmdClause // Package is the package to show config from Package *string }
SystemTeleportShowConfigCmd displays Teleport config from specified package
type SystemUninstallCmd ¶
type SystemUninstallCmd struct { *kingpin.CmdClause // Confirmed suppresses confirmation prompt Confirmed *bool }
SystemUninstallCmd uninstalls all gravity services from local node
type SystemUpdateCmd ¶
type SystemUpdateCmd struct { *kingpin.CmdClause // ChangesetID is changeset ID ChangesetID *string // ServiceName is systemd service name to launch ServiceName *string // WithStatus waits for operation to finish WithStatus *bool // RuntimePackage specifies the runtime package to update to RuntimePackage *loc.Locator }
SystemUpdateCmd updates system packages
type TopCmd ¶
type TopCmd struct { *kingpin.CmdClause // Interval is the interval to display metrics for. Interval *time.Duration // Step is the max time b/w two datapoints. Step *time.Duration }
TopCmd displays cluster metrics in terminal.
type UpdateCheckCmd ¶
type UpdateCheckCmd struct { *kingpin.CmdClause // App is app name App *string }
UpdateCheckCmd checks if a new app version is available
type UpdateCmd ¶
type UpdateCmd struct {
*kingpin.CmdClause
}
UpdateCmd combines update related subcommands
type UpdateCompleteCmd ¶
type UpdateCompleteCmd struct { *kingpin.CmdClause // Failed marks operation as failed Failed *bool }
UpdateCompleteCmd marks update operation as completed
type UpdatePlanInitCmd ¶
type UpdatePlanInitCmd struct { *kingpin.CmdClause // SkipWorkers configures whether to skip upgrading worker nodes SkipWorkers *bool // ParallelWorkers configures the number of workers that can be upgraded in parallel ParallelWorkers *int }
UpdatePlanInitCmd creates a new update operation plan
type UpdateSystemCmd ¶
type UpdateSystemCmd struct { *kingpin.CmdClause // ChangesetID is current changeset ID ChangesetID *string // ServiceName is systemd service name to launch ServiceName *string // WithStatus is whether to wait for service to complete WithStatus *bool // RuntimePackage specifies the runtime package to update to RuntimePackage *loc.Locator }
UpdateSystemCmd updates system packages
type UpdateTriggerCmd ¶
type UpdateTriggerCmd struct { *kingpin.CmdClause // App is app name App *string // Manual starts operation in manual mode Manual *bool // SkipVersionCheck suppresses version mismatch errors SkipVersionCheck *bool // Force forces update Force *bool // SkipWorkers configures whether to skip upgrading worker nodes SkipWorkers *bool // ParallelWorkers configures the number of workers that can be upgraded in parallel ParallelWorkers *int }
UpdateTriggerCmd launches app update
type UpdateUploadCmd ¶
type UpdateUploadCmd struct { *kingpin.CmdClause // OpsCenterURL is cluster URL OpsCenterURL *string }
UpdateUploadCmd uploads new app version to local cluster
type UpgradeCmd ¶
type UpgradeCmd struct { *kingpin.CmdClause // App is app name App *string // Manual starts upgrade in manual mode Manual *bool // Phase is upgrade operation phase to execute Phase *string // Timeout is phase execution timeout Timeout *time.Duration // Force forces phase execution Force *bool // Resume resumes failed upgrade Resume *bool // SkipVersionCheck suppresses version mismatch errors SkipVersionCheck *bool // Set is a list of Helm chart values set on the CLI. Set *[]string // Values is a list of YAML files with Helm chart values. Values *[]string // Block indicates whether the command should run in foreground or as a systemd unit Block *bool // SkipWorkers configures whether to skip upgrading worker nodes SkipWorkers *bool // ParallelWorkers configures the number of workers that can be upgraded in parallel ParallelWorkers *int }
UpgradeCmd launches app upgrade
type UpgradePlanCmd ¶
type UpgradePlanCmd struct {
*kingpin.CmdClause
}
UpgradePlanCmd combines subcommands for upgrade plan
type UpgradePlanDisplayCmd ¶
type UpgradePlanDisplayCmd struct { *kingpin.CmdClause // Output is output format Output *constants.Format }
UpgradePlanDisplayCmd displays upgrade operation plan
type UserCreateCmd ¶
type UserCreateCmd struct { *kingpin.CmdClause // Email is user email Email *string // Type is user type Type *string // Password is user password Password *string // OpsCenterURL is users service URL OpsCenterURL *string }
UserCreateCmd creates a new user
type UserDeleteCmd ¶
type UserDeleteCmd struct { *kingpin.CmdClause // Email is user email Email *string // OpsCenterURL is users service URL OpsCenterURL *string }
UserDeleteCmd deletes specified user
type UsersCmd ¶
type UsersCmd struct {
*kingpin.CmdClause
}
UsersCmd combines user related subcommands
type UsersInviteCmd ¶
type UsersInviteCmd struct { *kingpin.CmdClause // Name is user name Name *string // Roles is user roles Roles *[]string // TTL is invite link TTL TTL *time.Duration }
UsersInviteCmd generates a new user invite link
type UsersResetCmd ¶
type UsersResetCmd struct { *kingpin.CmdClause // Name is user name Name *string // TTL is reset link TTL TTL *time.Duration }
UsersResetCmd generates a user password reset link
type VersionCmd ¶
VersionCmd displays the binary version
type WizardCmd ¶
type WizardCmd struct { *kingpin.CmdClause // Path is the state directory path Path *string // ServiceUID is system user ID ServiceUID *string // ServiceGID is system user group ID ServiceGID *string // AdvertiseAddr specifies the advertise address for the wizard AdvertiseAddr *string // Token is unique install token Token *string // FromService specifies whether this process runs in service mode. // // The installer runs the main installer code in service mode, while // the client will simply connect to the service and stream its output and errors // and control whether it should stop FromService *bool // Set is a list of Helm chart values set on the CLI. Set *[]string // Values is a list of YAML files with Helm chart values. Values *[]string }
WizardCmd starts installer in UI mode
Source Files
¶
- app.go
- backup_restore.go
- checks.go
- clusterconfig.go
- clusterupdate.go
- commands.go
- config.go
- environ.go
- gc.go
- helm.go
- history.go
- input.go
- install.go
- journal.go
- logging.go
- operation.go
- ops.go
- package.go
- plan.go
- planet.go
- reconfigure.go
- register.go
- registry.go
- report.go
- resources.go
- rotate.go
- rpcagent.go
- run.go
- selinux.go
- site.go
- status.go
- stop_start.go
- sync.go
- system.go
- teleport.go
- top.go
- update.go
- user.go
- utils.go
- version.go