package
0.0.0-20230628214157-3bfe64699e82
Repository: https://github.com/gravitational/gravity.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
nolint:goprintffuncname // TODO: add 'f' suffix to printf-like APIs.
No description provided by the author
package suite contains a ops service acceptance test suite that is backend implementation independent, used both for services and clients.

# Functions

CheckServers executes a set of preflight tests on a set of servers as part of the install operation given with opKey.
CompleteOperation marks the specified operation as completed.
ConvertOpsSite converts ops.Site to storage.Site.
CreateCluster is a shortcut function to create clusters, works for AWS only at the moment.
DescribeOperation returns a human friendly description of the operation.
EnableLeaderElection turns on leader election for the specified node.
FailOperation marks the specified operation as failed.
FailOperationAndResetCluster completes the specified operation and resets cluster state to active.
FilterFromURLValues returns an operations filter based on set URL values.
FindServerByInstanceID finds server in the cluster state by instance ID if not found, returns NotFound error.
FormatValidationError formats validation error as a human-readable text.
GetActiveOperations returns a list of currently active cluster operations.
GetActiveOperationsByType returns a list of cluster operations of the specified type that are currently in progress.
GetClusterEndpoints returns system endpoints for the specified cluster.
GetClusters returns cluster or list of clusters.
GetCompletedInstallOperation returns a completed install operation for the specified site.
GetExpandOperation returns the first available expand operation from the provided backend.
GetInstallOperation returns an install operation for the specified siteKey.
GetLastCompletedUpdateOperation returns the last completed update operation.
GetLastFinishedOperation returns the cluster's last completed operation.
GetLastOperation returns the most recent operation and its progress for the specified site.
GetLastShrinkOperation returns the last shrink operation If there're no operations or the last operation is not of type 'shrink', returns NotFound error.
GetLastUninstallOperation returns the last uninstall operation for the specified siteKey.
GetLastUpgradeOperation returns the most recent upgrade operation or NotFound.
GetOperationWithProgress returns the operation and its progress for the provided operation key.
GetWizardCluster returns the cluster created by wizard install process.
GetWizardOperation returns the install operation assuming that the provided operator talks to an install wizard process.
IsInstalledState takes a site state and returns true/false depending on whether this state represents one of "installed" states.
MakeClusterInfoMap creates a config map with information about the provided cluster that will be made available to all hooks.
MatchByType returns an OperationMatcher to match operations by type.
NewClusterFromSite creates cluster resource from Site object.
NewOperation creates a new operation resource from storage operation.
NewOperatorContext returns a new context with the specified user name.
NewSessionContext returns a new context with the specified web session.
NewUserContext returns a new context with the specified user name.
OperatorFromContext extracts the operator from the specified context if present.
OperatorWithACL retruns new instance of the Operator interface that is checking every action against this username privileges.
PauseLeaderElection pauses leader election for the specified node.
RemoveCluster starts cluster removal process, returns operation key.
RemoveClusterByCluster launches uninstall operation for the provided cluster.
SessionFromContext extracts the web session from the specified context if present.
UpsertSystemAccount creates a new system account if one has not been created.
UserFromContext extracts name of the user attached to the provided context.
VerifyLicense verifies the provided license.

# Constants

AdvertiseAddrParam specifies the name of the agent parameter for advertise address.
AdvertiseIP defines a label with advertise IP address.
AgentAutoRole defines an agent role that is yet to be determined.
AgentMode is used to indicate what mode the agent is started in (e.g.
AgentModeShrink means that the agent is started on a node to assist in performing a shrink operation.
AgentProvisioner defines the provisioner to the agent.
AppRole defines a label with an application role.
Hostname defines a label with hostname.
InstallToken names the query parameter with a one-time install token.
InstanceType defines a label with a cloud instance type.
OperationExpand identifies the expand operation.
OperationGarbageCollect identifies the gc operation.
OperationGarbageCollectInProgress defines the gc operation in-progress state.
OperationInstall identifies the install operation.
OperationReconfigure is the name of the operation that reconfigures the cluster advertise IP.
OperationReconfigureInProgress is the operation state indicating cluster advertise IP is being reconfigured.
OperationShrink identifies the shrink operation.
OperationStateCompleted signifies a completed operation.
OperationStateExpandDeploying defines the expand operation deploying state.
OperationStateExpandInitiated defines the expand operation initiated state.
OperationStateExpandPrechecks defines the expand operation prechecks state.
OperationStateExpandProvisioning defines the expand operation provisioning state.
OperationStateFailed signifies a failed operation.
OperationStateInstallDeploying signifies the install operation deploying state.
OperationStateInstallInitiated signifies the install operation initiated state.
OperationStateInstallPrechecks signifies the install operation prechecks state.
OperationStateInstallProvisioning signifies the install operation provisioning state.
OperationStateReady indicates that the operation is ready to be executed by the installer process.
OperationStateShrinkInProgress defines the shrink operation in-progress state.
OperationStateUninstallInProgress defines the uninstall operation in-progress state.
OperationStateUpdateInProgress defines the update operation in-progress state.
OperationUninstall identifies the uninstall operation.
OperationUpdate identifies the update operation.
OperationUpdateConfig identifies the cluster configuration update operation.
OperationUpdateConfigInProgress defines the cluster configuration update operation in-progress state.
OperationUpdateRuntimeEnviron identifies the runtime environment update operation.
OperationUpdateRuntimeEnvironInProgress defines the runtime environment update operation in-progress state.
ProgressStateCompleted signifies the operation completed progress value.
ProgressStateFailed signifies the operation failed progress value.
ProgressStateInProgress signifies the operation in-progress progress value.
ServerFQDN defines a label with FQDN.
ServiceAccountTokenSecretType defines the secret type for service account tokensnolint:gosec // not a hardcoded credential.
SiteLabelName defines the name of the cluster name label.
SiteStateActive means that a site is properly deployed and its application is functional.
SiteStateDegraded means that the application installed on a deployed site is failing its health check.
SiteStateExpanding means that the site is being expanded.
SiteStateFailed indicates that the site is in an invalid state, e.g.
SiteStateGarbageCollecting is the state of the cluster when it's removing unused resources.
SiteStateInstalling means that the site is being installed.
SiteStateNotInstalled is a state where a site has just been created or uninstalled and no active operation for it is in progress.
SiteStateOffline means that OpsCenter cannot connect to remote site.
SiteStateReconfiguring is the state of the cluster when its advertise IP is being reconfigured.
SiteStateShrinking means that the site is being shrunk.
SiteStateUninstalling means that the site is being uninstalled.
SiteStateUpdating means that there's an update operation in progress.
SiteStateUpdatingConfig is the state of the cluster when it's updating configuration.
SiteStateUpdatingEnviron is the state of the cluster when it's updating runtime environment variables on nodes.
SystemRepository is the system package repository.
TagKubernetesCluster is a name of the tag containing cluster name AWS resources are usually marked with.
TagRole defines a tag used to denote a node role in the application context.
TagServiceRole defines a tag used to denote a node role in context of kubernetes.

# Variables

OperationFailedToClusterState defines states the cluster transitions into when a certain operation fails.
OperationStartedToClusterState defines states the cluster transitions into when a certain operation starts.
OperationSucceededToClusterState defines states the cluster transitions into when a certain operation completes successfully.

# Structs

AccountKey used to identify account.
ActivateSiteRequest is a request to activate a site.
AgentCreds represent install agent username and password used to identify install agents for the site.
AgentReport provides information about servers as collected by remote install agents run on site during install and upgrade procedures.
AppInstallerRequest is a request to generate installer tarball.
Application holds information about application, such as package name and version, manifest and runtime information.
AuditEventRequest describes an audit log event.
ClusterAgentRequest is a request to retrieve a cluster agent.
ClusterCertificate represents the cluster certificate.
ClusterEndpoints contains system cluster endpoints such as Teleport proxy address or cluster control panel URL.
ClusterMetricsRates encapsulates usage rates.
ClusterMetricsRequest is a request for cluster metrics.
ClusterMetricsResponse is the response containing cluster CPU/RAM metrics.
CompleteFinalInstallStepRequest is a request to mark site final install step as completed.
ConfigureNodeRequest is a request to prepare a node for the upgrade.
ConfigurePackagesRequest is a request to create configuration packages.
CreateClusterGarbageCollectOperationRequest is a request to start garbage collection in the cluster.
CreateClusterReconfigureOperationRequest is a request to initialize node advertise IP reconfiguration operation.
CreateSiteAppUpdateOperationRequest is a request to update an application installed on a site to a new version.
CreateSiteExpandOperationRequest is a request to add new nodes to the cluster.
CreateSiteInstallOperationRequest is a request to create install operation - the operation that provisions servers, gravity software and sets up everything.
CreateSiteShrinkOperationRequest is a request to remove nodes from the cluster.
CreateSiteUninstallOperationRequest creates uninstall operation entry, it does not kick off the operation.
CreateUpdateConfigOperationRequest is a request to create an operation to update cluster configuration.
CreateUpdateEnvarsOperationRequest is a request to update cluster environment variables.
CreateUserInviteRequest is a request to generate a new user invite token.
CreateUserResetRequest is a request to generate a new user reset token.
DeactivateSiteRequest describes a request to deactivate a site.
DeleteUserInviteRequest is a request to delete a user invite token.
Endpoint respresents an application endpoint.
GetClusterReportRequest specifies the request to get the cluster report.
License represents a license installed on site.
ListReleasesRequest is a request to list installed application releases.
LogEntry represents a single log line for an operation.
NewAccountRequest is a request to create a new account.
NewAPIKeyRequest is a request to create a new api key.
NewInstallTokenRequest is a request to generate a one-time install token.
NewSiteRequest is a request to create a new site entry.
NewUserRequest is a request to create a new user.
Node represents a cluster node information based on Teleport node.
NodeResponse defines the result of executing a remote command on a node.
OperationsFilter represents a filter to apply to results when listing operations.
OperationUpdateRequest defines the user-customized subset of the provisioner configuration.
OperatorACL is a wrapper around any Operator service that implements ACLs - access control lists for every operation.
RawAgentReport is a transport-friendly agent report representation.
ResetUserPasswordRequest is a request to reset gravity site user password.
RotatePackageResponse describes a response to generate a new package for an existing one.
RotatePlanetConfigRequest is a request to rotate planet server's configuration package.
RotateSecretsRequest is a request to rotate server's secrets package.
RotateTeleportConfigRequest is a request to rotate teleport server's configuration package.
SeedConfig defines optional configuration to apply on OpsCenter start.
SetOperationStateRequest specifies the request to update operation with a given state.
Site represents portal site entry - a collection of servers used to support one particular application.
SiteKey is a key used to identify site.
SiteOperationKey identifies key to retrieve an opertaion.
SSHSignRequest is a request to sign SSH public Key with teleport's certificate.
SSHSignResponse is a response to SSHSignRequest.
SSHSignResponseRaw is a response to SSHSignRequest that has cert authorities marshaled in old format.
TLSSignRequest is a request to sign x509 PublicKey with site's local certificate authority.
TLSSignResponse is the response to TLSSignRequest.
UpdateCertificateRequest is the request to update the cluster certificate.
UpdateClusterConfigRequest is a request to update cluster configuration.
UpdateClusterEnvironmentVariablesRequest describes the request to update cluster runtime environment variables.
UpdateClusterEnvironRequest is a request to update cluster runtime environment.
UpdatePersistentStorageRequest is a request to update cluster persistent storage configuration.
UpdateUserRequest is a request to update existing user information.
UserInfo represents information about current user.
UserInfoRaw defines a wire-friendly user representation.
ValidateRemoteAccessRequest describes a request to run a set of commands on nodes in the cluster.
ValidateRemoteAccessResponse describes a request to run a set of commands on nodes in the cluster.
ValidateServersRequest is a request to run pre-installation checks.
ValidateServersResponse contains servers validation results.

# Interfaces

Accounts represents a collection of accounts in the portal.
AgentService coordinates install agents that are started on every server and report system information as well as receive instructions from the operator service.
APIKeys represents a collection of user API keys.
Applications interface handles application-specific tasks.
Audit provides interface for emitting audit log events.
Certificates contains methods for operating on cluster certificates.
ClusterConfiguration manages configuration in cluster.
Endpoints defines cluster and application endpoints management interface.
Identity provides methods for managing users, roles and authentication settings.
Install provides install-specific methods.
Leader defines leadership-related operations.
LogForwarders defines the interface to manage log forwarders.
Monitoring defines the interface to manage monitoring and metrics.
Operations installs and uninstalls gravity on a given site, it takes care of provisioning, configuring and deploying end user application as well as our system packages like planet and teleport.
OperationStateSetter defines an interface to set/update operation state.
Operator is capable of adding and deleting sites, updgrades and downgrades and modifying existing sites.
PersistentStorage provides access to persistent storage providers configurations.
Proxy helps to manage connections and clients to remote ops centers.
RuntimeEnvironment manages runtime environment variables in cluster.
Sites represents a collection of site records, where each site is a group of servers and installed application.
SMTP defines the interface to manage cluster SMTP configuration.
Status defines operations with site status.
TeleportProxyService is SSH proxy access portal - gives access to remote sites via SSH.
Tokens represents a token management layer.
Updates enables manual cluster update management.
Users represents a collection of users in the portal.
Validation defines a set of data validation primitives.

# Type aliases

Account is a collection of sites and represents some company.
Nodes is a list of nodes.
OperationMatcher is a function type that matches the given operation.
OperationStateFunc is a function handler for setting the operation state.
ProgressEntry is a log entry indicating operation progress ProgressEntry state goes through the following transitions: in_progress -> failed or completed.
SiteOperation represents any operation that is performed on the site e.g.
SiteOperations groups several site operations.