cmd

package
v0.0.0-...-ae7e55c Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 126 Imported by: 0

README

Commands

Command with subcommands definition

Define the main command as so:

type ClusterCmd struct {
    Create ClusterCreateCmd `command:"create" subcommands-optional:"true" description:"Create a cluster"`
    List ClusterListCmd `command:"list" subcommands-optional:"true" description:"List clusters"`
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

// this is required to display help if `aerolab cluster` command is called without any subcommands
func (c *ClusterCmd) Execute(args []string) error {
	c.Help.Execute(args)
	return nil
}

The available tags are:

  • command - the command name
  • subcommands-optional - must be true
  • description - description of the command
  • webicon - icon for the command in the web interface
  • invwebforce - whether running this command will force the web interface to refresh
  • webhidden - whether the command is hidden from the web interface
  • hidden - whether the command is hidden from the help output

Command definition

Start by adding a struct definition. See example below.

type ClusterCreateCmd struct {
    Name string `short:"n" long:"name" description:"Name of the cluster" default:"asd"`
    Count int `short:"c" long:"count" description:"Number of nodes to create" default:"1"`
    GCP ClusterCreateCmdGcp `group:"GCP Backend" description:"backend-gcp"`
    AWS ClusterCreateCmdAws `group:"AWS Backend" description:"backend-aws"`
    Docker ClusterCreateCmdDocker `group:"Docker Backend" description:"backend-docker"`
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

type ClusterCreateCmdGcp struct {
    Zone string `short:"z" long:"zone" description:"Zone to create the cluster in" default:"us-central1-a"`
}

type ClusterCreateCmdAws struct {
    Region string `short:"r" long:"region" description:"Region to create the cluster in" default:"us-east-1"`
}

type ClusterCreateCmdDocker struct {
    Network string `short:"n" long:"network" description:"Network to create the cluster in" default:"default"`
}

Explanation:

  • the struct needs parameters which will be called, with tags defining what those parameters are
  • for backend parameter groups, define the group tag with friendly backend name, and the description tag with backend-<backend-name>
    • backends which are not currently enabled, will have their options hidden automatically if this definition is followed
    • optional namespace tag can be specified on a group, all command-line switches will be prefixed with the namespace
  • available tags for non-backend-special parameters:
    • short - short flag
    • long - long flag
    • description - description of the parameter
    • default - default value of the parameter
    • hidden - whether the parameter is hidden from the help output
    • webhidden - whether the parameter is hidden from the web interface
    • simplemode - whether the parameter is a simple mode parameter
    • group - group of the parameter - if group is defined, the parameter will be displayed in help in it's own section
    • namespace - if specified on a group, all command-line switches will be prefixed with the namespace

Adding the command to the CLI

Add the command to the cmd.go file in order to make it available to the CLI.

Help function

  • the Help subcommand definition must be present in all commands, as it will allow for appending the help word at the end of the command to get it's usage

Command execution

The command execution is done by defining the Execute function of the command struct. It is advised to perform system and backend init here, with basic logging, and then to call the actual command function. All exits from the Execute function will be handled by the Error function, which will log the error if needed and exit with the appropriate code. Example below:

func (c *ClusterCreateCmd) Execute(args []string) error {
    // initialize the system with the backend, and check for available aerolab upgrade
	cmd := []string{"cluster", "create"}
	system, err := Initialize(&Init{InitBackend: true, UpgradeCheck: true}, cmd, c, args...)
	if err != nil {
		return Error(err, system, cmd, c, args)
	}
	system.Logger.Info("Running %s", strings.Join(cmd, "."))

    // run the actual command function, passing it the system, command name and arguments
	err = c.ClusterCreate(system, cmd, args, nil)
	if err != nil {
		return Error(err, system, cmd, c, args)
	}

    // log the completion of the command and exit
	system.Logger.Info("Done")
	return Error(nil, system, cmd, c, args)
}

Actual command function should be defined as per the below example.

  • it should be checking if system is set and initialize it if not
  • it should pass the inventory argument to the init function
  • it should NOT be checking for upgrades (this should only be done in the Execute function so it only happens once)
func (c *ClusterCreateCmd) ClusterCreate(system *System, cmd []string, args []string, inventory *backends.Inventory) error {
    if system == nil {
        var err error
        system, err = Initialize(&Init{InitBackend: true, ExistingInventory: inventory}, cmd, c, args...)
        if err != nil {
            return err
        }
    }
    // if we intend to use the inventory
    if inventory == nil {
        inventory = system.Backend.GetInventory()
    }
}

Initialize features

  • InitBackend - whether to initialize the backend (set if the command requires it)
  • UpgradeCheck - check for available aerolab upgrade and print the upgrade message if needed
  • ExistingInventory - pass the inventory to the init function - if this is set, the system Init function will set the inventory to the passed one, and will not try to fetch it from the backend

Flow

  • the function being called as Execute:
    • should only happen if the function is called directly from the CLI; internal calls should be done via the command function, not Execute
    • Execute will initialize the system, perform basic logging, and call the command function itself, passing it the system parameter, command name and arguments
    • the command function itself will then continue without reinitializing the system, as it was already set by the Execute function
  • the command is called as the command function itself (c.ClusterCreate) instead of via Execute (called internally from another function):
    • the caller may decide to pass the initialized system, in which case the command function will share the system.Opts state and logger with the caller
    • the caller may decide to not pass the system (set to nil):
      • the command function will initialize the system itself as needed
      • if the Inventory was passed to the command function, it will pass it to the system Init. This avoids re-fetching the inventory from the backend
      • if the Inventory was not passed to the command function, the system Init will fetch the inventory from the backend for this call

Cmd Tags

  • instances:
    • aerolab.type - instance type, values:
      • template.create - instance is a temp instance used for creating templates and should not otherwise exist
      • values from aerolab.image.type
      • aerospike, agi, or vscode etc
    • aerolab.soft.version - software version, values:
      • 5.1.0.1 - aerospike version
      • 1.0.0 - AMS version
      • etc
    • aerolab.custom.image - Docker: if set, the instance is a custom image and attach should use docker's exec
    • aerolab.old.type - instance type, values: client - this is for backwards compatibility only
  • images:
    • aerolab.image.type - image type, values:
      • aerospike - aerospike image
      • ams - AMS image
      • etc
    • aerolab.soft.version - software version, values:
      • 5.1.0.1 - aerospike version
      • 1.0.0 - AMS version
      • etc

Documentation

Index

Constants

View Source
const (
	DockerRegistryURLNA       = "https://storage.googleapis.com/aerospike-docker-images-na"
	DockerRegistryURLEU       = "https://storage.googleapis.com/aerospike-docker-images-eu"
	DockerRegistryURLDisabled = ""
)
View Source
const (
	// DefaultClusterName is the cluster every single-cluster command works on
	// unless told otherwise.
	DefaultClusterName = "asd"
	// DefaultSourceClusterName and DefaultDestClusterName name the two ends of
	// commands that take a pair of clusters, such as xdr create-clusters,
	// xdr connect and net block.
	DefaultSourceClusterName = DefaultClusterName + "-source"
	DefaultDestClusterName   = DefaultClusterName + "-dest"
	// DefaultClientName is the group name for client commands that are not
	// specific to one client type.
	DefaultClientName = "client"
)

The naming convention behind the `default` struct tags on cluster and client name parameters. Struct tags have to spell the value out, so these constants are what the tags are checked against (see TestDefaultNames) rather than their source.

View Source
const (
	// ExitCodeOK is returned when the command succeeded.
	ExitCodeOK = 0
	// ExitCodeError is the generic failure code.
	ExitCodeError = 1
	// ExitCodeCapacity is returned when AWS or GCP could not supply the
	// requested capacity (insufficient instance capacity, zone resource pool
	// exhausted, quota exceeded, and similar). Retrying later, in another
	// zone, or with a different instance type is usually what is needed.
	ExitCodeCapacity = 10
)

Exit codes aerolab terminates with. Commands that simply fail keep using ExitCodeError; the more specific codes exist so that automation can tell retryable infrastructure problems apart from real failures without parsing log output.

Signal-driven shutdown does not go through here: pkg/utils/shutdown exits with the conventional 128+signal values (130 for SIGINT, 143 for SIGTERM).

View Source
const ClusterFeatureAGI = 1

ClusterFeatureAGI is the feature flag for AGI instances

View Source
const EnvFirewallAutolock = "AEROLAB_FIREWALL_AUTOLOCK"

EnvFirewallAutolock disables the automatic creation, re-locking and attachment of the caller's firewall when set to a false-y value.

Variables

View Source
var ErrExecuteError = errors.New("execute error")
View Source
var ErrSomeNodesReturnedAnError = errors.New("some nodes returned an error")

Functions

func AerolabRootDir

func AerolabRootDir() (dirPath string, err error)

func AerolabRootDirOld

func AerolabRootDirOld() (dirPath string, err error)

func ApplyDefaultOverridesToParser

func ApplyDefaultOverridesToParser(parser *flags.Parser)

ApplyDefaultOverridesToParser rewrites the defaults of the parser's options to match commandDefaultOverrides. It must run before the arguments are parsed, since go-flags applies defaults at the end of a parse.

func AskForFloat

func AskForFloat(prompt string) (float64, error)

func AskForInt

func AskForInt(prompt string) (int, error)

func AskForSecret

func AskForSecret(prompt string) (string, error)

AskForSecret reads a value from the terminal without echoing it back.

func AskForString

func AskForString(prompt string) (string, error)

func CheckBinaryDirWritable

func CheckBinaryDirWritable() error

CheckBinaryDirWritable verifies that the directory containing the aerolab binary is writable. Returns nil if writable, or an error with guidance to re-run with elevated privileges.

func CleanupDuplicateTemplates

func CleanupDuplicateTemplates(images backends.ImageList, logger *logger.Logger) (*backends.Image, error)

CleanupDuplicateTemplates removes duplicate templates, keeping only the oldest one. This handles the race condition where two users simultaneously create the same template.

Parameters:

  • images: list of images that match the template criteria
  • logger: logger for output

Returns:

  • *backends.Image: the template to use (oldest one)
  • error: nil on success, or an error

func ConfigFileName

func ConfigFileName() (cfgFile string, err error)

func CreateSecurityGroups

func CreateSecurityGroups(system *System, namePrefix string, ips []string, portList []string, vpc string, backendType string, cmd []string, c any, args []string, inventory *backends.Inventory) error

func DefaultOverridesForPath

func DefaultOverridesForPath(path ...string) map[string]string

DefaultOverridesForPath returns the default overrides for a command, or nil if it has none. The path may be given slash separated ("client/create/ams") or as the components of the command line.

func DeleteSecurityGroups

func DeleteSecurityGroups(system *System, namePrefix string, all bool, backendType string, cmd []string, c any, args []string, inventory *backends.Inventory) error

func Error

func Error(err error, system *System, command []string, params any, args []string) error

func ExecuteCommandByPathDirect

func ExecuteCommandByPathDirect(system *System, path string, params map[string]any, logWriter io.Writer) error

ExecuteCommandByPathDirect executes a command by its path with given parameters, writing all output to the provided io.Writer. This is used for subprocess execution.

func ExecuteCommandByPathWithLogger

func ExecuteCommandByPathWithLogger(system *System, path string, params map[string]any, logWriter io.Writer) error

ExecuteCommandByPathWithLogger executes a command by its path with given parameters, writing logs to the provided io.Writer (for async job execution)

func ExitCodeFor

func ExitCodeFor(err error) int

ExitCodeFor resolves the process exit code for an error returned by a command. Errors that carry their own code win; otherwise cloud capacity failures are recognised so they can be retried by the caller.

func GenerateJobID

func GenerateJobID() string

GenerateJobID creates a new job ID using shortuuid and timestamp

func GetAerolabVersion

func GetAerolabVersion() (branch, commit, edition, friendlyString string)

func GetAgiStatus

func GetAgiStatus(enabled bool, ingestProgressPath string) (*ingest.IngestStatusStruct, error)

GetAgiStatus retrieves comprehensive system and ingest status from an AGI instance. This function is platform-specific and uses Unix syscalls for system information.

Parameters:

  • enabled: If false, returns an empty status struct
  • ingestProgressPath: Path to the directory containing ingest progress files

Returns:

  • *ingest.IngestStatusStruct: Status information including system resources, process status, and ingest progress
  • error: nil on success, or an error describing what failed

func GetCurrentOwnerUser

func GetCurrentOwnerUser() string

func GetSSHAuthorizedKeysGzB64

func GetSSHAuthorizedKeysGzB64() string

GetSSHAuthorizedKeysGzB64 reads and compresses the authorized_keys file for transfer. It returns a base64-encoded gzip-compressed version of the file contents.

Returns:

  • string: Base64-encoded gzip-compressed authorized_keys content, or empty string on error

func GetSelfPath

func GetSelfPath() (string, error)

func GetVPCPeeringStatusSummary

func GetVPCPeeringStatusSummary(status *VPCPeeringStatusResponse) string

GetVPCPeeringStatusSummary returns a summary string for table display (e.g., "OK" or "3/4")

func IsInteractive

func IsInteractive() bool

func IsTelemetryEnabled

func IsTelemetryEnabled(system *System) (bool, string)

IsTelemetryEnabled checks if telemetry is enabled based on the system configuration. This function can be called by other commands (e.g., instances create, volumes create) to determine if the aerolab.telemetry tag should be added to created resources.

Parameters:

  • system: The system object containing configuration and logger

Returns:

  • bool: true if telemetry is enabled, false otherwise
  • string: the persistent user UUID for telemetry, empty if telemetry is disabled

func ListSecurityGroups

func ListSecurityGroups(system *System, output string, tableTheme string, sortBy []string, backendType string, cmd []string, c any, args []string, inventory *backends.Inventory, owner string, out io.Writer, usePager bool, page *pager.Pager) error

func ListSubnets

func ListSubnets(system *System, output string, tableTheme string, sortBy []string, backendType string, cmd []string, c any, args []string, inventory *backends.Inventory, out io.Writer, usePager bool, page *pager.Pager) error

func LockSecurityGroups

func LockSecurityGroups(system *System, namePrefix string, ips []string, portList []string, backendType string, cmd []string, c any, args []string, inventory *backends.Inventory) error

LockSecurityGroups restricts the given ports of the named security groups to the given source CIDRs, revoking whatever else those ports allowed. With no name it locks the caller's own per-user groups, and with no ports it locks all protocols, matching the per-user autolock default.

func MigrateAerolabConfig

func MigrateAerolabConfig(oldDir string, newDir string) error

func NextPowOf2

func NextPowOf2(n int) int

func ParseExtendedDuration

func ParseExtendedDuration(s string) (time.Duration, error)

ParseExtendedDuration parses a duration string with extended calendar units.

Calendar units (use time.Now and AddDate for correct rollover):

Y/y = calendar years, M = calendar months

Fixed units:

W/w = 7 days, D/d = 24 hours

Standard Go units (lowercase only, handled by time.ParseDuration):

h, m (minutes), s, ms, us, ns

Composite values are supported: "1Y6M", "1D2h30m", "2W12h". Extended units must appear before standard units.

func PrintHelp

func PrintHelp(allBackends bool, extraInfo string) error

func PutSSHAuthorizedKeys

func PutSSHAuthorizedKeys(ContentsGzB64 string)

PutSSHAuthorizedKeys appends SSH keys from a compressed base64 string to authorized_keys. This is used for monitor recovery to restore SSH access to instances.

Parameters:

  • ContentsGzB64: Base64-encoded gzip-compressed SSH authorized_keys content

func RandStringRunes

func RandStringRunes(n int, src rand.Source, srcLock *sync.Mutex) string

RandStringRunes generates a random string of length n

func ReExecWithSudo

func ReExecWithSudo(log *logger.Logger, origErr error) error

ReExecWithSudo re-runs the current aerolab invocation under sudo when the binary directory is not writable, so the user gets a single password prompt instead of a hard failure. The exact original os.Args (resolved through the canonical self path) are forwarded.

On success the sudo'd child takes over: this function calls os.Exit with the child's exit code and never returns. If re-execution is not possible (Windows, already root, sudo missing, opt-out via AEROLAB_NO_AUTO_SUDO=1, or self-path resolution failure), origErr is returned unchanged so the caller can surface the original "no write permission" message.

func ReconstructCommandLine

func ReconstructCommandLine(cmdPath []string, cmdStruct any, preferShort bool, includeDefaults ...bool) string

ReconstructCommandLine builds a command line string from a command struct using reflection. It reads struct tags (short, long, default) to format flags appropriately.

Parameters:

  • cmdPath: the command path components (e.g., []string{"cluster", "create"})
  • cmdStruct: the command struct instance with current values
  • preferShort: if true, use short flags (-n) when available; otherwise use long flags (--name)
  • includeDefaults: if true, include flags even when their value matches the default

Returns a shell-safe command string like: aerolab cluster create --name=asd --count=3

func ReconstructCommandLineForBackend

func ReconstructCommandLineForBackend(cmdPath []string, cmdStruct any, preferShort bool, includeDefaults bool, activeBackend string) string

ReconstructCommandLineForBackend is like ReconstructCommandLine but also filters out parameters belonging to non-active backends. Groups with description:"backend-X" where X does not match activeBackend are omitted from the output. If activeBackend is empty, no backend filtering is applied.

func RequireChoice

func RequireChoice(val string, name string, options ...string) (string, error)

RequireChoice returns val when it holds a value, otherwise lets the user pick one of options from a list in interactive mode. With no options to offer there is nothing to pick from, so the required-option error is returned as it would be non-interactively.

func RequireFloat

func RequireFloat(val float64, name string) (float64, error)

RequireFloat returns val when it is non-zero, otherwise prompts for a number in interactive mode.

func RequireInt

func RequireInt(val int, name string) (int, error)

RequireInt returns val when it is non-zero, otherwise prompts for a number in interactive mode. Zero is treated as "not provided", matching how the commands validate their integer options.

func RequireSecret

func RequireSecret(val string, name string) (string, error)

RequireSecret behaves like RequireString but does not echo what is typed.

func RequireString

func RequireString(val string, name string) (string, error)

RequireString returns val when it holds a value. When it is empty, the user is asked for one in interactive mode; otherwise "<name> is required" is returned, which is what non-interactive callers have always seen.

func ResolveDynamicChoices

func ResolveDynamicChoices(system *System, cmdPath string, paramName string, methodName string, namespace string, fieldName string) ([]string, []string, error)

ResolveDynamicChoices calls a method to get dynamic choices for a parameter. It searches the command struct (including nested group/namespace structs) for the field matching paramName/fieldName, then calls the specified method on it. Returns (values, labels, error) where labels may be nil if no display labels are available.

func ShowCommands

func ShowCommands(fileName string, command ShowCommand) error

func ShowHideBackend

func ShowHideBackend(parser *flags.Parser, enabledBackends []string)

func ShowcommandsBusybox

func ShowcommandsBusybox()

func SimpleModePathFromSlash

func SimpleModePathFromSlash(slashPath string) string

SimpleModePathFromSlash converts a slash-separated path (e.g. "cluster/create") to dot-separated (e.g. "cluster.create") for use with simple mode matching.

func TelemetryEvent

func TelemetryEvent(command []string, params any, args []string, system *System, err error)

func TelemetrySend

func TelemetrySend(logger *logger.Logger)

func UpdateDiskCache

func UpdateDiskCache(system *System) func()

UpdateDiskCache registers a disk cache update to run on both normal exit (via defer) and on Ctrl+C interrupt (via shutdown handler). It returns a function that should be deferred.

Usage:

defer UpdateDiskCache(system)()

This ensures disk cache is updated whether the command completes normally or is interrupted.

func UpdateDiskCacheNow

func UpdateDiskCacheNow(system *System)

UpdateDiskCacheNow updates the disk cache immediately without registering a shutdown hook. Use this for non-deferred calls where you want to update the cache right away.

func WithExitCode

func WithExitCode(err error, code int) error

WithExitCode tags an error so that aerolab terminates with the given exit code. It is a no-op on a nil error.

Types

type AerospikeCloud

type AerospikeCloud struct {
	ClusterSize int    `json:"clusterSize"`
	DataStorage string `json:"dataStorage"`
}

type AerospikeCmd

type AerospikeCmd struct {
	Start     AerospikeStartCmd     `command:"start" subcommands-optional:"true" description:"Start aerospike" webicon:"fas fa-play"`
	Stop      AerospikeStopCmd      `command:"stop" subcommands-optional:"true" description:"Stop aerospike" webicon:"fas fa-stop"`
	Restart   AerospikeRestartCmd   `command:"restart" subcommands-optional:"true" description:"Restart aerospike" webicon:"fas fa-forward-step"`
	Status    AerospikeStatusCmd    `command:"status" subcommands-optional:"true" description:"Aerospike daemon status" webicon:"fas fa-circle-question"`
	Upgrade   AerospikeUpgradeCmd   `command:"upgrade" subcommands-optional:"true" description:"Upgrade aerospike daemon" webicon:"fas fa-circle-arrow-up"`
	ColdStart AerospikeColdStartCmd `command:"cold-start" subcommands-optional:"true" description:"Cold-Start aerospike" webicon:"fas fa-play"`
	IsStable  AerospikeIsStableCmd  `` /* 149-byte string literal not displayed */
	Help      HelpCmd               `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeCmd) Execute

func (c *AerospikeCmd) Execute(args []string) error

type AerospikeColdStartCmd

type AerospikeColdStartCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeColdStartCmd) ColdStartAerospike

func (c *AerospikeColdStartCmd) ColdStartAerospike(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

func (*AerospikeColdStartCmd) Execute

func (c *AerospikeColdStartCmd) Execute(args []string) error

type AerospikeIsStableCmd

type AerospikeIsStableCmd struct {
	ClusterName      TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated OR 'all' to affect all clusters" default:"asd"`
	Nodes            TypeNodes       `short:"l" long:"nodes" description:"Only consider the given nodes, e.g. --nodes=1-4,7,8"`
	Namespace        string          `short:"m" long:"namespace" description:"Namespace to change" default:"test"`
	Wait             bool            `short:"w" long:"wait" description:"If set, will wait in a loop until the cluster is stable, and then return"`
	WaitTimeout      int             `short:"o" long:"wait-timeout" description:"If set, will timeout if the cluster doesn't become stable by this many seconds"`
	IgnoreMigrations bool            `short:"i" long:"ignore-migrations" description:"If set, will ignore migrations when checking if cluster is stable"`
	IgnoreClusterKey bool            `` /* 127-byte string literal not displayed */
	NotClusterKey    string          `` /* 140-byte string literal not displayed */
	Verbose          bool            `short:"v" long:"verbose" description:"Enable verbose logging"`
	Threads          int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries       int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep       time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help             HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeIsStableCmd) Execute

func (c *AerospikeIsStableCmd) Execute(args []string) error

func (*AerospikeIsStableCmd) IsStable

func (c *AerospikeIsStableCmd) IsStable(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (bool, error)

IsStable checks if the aerospike cluster is stable. This function performs the following operations: 1. Gets the list of nodes in the cluster 2. Runs cluster-stable check on all nodes 3. Compares cluster keys across all nodes 4. Optionally waits in a loop until cluster becomes stable

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments

Returns:

  • bool: true if cluster is stable, false otherwise
  • error: nil on success, or an error describing what failed

type AerospikeRestartCmd

type AerospikeRestartCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeRestartCmd) Execute

func (c *AerospikeRestartCmd) Execute(args []string) error

func (*AerospikeRestartCmd) RestartAerospike

func (c *AerospikeRestartCmd) RestartAerospike(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type AerospikeServer

type AerospikeServer struct {
	Namespaces []Namespace `json:"namespaces"`
}

type AerospikeStartCmd

type AerospikeStartCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeStartCmd) Execute

func (c *AerospikeStartCmd) Execute(args []string) error

func (*AerospikeStartCmd) StartAerospike

func (c *AerospikeStartCmd) StartAerospike(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type AerospikeStatusCmd

type AerospikeStatusCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeStatusCmd) Execute

func (c *AerospikeStatusCmd) Execute(args []string) error

func (*AerospikeStatusCmd) StatusAerospike

func (c *AerospikeStatusCmd) StatusAerospike(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type AerospikeStopCmd

type AerospikeStopCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeStopCmd) Execute

func (c *AerospikeStopCmd) Execute(args []string) error

func (*AerospikeStopCmd) StopAerospike

func (c *AerospikeStopCmd) StopAerospike(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type AerospikeUpgradeCmd

type AerospikeUpgradeCmd struct {
	ClusterName      TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes            TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	AerospikeVersion string          `` /* 174-byte string literal not displayed */
	CustomSourceFile flags.Filename  `` /* 132-byte string literal not displayed */
	RestartAerospike bool            `short:"r" long:"restart" description:"Restart aerospike service after upgrade"`
	Threads          int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries       int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep       time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help             HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AerospikeUpgradeCmd) Execute

func (c *AerospikeUpgradeCmd) Execute(args []string) error

func (*AerospikeUpgradeCmd) UpgradeAerospike

func (c *AerospikeUpgradeCmd) UpgradeAerospike(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

UpgradeAerospike upgrades Aerospike to the specified version on the cluster nodes. This function performs the following operations: 1. Resolves the Aerospike version and gets the install script 2. Creates an upgrade script with optional restart functionality 3. Uploads and executes the script on each node 4. Handles debug output and error reporting

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • backends.InstanceList: List of instances that were processed
  • error: nil on success, or an error describing what failed

type AgiAddTokenCmd

type AgiAddTokenCmd struct {
	ClusterName TypeAgiClusterName `short:"n" long:"name" description:"AGI name" default:"agi"`
	TokenName   string             `short:"u" long:"token-name" description:"A unique token name; default: auto-generate a random name"`
	TokenSize   int                `short:"s" long:"size" description:"Size of the new token to be generated" default:"128"`
	Token       string             `` /* 141-byte string literal not displayed */
	GenURL      bool               `long:"url" description:"Generate and display a direct-access token URL"`
	Open        bool               `short:"o" long:"open" description:"Open the AGI URL in the default browser (implies --url)"`
	Remove      bool               `short:"r" long:"remove" description:"Remove the token instead of adding it"`
	List        bool               `short:"l" long:"list" description:"List all tokens for the AGI instance"`
	MaxRetries  int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiAddTokenCmd adds an authentication token to the AGI proxy. The token is stored in /opt/agi/tokens/{name} and the proxy is signaled to reload tokens via SIGHUP.

Tokens must be at least 64 characters long for security.

func (*AgiAddTokenCmd) AddToken

func (c *AgiAddTokenCmd) AddToken(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

AddToken adds or manages authentication tokens for the AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiAddTokenCmd) Execute

func (c *AgiAddTokenCmd) Execute(args []string) error

Execute implements the command execution for agi add-auth-token.

Returns:

  • error: nil on success, or an error describing what failed

type AgiAttachCmd

type AgiAttachCmd struct {
	ClusterName     TypeAgiClusterName     `short:"n" long:"name" description:"AGI name" default:"agi"`
	Node            TypeNodesPlusAllOption `short:"l" long:"nodes" description:"Node to attach to (typically 1 for AGI)" default:"1"`
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"Enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads for execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout (0 for no timeout)"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path to redirect stdout to"`
	Err             flags.Filename         `short:"E" long:"stderr" description:"Path to redirect stderr to (only with --no-terminal)"`
	Tail            []string               `description:"Command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AgiAttachCmdHelp       `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiAttachCmd attaches to an AGI instance shell. This command provides interactive shell access to the AGI instance for administration, debugging, and manual operations.

The command supports:

  • Interactive terminal sessions
  • Command execution with arguments
  • Detached process mode
  • Parallel execution across multiple nodes (if applicable)

func (*AgiAttachCmd) AttachAGI

func (c *AgiAttachCmd) AttachAGI(system *System, inventory *backends.Inventory, args []string) error

AttachAGI attaches to the AGI instance shell.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • args: Command arguments to execute (if any)

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiAttachCmd) Execute

func (c *AgiAttachCmd) Execute(args []string) error

Execute implements the command execution for agi attach.

Returns:

  • error: nil on success, or an error describing what failed

type AgiAttachCmdHelp

type AgiAttachCmdHelp struct{}

AgiAttachCmdHelp provides help for the agi attach command.

func (*AgiAttachCmdHelp) Execute

func (c *AgiAttachCmdHelp) Execute(args []string) error

Execute prints help text for the agi attach command.

type AgiCmd

type AgiCmd struct {
	Template  AgiTemplateCmd  `command:"template" subcommands-optional:"true" description:"AGI template management" webicon:"fas fa-file-image"`
	Create    AgiCreateCmd    `command:"create" subcommands-optional:"true" description:"Create AGI instance" webicon:"fas fa-plus" invwebforce:"true"`
	List      AgiListCmd      `command:"list" subcommands-optional:"true" description:"List AGI instances" webicon:"fas fa-list"`
	Start     AgiStartCmd     `command:"start" subcommands-optional:"true" description:"Start AGI instance" webicon:"fas fa-play" invwebforce:"true"`
	Stop      AgiStopCmd      `command:"stop" subcommands-optional:"true" description:"Stop AGI instance" webicon:"fas fa-stop" invwebforce:"true"`
	Status    AgiStatusCmd    `command:"status" subcommands-optional:"true" description:"Show AGI status" webicon:"fas fa-info-circle"`
	Details   AgiDetailsCmd   `command:"details" subcommands-optional:"true" description:"Show ingest details" webicon:"fas fa-magnifying-glass"`
	Destroy   AgiDestroyCmd   `command:"destroy" subcommands-optional:"true" description:"Destroy AGI instance" webicon:"fas fa-trash" invwebforce:"true"`
	Delete    AgiDeleteCmd    `` /* 132-byte string literal not displayed */
	Attach    AgiAttachCmd    `command:"attach" subcommands-optional:"true" description:"Attach to AGI shell" webicon:"fas fa-terminal"`
	Query     AgiQueryCmd     `` /* 132-byte string literal not displayed */
	Open      AgiOpenCmd      `command:"open" subcommands-optional:"true" description:"Open AGI in browser" webicon:"fas fa-globe"`
	AddToken  AgiAddTokenCmd  `command:"add-auth-token" subcommands-optional:"true" description:"Add auth token" webicon:"fas fa-key"`
	Relabel   AgiRelabelCmd   `command:"change-label" subcommands-optional:"true" description:"Change label" webicon:"fas fa-tag"`
	Retrigger AgiRetriggerCmd `command:"run-ingest" subcommands-optional:"true" description:"Retrigger ingest" webicon:"fas fa-rotate"`
	Share     AgiShareCmd     `command:"share" subcommands-optional:"true" description:"Share via SSH key" webicon:"fas fa-share"`
	Monitor   AgiMonitorCmd   `command:"monitor" subcommands-optional:"true" description:"Monitor system" webicon:"fas fa-gauge"`
	Exec      AgiExecCmd      `command:"exec" subcommands-optional:"true" description:"AGI subsystems" hidden:"true"`
	Help      HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiCmd is the main AGI (Aerospike Grafana Integration) command structure. AGI provides a template-based approach where templates have all software pre-installed (grafana, the merged plugin+ingest service, and the web proxy), enabling fast instance creation.

func (*AgiCmd) Execute

func (c *AgiCmd) Execute(args []string) error

type AgiCreateCmd

type AgiCreateCmd struct {
	// Instance naming
	ClusterName TypeAgiClusterName `short:"n" long:"name" description:"AGI name (use ~auto~ for auto-generated name)" default:"agi"`
	AGILabel    string             `long:"label" description:"Friendly label for the AGI instance"`

	// Source options
	LocalSource   flags.Filename  `` /* 131-byte string literal not displayed */
	BindFilesDir  flags.Filename  `` /* 160-byte string literal not displayed */
	ClusterSource TypeClusterName `long:"source-cluster" description:"Cluster name to use as the source for logs"`

	// SFTP source options
	SftpEnable    bool           `long:"source-sftp-enable" description:"Enable SFTP source"`
	SftpThreads   int            `long:"source-sftp-threads" description:"Number of concurrent downloader threads" default:"1"`
	SftpHost      string         `long:"source-sftp-host" description:"SFTP host"`
	SftpPort      int            `long:"source-sftp-port" description:"SFTP port" default:"22"`
	SftpUser      string         `long:"source-sftp-user" description:"SFTP user"`
	SftpPass      string         `long:"source-sftp-pass" description:"SFTP password (supports ENV::VAR_NAME)" webtype:"password" telemetry:"redact"`
	SftpKey       flags.Filename `long:"source-sftp-key" description:"Key file for SFTP login"`
	SftpPath      string         `long:"source-sftp-path" description:"Path on SFTP to download logs from"`
	SftpRegex     string         `long:"source-sftp-regex" description:"Regex to filter files to download"`
	SftpSkipCheck bool           `long:"source-sftp-skipcheck" description:"Skip SFTP accessibility check"`

	// S3 source options
	S3Enable    bool   `long:"source-s3-enable" description:"Enable S3 source"`
	S3Threads   int    `long:"source-s3-threads" description:"Number of concurrent downloader threads" default:"4"`
	S3Region    string `` /* 134-byte string literal not displayed */
	S3Bucket    string `` /* 139-byte string literal not displayed */
	S3KeyID     string `long:"source-s3-key-id" description:"AWS access key ID (supports ENV::VAR_NAME)" telemetry:"redact"`
	S3Secret    string `long:"source-s3-secret-key" description:"AWS secret key (supports ENV::VAR_NAME)" webtype:"password" telemetry:"redact"`
	S3Path      string `long:"source-s3-path" description:"Path prefix in S3 bucket"`
	S3Regex     string `long:"source-s3-regex" description:"Regex to filter files to download"`
	S3SkipCheck bool   `long:"source-s3-skipcheck" description:"Skip S3 accessibility check"`
	S3Endpoint  string `long:"source-s3-endpoint" description:"Custom S3 endpoint URL"`

	// Memory/storage options
	NoDIM         bool `long:"no-dim" description:"Disable data-in-memory, use read-page-cache instead (less RAM, slower)"`
	NoDIMFileSize int  `long:"no-dim-filesize" description:"File size in GB when using --no-dim (default: auto-calculated)"`

	// SSL options
	ProxyDisableSSL bool           `long:"proxy-ssl-disable" description:"Disable TLS on the proxy"`
	ProxyCert       flags.Filename `long:"proxy-ssl-cert" description:"SSL certificate file (default: self-signed)"`
	ProxyKey        flags.Filename `long:"proxy-ssl-key" description:"SSL private key file (default: self-signed)"`

	// Proxy timeouts
	ProxyMaxInactive time.Duration `long:"proxy-max-inactive" description:"Max inactivity before shutdown" default:"1h"`
	ProxyMaxUptime   time.Duration `long:"proxy-max-uptime" description:"Max uptime before shutdown" default:"24h"`

	// Time range filtering
	TimeRanges     bool   `long:"ingest-timeranges-enable" description:"Enable time range filtering for log ingestion"`
	TimeRangesFrom string `long:"ingest-timeranges-from" description:"Time range start (format: 2006-01-02T15:04:05Z07:00)"`
	TimeRangesTo   string `long:"ingest-timeranges-to" description:"Time range end (format: 2006-01-02T15:04:05Z07:00)"`

	// Custom ingest options
	CustomSourceName string         `long:"ingest-custom-source-name" description:"Custom source name to display in Grafana"`
	PatternsFile     flags.Filename `long:"ingest-patterns-file" description:"Custom patterns YAML file for log ingest"`
	FeaturesFilePath flags.Filename `short:"f" long:"feature-file" description:"Features file to install, overriding the template's features file"`
	IngestLogLevel   int            `long:"ingest-log-level" description:"Log level: 1=CRITICAL,2=ERROR,3=WARN,4=INFO,5=DEBUG,6=DETAIL" default:"4"`
	IngestCpuProfile bool           `long:"ingest-cpu-profiling" description:"Enable CPU profiling for ingest"`
	// Ingest pipeline tuning. Both default to 0 = use the
	// embedded ingest-config defaults (which themselves auto-scale
	// where appropriate; see pkg/agi/ingest/struct.go). Setting a
	// positive value here pins the corresponding knob explicitly.
	IngestMaxConcurrentLogFiles int  `` /* 136-byte string literal not displayed */
	IngestMaxPutThreads         int  `` /* 150-byte string literal not displayed */
	PluginCpuProfile            bool `long:"plugin-cpu-profiling" description:"Enable CPU profiling for plugin"`
	PluginLogLevel              int  `long:"plugin-log-level" description:"Plugin log level" default:"4"`

	// Notification options
	SlackToken   string `long:"notify-slack-token" description:"Slack token for notifications (supports ENV::VAR_NAME)" telemetry:"redact"`
	SlackChannel string `long:"notify-slack-channel" description:"Slack channel for notifications"`

	// Monitor options
	MonitorUrl        string `long:"monitor-url" description:"AGI Monitor URL for sizing notifications"`
	MonitorCertIgnore bool   `long:"monitor-ignore-cert" description:"Ignore invalid monitor SSL certificate"`

	// Configuration options
	NoConfigOverride bool `long:"no-config-override" description:"Don't override existing config when restarting with EFS"`
	// RefreshEngineConfigs forces re-upload of engine-tuning configs
	// (ingest.yaml, plugin.yaml) even when NoConfigOverride is set.
	// Set by the monitor on sizing-driven reattach so that the new
	// instance's larger memSize is reflected in Pebble's CacheBytes /
	// MemTableSizeBytes and the plugin's concurrency knobs. Internal,
	// not exposed on the CLI.
	RefreshEngineConfigs bool   `json:"-"`
	Owner                string `long:"owner" description:"Owner tag value"`

	// Version options
	GrafanaVersion string `long:"grafana-version" description:"Grafana version" default:"11.2.6"`
	Distro         string `short:"d" long:"distro" description:"Linux distribution" default:"ubuntu"`
	DistroVersion  string `long:"distro-version" description:"Distribution version" default:"latest"`

	// Timeout
	Timeout  int  `short:"t" long:"timeout" description:"Creation timeout in minutes" default:"30"`
	NoVacuum bool `long:"no-vacuum" description:"Don't cleanup on failure"`

	// Force flag
	Force bool `long:"force" description:"Force create even if EFS volume already exists (will overwrite existing data)"`

	// Preferred template for reattach (internal use, not a CLI flag)
	// If set and the template exists, it will be used instead of resolving a new one
	PreferredTemplate string `json:"-"`

	// Aerolab binary option
	AerolabBinary flags.Filename `long:"aerolab-binary" description:"Path to local aerolab binary to install (required if running unofficial build)"`

	// AWS-specific options
	AWS AgiCreateCmdAws `group:"AWS" namespace:"aws" description:"backend-aws"`

	// GCP-specific options
	GCP AgiCreateCmdGcp `group:"GCP" namespace:"gcp" description:"backend-gcp"`

	// Docker-specific options
	Docker AgiCreateCmdDocker `group:"Docker" namespace:"docker" description:"backend-docker"`

	// Retry options
	MaxRetries int           `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

AgiCreateCmd creates a new AGI instance from an AGI template. This is the second most complex command, handling volume management, config generation, and multi-source log ingestion.

The command supports:

  • Local, SFTP, S3, and cluster sources for logs
  • EFS/GCP volume persistence
  • Docker volumes and bind mounts
  • SSL certificate configuration
  • Authentication via basic auth or tokens
  • Monitor integration for auto-scaling

func (*AgiCreateCmd) CreateAGI

func (c *AgiCreateCmd) CreateAGI(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (backends.InstanceList, error)

CreateAGI creates a new AGI instance from an AGI template.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • backends.InstanceList: The created AGI instance(s)
  • error: nil on success, or an error describing what failed

func (*AgiCreateCmd) Execute

func (c *AgiCreateCmd) Execute(args []string) error

Execute implements the command execution for agi create.

Returns:

  • error: nil on success, or an error describing what failed

type AgiCreateCmdAws

type AgiCreateCmdAws struct {
	InstanceType        guiInstanceType `` /* 155-byte string literal not displayed */
	Ebs                 string          `long:"ebs" description:"EBS volume size in GB" default:"40"`
	SecurityGroupID     string          `long:"firewall" description:"Security group IDs (comma-separated)"`
	SubnetID            string          `long:"placement" description:"Subnet ID or availability zone"`
	Tags                []string        `long:"tag" description:"Custom tags (key=value); can be specified multiple times"`
	WithEFS             bool            `long:"with-efs" description:"Use EFS for persistent storage"`
	EFSName             string          `long:"efs-name" description:"EFS volume name" default:"{AGI_NAME}"`
	EFSPath             string          `long:"efs-path" description:"EFS mount path" default:"/"`
	EFSMultiZone        bool            `long:"efs-multi-zone" description:"Enable multi-AZ EFS (higher cost)"`
	EFSExpires          TypeExpiry      `long:"efs-expire" description:"EFS expiry after last use" default:"96h"`
	EFSFips             bool            `long:"efs-fips" description:"Enable FIPS mode for the EFS mount"`
	TerminateOnPoweroff bool            `long:"terminate-on-poweroff" description:"Terminate instance on poweroff"`
	SpotInstance        bool            `long:"spot" description:"Request spot instance"`
	SpotFallback        bool            `long:"spot-fallback" description:"Fall back to on-demand if spot unavailable"`
	Expires             TypeExpiry      `long:"expire" description:"Instance expiry time" default:"30h"`
	Route53ZoneId       string          `long:"route53-zone-id" description:"Route53 zone ID for DNS"`
	Route53DomainName   string          `long:"route53-domain" description:"Route53 domain name"`
	DisablePublicIP     bool            `long:"no-public-ip" description:"Disable public IP assignment"`
}

AgiCreateCmdAws contains AWS-specific options for AGI instance creation.

type AgiCreateCmdDocker

type AgiCreateCmdDocker struct {
	ExposePortsToHost string   `long:"expose-ports" description:"Port forwarding (HOST_PORT:NODE_PORT)"`
	Privileged        bool     `long:"privileged" description:"Run in privileged mode"`
	NetworkName       string   `long:"network" description:"Docker network name"`
	Disks             []string `` /* 224-byte string literal not displayed */
}

AgiCreateCmdDocker contains Docker-specific options for AGI instance creation.

type AgiCreateCmdGcp

type AgiCreateCmdGcp struct {
	InstanceType        guiInstanceType `long:"instance" description:"Instance type" default:"c2d-standard-4" webchoice:"method::List"`
	Disks               []string        `long:"disk" description:"Disk configuration (type=X,size=Y)" default:"type=pd-ssd,size=40"`
	Zone                guiZone         `long:"zone" description:"GCP zone" webchoice:"method::List"`
	VPC                 guiVpc          `long:"vpc" description:"GCP VPC network name to use; empty=default VPC" webchoice:"method::List"`
	Subnet              string          `long:"subnet" description:"GCP subnet name within the selected VPC; empty=auto-select first subnet in the zone's region"`
	Tags                []string        `long:"network-tag" description:"Network tags; can be specified multiple times"`
	Labels              []string        `long:"tag" description:"Custom tags (labels) (key=value); can be specified multiple times"`
	SpotInstance        bool            `long:"spot" description:"Request spot instance"`
	Expires             TypeExpiry      `long:"expire" description:"Instance expiry time" default:"30h"`
	DisablePublicIP     bool            `long:"no-public-ip" description:"Disable public IP assignment"`
	WithVol             bool            `long:"with-vol" description:"Use persistent volume for storage"`
	VolName             string          `long:"vol-name" description:"Volume name" default:"{AGI_NAME}"`
	VolExpires          TypeExpiry      `long:"vol-expire" description:"Volume expiry after last use" default:"96h"`
	VolFips             bool            `long:"vol-fips" description:"Enable FIPS mode for the volume mount"`
	TerminateOnPoweroff bool            `long:"terminate-on-poweroff" description:"Terminate instance on poweroff"`
}

AgiCreateCmdGcp contains GCP-specific options for AGI instance creation.

Default instance: c2d-standard-4 (16 GiB) post-Pebble. The previous default (c2d-highmem-4, 32 GiB) was sized for an in-memory primary index that no longer exists; the new sizing model needs floor + 10% of log size + headroom, which fits comfortably in 16 GiB for log bundles up to ~80 GiB. Larger workloads ladder up via the monitor.

type AgiDeleteCmd

type AgiDeleteCmd struct {
	Name   TypeAgiClusterName `short:"n" long:"name" description:"AGI instance name(s), comma-separated" default:"agi"`
	Force  bool               `short:"f" long:"force" description:"Do not ask for confirmation"`
	NoWait bool               `long:"no-wait" description:"Do not wait for the instance to terminate"`
	DryRun bool               `long:"dry-run" description:"Print what would be done but don't do it"`
	Help   HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiDeleteCmd destroys an AGI instance AND its associated EFS/volume. This is a destructive operation that permanently deletes all AGI data.

Usage:

aerolab agi delete -n myagi
aerolab agi delete -n myagi --force

func (*AgiDeleteCmd) DeleteAGI

func (c *AgiDeleteCmd) DeleteAGI(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (backends.InstanceList, error)

DeleteAGI destroys AGI instance(s) and their associated volumes.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • backends.InstanceList: The deleted AGI instance(s)
  • error: nil on success, or an error describing what failed

func (*AgiDeleteCmd) Execute

func (c *AgiDeleteCmd) Execute(args []string) error

Execute implements the command execution for agi delete.

Returns:

  • error: nil on success, or an error describing what failed

type AgiDestroyCmd

type AgiDestroyCmd struct {
	Name   TypeAgiClusterName `short:"n" long:"name" description:"AGI instance name(s), comma-separated" default:"agi"`
	Force  bool               `short:"f" long:"force" description:"Do not ask for confirmation"`
	NoWait bool               `long:"no-wait" description:"Do not wait for the instance to terminate"`
	DryRun bool               `long:"dry-run" description:"Print what would be done but don't do it"`
	Help   HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiDestroyCmd destroys an AGI instance. This terminates the instance but preserves any associated EFS/volumes so the AGI can be recreated with the same data.

Usage:

aerolab agi destroy -n myagi
aerolab agi destroy -n myagi --force

func (*AgiDestroyCmd) DestroyAGI

func (c *AgiDestroyCmd) DestroyAGI(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (backends.InstanceList, error)

DestroyAGI destroys AGI instance(s).

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • backends.InstanceList: The destroyed AGI instance(s)
  • error: nil on success, or an error describing what failed

func (*AgiDestroyCmd) Execute

func (c *AgiDestroyCmd) Execute(args []string) error

Execute implements the command execution for agi destroy.

Returns:

  • error: nil on success, or an error describing what failed

type AgiDetailsCmd

type AgiDetailsCmd struct {
	Name       TypeAgiClusterName `short:"n" long:"name" description:"AGI instance name" default:"agi"`
	Output     string             `short:"o" long:"output" description:"Output format (text, table, json, json-indent, jq)" default:"table"`
	TableTheme string             `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	Watch      bool               `short:"w" long:"watch" description:"Watch mode - continuously update the output"`
	Interval   int                `short:"i" long:"interval" description:"Watch interval in seconds" default:"5"`
	Pager      bool               `short:"p" long:"pager" description:"Use a pager to display the output"`
	MaxRetries int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help       HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiDetailsCmd shows detailed ingest progress for an AGI instance. This includes step-by-step progress, file counts, and error details.

Usage:

aerolab agi details -n myagi
aerolab agi details -n myagi --watch

func (*AgiDetailsCmd) Execute

func (c *AgiDetailsCmd) Execute(args []string) error

Execute implements the command execution for agi details.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiDetailsCmd) ShowDetails

func (c *AgiDetailsCmd) ShowDetails(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, out *os.File) error

ShowDetails shows detailed ingest progress for an AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments
  • out: Output writer

Returns:

  • error: nil on success, or an error describing what failed

type AgiDetailsOutput

type AgiDetailsOutput struct {
	Name     string              `json:"name"`
	Label    string              `json:"label"`
	Steps    AgiIngestSteps      `json:"steps"`
	Download AgiDownloadProgress `json:"download"`
	Process  AgiProcessProgress  `json:"process"`
	Errors   []AgiError          `json:"errors,omitempty"`
}

AgiDetailsOutput represents the detailed output structure for AGI details command.

type AgiDownloadProgress

type AgiDownloadProgress struct {
	TotalFiles      int    `json:"totalFiles,omitempty"`
	CompletedFiles  int    `json:"completedFiles,omitempty"`
	TotalSize       string `json:"totalSize,omitempty"`
	CompletedSize   string `json:"completedSize,omitempty"`
	PercentComplete int    `json:"percentComplete,omitempty"`
}

AgiDownloadProgress represents download progress details.

type AgiError

type AgiError struct {
	Stage   string `json:"stage"`
	File    string `json:"file,omitempty"`
	Message string `json:"message"`
}

AgiError represents an error from the ingest process.

type AgiExecCmd

type AgiExecCmd struct {
	Service      AgiExecServiceCmd      `` /* 128-byte string literal not displayed */
	Plugin       AgiExecPluginCmd       `` /* 133-byte string literal not displayed */
	GrafanaFix   AgiExecGrafanaFixCmd   `command:"grafanafix" subcommands-optional:"true" description:"Run Grafana helper"`
	Ingest       AgiExecIngestCmd       `` /* 133-byte string literal not displayed */
	Proxy        AgiExecProxyCmd        `command:"proxy" subcommands-optional:"true" description:"Run web proxy"`
	IngestStatus AgiExecIngestStatusCmd `command:"ingest-status" subcommands-optional:"true" description:"Get ingest status"`
	IngestDetail AgiExecIngestDetailCmd `command:"ingest-detail" subcommands-optional:"true" description:"Get ingest details"`
	Simulate     AgiExecSimulateCmd     `command:"simulate" subcommands-optional:"true" description:"Simulate spot termination"`
	Help         HelpCmd                `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiExecCmd is the hidden AGI exec subsystem command structure These commands are run inside AGI instances, not by users directly

func (*AgiExecCmd) Execute

func (c *AgiExecCmd) Execute(args []string) error

type AgiExecGrafanaFixCmd

type AgiExecGrafanaFixCmd struct {
	YamlFile string  `short:"y" long:"yaml" description:"Path to YAML config file" default:"/opt/agi/grafanafix.yaml"`
	Help     HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiExecGrafanaFixCmd runs the Grafana helper service. This is a hidden command that runs inside AGI instances, not called by users directly. It configures Grafana with the AGI datasource plugin and dashboards, and periodically saves annotations.

func (*AgiExecGrafanaFixCmd) Execute

func (c *AgiExecGrafanaFixCmd) Execute(args []string) error

Execute runs the Grafana helper service. This function performs the following:

  1. Stops Grafana if running
  2. Applies early patches to grafana.ini (anonymous auth, timeout settings, etc.)
  3. Installs the JSON datasource plugin for AGI
  4. Starts Grafana
  5. Imports dashboards and sets home dashboard
  6. Loads existing annotations
  7. Enters a loop that periodically saves annotations

The function runs indefinitely, saving annotations every 5 minutes.

Returns:

  • error: nil on success (never returns under normal operation), or an error describing what failed

type AgiExecIngestCmd

type AgiExecIngestCmd struct {
	AGIName  string `long:"agi-name" description:"Name of this AGI instance"`
	Async    bool   `long:"async" description:"If set, will asynchronously process logs and collectinfo"`
	YamlFile string `short:"y" long:"yaml" description:"Path to YAML config file" default:"/opt/agi/ingest.yaml"`

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

AgiExecIngestCmd runs the log ingest service. This is a hidden command that runs inside AGI instances, not called by users directly. It performs the complete log ingestion pipeline: download, unpack, preprocess, and process logs.

func (*AgiExecIngestCmd) Execute

func (c *AgiExecIngestCmd) Execute(args []string) error

Execute runs the complete log ingestion pipeline. This function performs the following steps:

  1. Load configuration from YAML file and environment variables
  2. Initialize the ingestion system with database connections
  3. Download logs from configured sources (S3, SFTP, local)
  4. Unpack and decompress log files
  5. Preprocess logs to identify clusters and nodes
  6. Process logs and collectinfo files concurrently
  7. Store processed data in Aerospike database

At each step, it sends notifications to configured endpoints (Slack, webhook, AGI monitor).

Returns:

  • error: nil on success, or an error describing what failed

type AgiExecIngestDetailCmd

type AgiExecIngestDetailCmd struct {
	IngestPath string   `long:"ingest-stat-path" default:"/opt/agi/ingest/"`
	DetailType []string `short:"t" long:"detail-type" description:"File name of the progress detail"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiExecIngestDetailCmd retrieves detailed ingest progress information

func (*AgiExecIngestDetailCmd) Execute

func (c *AgiExecIngestDetailCmd) Execute(args []string) error

type AgiExecIngestStatusCmd

type AgiExecIngestStatusCmd struct {
	IngestPath string  `long:"ingest-stat-path" default:"/opt/agi/ingest/"`
	Help       HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiExecIngestStatusCmd retrieves and displays the current ingest status

func (*AgiExecIngestStatusCmd) Execute

func (c *AgiExecIngestStatusCmd) Execute(args []string) error

type AgiExecPluginCmd

type AgiExecPluginCmd struct {
	YamlFile string `short:"y" long:"yaml" description:"Path to YAML config file" default:"/opt/agi/plugin.yaml"`

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

AgiExecPluginCmd runs the Grafana plugin backend service. This is a hidden command that runs inside AGI instances, not called by users directly. The plugin provides a JSON datasource for Grafana that queries data from the embedded DB (pkg/agi/db).

func (*AgiExecPluginCmd) Execute

func (c *AgiExecPluginCmd) Execute(args []string) error

Execute runs the plugin backend service. It loads configuration from the YAML file (with environment variable overrides), initializes the plugin, writes a PID file for process management, and starts the HTTP server for Grafana to connect to.

The plugin listens on the configured address (default: 127.0.0.1:8851) and serves:

  • /metrics - Available metrics for Grafana queries
  • /metric-payload-options - Metric configuration options
  • /query - Main query endpoint for Grafana panels
  • /variable - Variable queries for Grafana templates
  • /tag-keys - Available tag keys for filtering
  • /tag-values - Tag values for specific keys
  • /histogram - Histogram data queries
  • /shutdown - Graceful shutdown endpoint

Returns:

  • error: nil on success, or an error describing what failed

type AgiExecProxyCmd

type AgiExecProxyCmd struct {
	YamlFile             string        `short:"y" long:"yaml" description:"Path to YAML config file"`
	AGIName              string        `long:"agi-name" description:"AGI instance name" yaml:"agiName"`
	InitialLabel         string        `short:"L" long:"label" description:"Freeform label that will appear in the dashboards if set" yaml:"label"`
	IngestProgressPath   string        `` /* 150-byte string literal not displayed */
	ListenPort           int           `short:"l" long:"listen-port" default:"80" description:"Port to listen on" yaml:"listenPort"`
	HTTPS                bool          `short:"S" long:"https" description:"Set to enable HTTPS listener" yaml:"https"`
	CertFile             string        `short:"C" long:"cert-file" description:"Required path to server cert file for TLS" yaml:"certFile"`
	KeyFile              string        `short:"K" long:"key-file" description:"Required path to server key file for TLS" yaml:"keyFile"`
	EntryDir             string        `short:"d" long:"entry-dir" default:"/opt/agi/files" description:"Entrypoint for ttyd and filebrowser" yaml:"entryDir"`
	MaxInactivity        time.Duration `` /* 158-byte string literal not displayed */
	MaxUptime            time.Duration `short:"M" long:"max-uptime" default:"24h" description:"Max hard instance uptime; 0=disable" yaml:"maxUptime"`
	ShutdownCommand      string        `` /* 197-byte string literal not displayed */
	AuthType             string        `short:"a" long:"auth-type" default:"none" description:"Authentication type; supported: none|basic|token" yaml:"authType"`
	BasicAuthUser        string        `short:"u" long:"basic-auth-user" default:"admin" description:"Basic authentication username" yaml:"basicAuthUser"`
	BasicAuthPass        string        `` /* 133-byte string literal not displayed */
	TokenAuthLocation    string        `` /* 129-byte string literal not displayed */
	TokenName            string        `short:"T" long:"token-name" default:"AGI_TOKEN" description:"Name of the token variable and cookie to use" yaml:"tokenName"`
	DebugActivityMonitor bool          `short:"D" long:"debug-mode" description:"Set to log activity monitor for debugging" yaml:"debugMode"`
	Help                 HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

AgiExecProxyCmd runs the AGI web proxy service. This is the main entry point for web access to AGI instances, providing: - Reverse proxy to Grafana (port 3000 -> /) - Reverse proxy to ttyd web terminal (/agi/ttyd) - Reverse proxy to filebrowser (/agi/filebrowser) - Authentication (none, basic, or token-based) - Activity monitoring for auto-shutdown - Service health monitoring - Spot instance termination monitoring (AWS/GCP)

func (*AgiExecProxyCmd) Execute

func (c *AgiExecProxyCmd) Execute(args []string) error

Execute runs the AGI proxy service. This is the main entry point that starts all proxy components: - HTTP/HTTPS server - Reverse proxies - Token management - Activity monitoring - Service monitoring - Spot instance monitoring

func (*AgiExecProxyCmd) InstallWebsite

func (c *AgiExecProxyCmd) InstallWebsite(dst string, website []byte) error

type AgiExecServiceCmd

type AgiExecServiceCmd struct {
	AGIName    string  `long:"agi-name" description:"Name of this AGI instance"`
	Async      bool    `long:"async" description:"If set, will asynchronously process logs and collectinfo during ingest"`
	IngestYaml string  `long:"ingest-yaml" description:"Path to ingest YAML config file" default:"/opt/agi/ingest.yaml"`
	PluginYaml string  `long:"plugin-yaml" description:"Path to plugin YAML config file" default:"/opt/agi/plugin.yaml"`
	SkipIngest bool    `long:"skip-ingest" description:"Skip running the ingest pipeline (plugin-only mode, useful for reopening an existing DB)"`
	SkipPlugin bool    `long:"skip-plugin" description:"Skip running the plugin (ingest-only mode, equivalent to 'agi exec ingest')"`
	Help       HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiExecServiceCmd runs the ingest pipeline and the Grafana plugin backend together in a single process, sharing one Pebble DB handle.

Why this exists: Pebble acquires an exclusive OS file lock on its data directory, so two independent processes (the old agi-plugin and agi-ingest systemd units) cannot open the same directory. Running them as one process is the simplest and most robust fix — it also guarantees the plugin's schema cache always sees what ingest just wrote (no cross-process consistency windows, no snapshot re-mounting).

Lifecycle:

  1. Open the shared DB with options built from plugin.yaml. WAL is forced on by default for service mode because the process is long-lived and a SIGTERM mid-ingest must not drop still-in- memtable rows; pass --no-force-wal to override.
  2. Run the ingest pipeline in a goroutine via the standard AgiExecIngestCmd (with its sharedDB field set). The goroutine returns when ingest finishes or fails; the plugin keeps serving.
  3. Start the plugin HTTP server in the foreground. On /shutdown or SIGTERM it drains and returns.
  4. Close plugin, wait for ingest to finish, then close the shared DB.

To force a re-ingest, reset /opt/agi/ingest/steps.json and restart the systemd unit; the ingest pipeline picks up from the resulting empty steps.

func (*AgiExecServiceCmd) Execute

func (c *AgiExecServiceCmd) Execute(args []string) error

Execute opens the shared DB, then orchestrates ingest + plugin as described above. Returns the first non-nil error it encounters, but always attempts to close both components and the DB before returning.

type AgiExecSimulateCmd

type AgiExecSimulateCmd struct {
	Path    string `long:"path" description:"Path to a JSON file to use for notification" default:"notify.sim.json"`
	Make    bool   `long:"make" description:"Set to make the notification file using resource manager code instead of sending it"`
	AGIName string `long:"agi-name" description:"Set agiName when making the notification JSON" default:"agi"`
	Help    HelpCmd
	// contains filtered or unexported fields
}

AgiExecSimulateCmd simulates a notification to the AGI monitor for testing

func (*AgiExecSimulateCmd) Execute

func (c *AgiExecSimulateCmd) Execute(args []string) error

type AgiIngestStatus

type AgiIngestStatus struct {
	Running            bool   `json:"running"`
	Step               string `json:"step,omitempty"`
	DownloadProgress   int    `json:"downloadProgress,omitempty"`
	ProcessingProgress int    `json:"processingProgress,omitempty"`
	ErrorCount         int    `json:"errorCount,omitempty"`
}

AgiIngestStatus represents the ingest progress status.

type AgiIngestSteps

type AgiIngestSteps struct {
	Init                bool      `json:"init"`
	Download            bool      `json:"download"`
	Unpack              bool      `json:"unpack"`
	PreProcess          bool      `json:"preProcess"`
	ProcessLogs         bool      `json:"processLogs"`
	ProcessCollect      bool      `json:"processCollectInfo"`
	CriticalError       string    `json:"criticalError,omitempty"`
	InitStart           time.Time `json:"initStart"`
	InitEnd             time.Time `json:"initEnd"`
	DownloadStart       time.Time `json:"downloadStart"`
	DownloadEnd         time.Time `json:"downloadEnd"`
	UnpackStart         time.Time `json:"unpackStart"`
	UnpackEnd           time.Time `json:"unpackEnd"`
	PreProcessStart     time.Time `json:"preProcessStart"`
	PreProcessEnd       time.Time `json:"preProcessEnd"`
	ProcessStart        time.Time `json:"processStart"`
	ProcessEnd          time.Time `json:"processEnd"`
	ProcessCollectStart time.Time `json:"processCollectStart"`
	ProcessCollectEnd   time.Time `json:"processCollectEnd"`
}

AgiIngestSteps represents the ingest step completion status.

type AgiListCmd

type AgiListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Owner      string   `short:"O" long:"owner" description:"Filter by owner"`
	Name       string   `short:"n" long:"name" description:"Filter by AGI name"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiListCmd lists AGI instances from the inventory. This command filters instances by the "agi" type tag and displays relevant AGI-specific information such as labels, access URLs, and state.

Usage:

aerolab agi list
aerolab agi list -o json
aerolab agi list --pager

func (*AgiListCmd) Execute

func (c *AgiListCmd) Execute(args []string) error

Execute implements the command execution for agi list.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiListCmd) ListAGI

func (c *AgiListCmd) ListAGI(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

ListAGI lists AGI instances from the inventory.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • args: Additional command arguments
  • out: Output writer
  • page: Optional pager

Returns:

  • error: nil on success, or an error describing what failed

type AgiListFullOutput

type AgiListFullOutput struct {
	Instances []AgiListOutput   `json:"instances"`
	Volumes   []AgiVolumeOutput `json:"volumes"`
}

AgiListFullOutput combines both instances and volumes for JSON output.

type AgiListOutput

type AgiListOutput struct {
	Name        string `json:"name"`
	Label       string `json:"label"`
	State       string `json:"state"`
	PublicIP    string `json:"publicIP,omitempty"`
	PrivateIP   string `json:"privateIP,omitempty"`
	AccessURL   string `json:"accessURL"`
	Owner       string `json:"owner"`
	Backend     string `json:"backend"`
	Zone        string `json:"zone,omitempty"`
	Instance    string `json:"instance,omitempty"`
	Expires     string `json:"expires,omitempty"`
	SourceLocal string `json:"sourceLocal,omitempty"`
	SourceSftp  string `json:"sourceSftp,omitempty"`
	SourceS3    string `json:"sourceS3,omitempty"`
	Spot        bool   `json:"spot,omitempty"`
	SSL         bool   `json:"ssl"`
	CreatedAt   string `json:"createdAt"`
	// Details contains the full instance information from the backend inventory.
	// This provides comprehensive instance details similar to cluster list output.
	Details *backends.Instance `json:"details,omitempty"`
}

AgiListOutput represents the output structure for AGI list command.

type AgiMonitorCmd

type AgiMonitorCmd struct {
	Create AgiMonitorCreateCmd `command:"create" subcommands-optional:"true" description:"Create monitor instance" webicon:"fas fa-plus" invwebforce:"true"`
	Listen AgiMonitorListenCmd `command:"listen" subcommands-optional:"true" description:"Start monitor listener" webicon:"fas fa-headphones"`
	Help   HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiMonitorCmd is the AGI monitor system command structure. It provides commands for creating monitor instances and running the monitor listener. See cmdAgiMonitor.go for detailed struct definitions.

func (*AgiMonitorCmd) Execute

func (c *AgiMonitorCmd) Execute(args []string) error

type AgiMonitorConfigCmd

type AgiMonitorConfigCmd struct {
	// TLS verification for callbacks to AGI instances
	StrictAGITLS bool `long:"strict-agi-tls" description:"If set, AGI-Monitor will expect AGI instances to have a valid TLS certificate"`

	// Disk sizing thresholds (GCP)
	GCPDiskThresholdPct int `long:"gcp-disk-thres-pct" description:"Usage threshold pct at which the disk will be increased" default:"80"`
	GCPDiskIncreaseGB   int `long:"gcp-disk-grow-gb" description:"When threshold is breached, grow by these many GB" default:"100"`

	// RAM sizing thresholds (live monitoring; threshold-driven sizing).
	// Threshold-driven sizing is rare in the Pebble model because the steady
	// state is heavily disk-resident; the bigger trigger is the
	// pre-process completion event, which uses the formula above directly.
	RAMThresUsedPct   int `long:"ram-thres-used-pct" description:"Max used PCT of RAM (MemAvailable-based) before instance gets sized" default:"90"`
	RAMThresMinFreeGB int `` /* 160-byte string literal not displayed */

	// New sizing model knobs (Pebble).
	//
	// RAMFloorGB default 10 = 6 GiB OS reserve (matches
	// agiOSReserveBytes("aws"|"gcp")) + 4 GiB merged-process
	// non-Pebble overhead (matches agiNonPebbleOverheadBytes) in
	// cmdAgiCreate.go. CachePeakMultiplier default 4 matches the
	// "Pebble = 50% of host RAM, half cache + half memtables"
	// budget split also in cmdAgiCreate.go. Keep these defaults in
	// lockstep with cmdAgiCreate's constants or pre-process sizing
	// will under- or over-provision relative to what AGI actually
	// allocates.
	RAMFloorGB          int `` /* 178-byte string literal not displayed */
	CachePeakMultiplier int `` /* 189-byte string literal not displayed */
	CacheTargetPct      int `` /* 183-byte string literal not displayed */
	CacheMinGB          int `long:"cache-min-gb" description:"Floor on the Pebble block cache target, even for small ingests" default:"1"`
	CacheMaxGB          int `` /* 151-byte string literal not displayed */

	// Sizing options
	DisableSizing   bool `long:"sizing-disable" description:"Set to disable sizing of instances for more resources"`
	SizingMaxRamGB  int  `long:"sizing-max-ram-gb" description:"Will not size above these many GB" default:"48"`
	SizingMaxDiskGB int  `long:"sizing-max-disk-gb" description:"Will not size above these many GB" default:"400"`

	// Spot capacity rotation
	DisableCapacity bool `long:"capacity-disable" description:"Set to disable rotation of spot instances with capacity issues to ondemand"`

	// Deprecated: DIM mode is gone in the Pebble backend. Kept on the
	// struct for backward compatibility with existing YAML/CLI; the
	// fields are no longer read by the sizing logic.
	SizingNoDIMFirst bool    `long:"sizing-nodim" description:"DEPRECATED: DIM mode no longer exists post-Pebble migration; flag is ignored" hidden:"true"`
	DimMultiplier    float64 `long:"sizing-multiplier-dim" description:"DEPRECATED: pre-Pebble DIM RAM multiplier; flag is ignored" hidden:"true"`
	NoDimMultiplier  float64 `long:"sizing-multiplier-nodim" description:"DEPRECATED: pre-Pebble NoDIM RAM multiplier; flag is ignored" hidden:"true"`

	// Debugging
	DebugEvents bool `long:"debug-events" description:"Log all events for debugging purposes"`

	// Pricing API
	DisablePricingAPI bool `long:"disable-pricing-api" description:"Set to disable pricing queries for cost tracking"`

	// Notifications
	NotifyURL    string `long:"notify-url" description:"Optional: specify a notification URL to send action notifications to"`
	NotifyHeader string `long:"notify-header" description:"Optional: set a header in the notification; format: key=value"`
	SlackToken   string `long:"notify-slack-token" description:"Set to enable slack notifications for events" telemetry:"redact"`
	SlackChannel string `long:"notify-slack-channel" description:"Set to the channel to notify to"`
	// contains filtered or unexported fields
}

AgiMonitorConfigCmd contains all runtime configuration for the AGI monitor logic — sizing thresholds, notifications, capacity rotation, etc. These fields are relevant both when running the standalone listener (agi monitor listen) and when the monitor is embedded inside the WebUI (webui --agi-monitor-enable). Server/listener fields (address, TLS, autocert) live in AgiMonitorListenCmd instead.

Sizing model (post-Pebble migration, post-budget-cap update):

required_RAM_GB = RAMFloorGB
                 + CachePeakMultiplier * cache_target_GB   // see below
                 + RAMThresMinFreeGB                       // operator-visible headroom

cache_target_GB = clamp(CacheTargetPct/100 * logSize_GB, CacheMinGB, CacheMaxGB)

The CachePeakMultiplier (default 4) reflects the post-budget-cap allocation in cmdAgiCreate: Pebble is hard-capped at 50% of total host RAM, of which roughly half goes to the block cache and half to peak memtable RAM. So for the cache to actually reach `cache_target_GB`, the host needs at least 4 × cache_target_GB just for the Pebble portion. RAMFloorGB on top of that covers the OS reservation, the merged process's non-Pebble overhead (ingest/plugin/Go/Grafana), and is sized to mirror the agiOSReserveBytes + agiNonPebbleOverheadBytes constants in cmdAgiCreate. Keep the two in lockstep or the monitor's pre-process sizing will mis-predict.

Worked examples (cloud, with defaults RAMFloorGB=10, multiplier=4, MinFree=2):

  9 GiB logs (cache_target=1):   10 + 4   + 2 = 16 GiB → m7i.xlarge
100 GiB logs (cache_target=10):  10 + 40  + 2 = 52 GiB → r7a.2xlarge / 64 GiB
500 GiB logs (cache_target=16):  10 + 64  + 2 = 76 GiB → SizingMaxRamGB caps at 48 GiB; warned

The old DIM/NoDIM split is gone — there is no in-memory primary index anymore; everything serves out of the Pebble LSM with a configurable block cache plus the OS page cache. The DIM-specific flags below (DimMultiplier, NoDimMultiplier, SizingNoDIMFirst) are accepted for backward compatibility with old monitor YAML / CLI invocations but are no longer consulted by the sizing logic.

type AgiMonitorCreateCmd

type AgiMonitorCreateCmd struct {
	Name  string `short:"n" long:"name" description:"Monitor client name" default:"agimonitor"`
	Owner string `long:"owner" description:"AWS/GCP only: create owner tag with this value"`

	// Embed listen command flags for configuration
	AgiMonitorListenCmd

	// Aerolab binary option
	AerolabBinary flags.Filename `long:"aerolab-binary" description:"Path to local aerolab binary to install (required if running unofficial build)"`

	// AWS-specific options
	AWS AgiMonitorCreateCmdAws `group:"AWS" namespace:"aws" description:"backend-aws"`

	// GCP-specific options
	GCP AgiMonitorCreateCmdGcp `group:"GCP" namespace:"gcp" description:"backend-gcp"`

	// Retry configuration
	MaxRetries int           `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiMonitorCreateCmd creates a monitor instance on AWS or GCP. The monitor is deployed as a client instance with an instance role that allows it to manage other AGI instances in the same region/project.

The monitor will:

  1. Create a client instance with the appropriate IAM role
  2. Install aerolab binary
  3. Configure systemd service (agimonitor.service)
  4. Apply aerolab-agi firewall for ports 80/443
  5. Start and enable the monitor listener service

func (*AgiMonitorCreateCmd) CreateMonitor

func (c *AgiMonitorCreateCmd) CreateMonitor(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (backends.InstanceList, error)

CreateMonitor creates a monitor instance with the specified configuration.

Parameters:

  • system: The system context containing backend and configuration
  • inventory: The current inventory state
  • logger: Logger for output
  • args: Additional arguments

Returns:

  • backends.InstanceList: The created monitor instance(s)
  • error: nil on success, or an error describing what failed

func (*AgiMonitorCreateCmd) Execute

func (c *AgiMonitorCreateCmd) Execute(args []string) error

Execute implements the command execution for agi monitor create.

The command creates a monitor instance that:

  1. Creates a client instance with the appropriate IAM role (agimonitor)
  2. Installs aerolab binary
  3. Configures systemd service (agimonitor.service)
  4. Applies aerolab-agi firewall for ports 80/443
  5. Starts and enables the monitor listener service

Returns:

  • error: nil on success, or an error describing what failed

type AgiMonitorCreateCmdAws

type AgiMonitorCreateCmdAws struct {
	InstanceType      guiInstanceType `long:"instance" description:"Instance type to use" default:"t3a.medium" webchoice:"method::List"`
	SecurityGroupID   string          `long:"firewall" description:"Security group IDs to use, comma-separated; default: empty: create and auto-manage"`
	SubnetID          string          `long:"placement" description:"Subnet-id, availability-zone name, or empty; default: empty: first found in default VPC"`
	NamePrefix        []string        `` /* 128-byte string literal not displayed */
	InstanceRole      string          `` /* 168-byte string literal not displayed */
	ElasticIP         string          `` /* 233-byte string literal not displayed */
	Route53ZoneId     string          `` /* 160-byte string literal not displayed */
	Route53DomainName string          `long:"route53-fqdn" description:"The route domain the zone refers to; eg monitor.eu-west-1.myagi.org"`
	Expires           TypeExpiry      `long:"expire" description:"Instance expiry (0 for never)" default:"0"`
	// AWS credentials - alternative to using instance profile
	AWSKeyId     string `` /* 162-byte string literal not displayed */
	AWSSecretKey string `` /* 170-byte string literal not displayed */
}

AgiMonitorCreateCmdAws contains AWS-specific options for monitor creation.

type AgiMonitorCreateCmdGcp

type AgiMonitorCreateCmdGcp struct {
	InstanceType    guiInstanceType `long:"instance" description:"Instance type to use" default:"e2-medium" webchoice:"method::List"`
	Zone            guiZone         `long:"zone" description:"Zone name to deploy to" webrequired:"true" webchoice:"method::List"`
	VPC             guiVpc          `long:"vpc" description:"VPC network name to use; empty=default VPC" webchoice:"method::List"`
	Subnet          string          `long:"subnet" description:"GCP subnet name within the selected VPC; empty=auto-select first subnet in the zone's region"`
	NamePrefix      []string        `` /* 131-byte string literal not displayed */
	InstanceRole    string          `` /* 164-byte string literal not displayed */
	Expires         TypeExpiry      `long:"expire" description:"Instance expiry (0 for never)" default:"0"`
	DisablePublicIP bool            `long:"no-public-ip" description:"Disable public IP assignment"`
}

AgiMonitorCreateCmdGcp contains GCP-specific options for monitor creation.

type AgiMonitorListenCmd

type AgiMonitorListenCmd struct {
	// Server configuration
	ListenAddress string `long:"address" description:"Address to listen on; if autocert is enabled, will also listen on :80" default:"0.0.0.0:443"`
	NoTLS         bool   `long:"no-tls" description:"Disable TLS"`

	// TLS configuration
	AutoCertDomains []string `` /* 152-byte string literal not displayed */
	AutoCertEmail   string   `long:"autocert-email" description:"TLS: if autocert is specified, specify a valid email address to use with letsencrypt"`
	CertFile        string   `long:"cert-file" description:"TLS: certificate file to use if not using letsencrypt; default: generate self-signed"`
	KeyFile         string   `long:"key-file" description:"TLS: key file to use if not using letsencrypt; default: generate self-signed"`

	// Embed monitor config (sizing thresholds, notifications, etc.)
	AgiMonitorConfigCmd

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiMonitorListenCmd starts the monitor listener that handles AGI instance events. The monitor provides auto-sizing, spot instance rotation, and notification forwarding.

The monitor implements a challenge-response authentication system:

  1. AGI instance sends notification with secret to monitor
  2. Monitor calls back to AGI /agi/monitor-challenge endpoint
  3. Validates secret matches before processing event

Supported events:

  • SPOT_INSTANCE_CAPACITY_SHUTDOWN: Rotate spot to on-demand
  • SYS_RESOURCE_USAGE_MONITOR: Check RAM/disk sizing
  • INGEST_STEP_*: Check sizing after processing steps
  • SERVICE_DOWN: Handle crashed services

func (*AgiMonitorListenCmd) Execute

func (c *AgiMonitorListenCmd) Execute(args []string) error

Execute implements the command execution for agi monitor listen.

The monitor listener receives events from AGI instances and handles:

  • Spot instance capacity rotation to on-demand
  • RAM/instance sizing decisions
  • Disk sizing (GCP only)
  • Notification forwarding to Slack and custom endpoints

Authentication is performed via challenge-response:

  1. AGI instance sends notification with secret
  2. Monitor calls back to AGI /agi/monitor-challenge endpoint
  3. Validates secret matches before processing event

Returns:

  • error: nil on success, or an error describing what failed

type AgiOpenCmd

type AgiOpenCmd struct {
	ClusterName TypeAgiClusterName `short:"n" long:"name" description:"AGI name" default:"agi"`
	Help        HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiOpenCmd opens an AGI instance in the default browser. It generates an authentication token URL and opens it in the browser for convenient access to the AGI Grafana interface.

func (*AgiOpenCmd) Execute

func (c *AgiOpenCmd) Execute(args []string) error

Execute implements the command execution for agi open.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiOpenCmd) OpenAGI

func (c *AgiOpenCmd) OpenAGI(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

OpenAGI generates an authentication token URL and opens it in the browser.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

type AgiProcessProgress

type AgiProcessProgress struct {
	TotalFiles      int    `json:"totalFiles,omitempty"`
	CompletedFiles  int    `json:"completedFiles,omitempty"`
	TotalSize       string `json:"totalSize,omitempty"`
	CompletedSize   string `json:"completedSize,omitempty"`
	PercentComplete int    `json:"percentComplete,omitempty"`
}

AgiProcessProgress represents processing progress details.

type AgiQueryCmd

type AgiQueryCmd struct {
	ClusterName TypeAgiClusterName `short:"n" long:"name" description:"AGI name (ignored in --transport=local)" default:"agi"`
	// Mode flags. Bool flags are not mutually exclusive at the
	// flag-parser level; we enforce that in Execute() so we can
	// produce a helpful error.
	Info     bool   `long:"info" description:"Show DB path, storage version, set count and stats"`
	ListSets bool   `long:"list-sets" description:"List all sets and a one-line schema summary"`
	Describe string `long:"describe" description:"Print the full schema of one set" value-name:"SET"`
	Sample   string `long:"sample" description:"Stream the first --limit rows of a set" value-name:"SET"`
	GetSet   string `long:"get-set" description:"Set to point-read from (used with --get-key)" value-name:"SET"`
	GetKey   string `long:"get-key" description:"Primary key to point-read (used with --get-set)" value-name:"KEY"`
	Plan     string `long:"plan" description:"POST a query plan from a JSON file ('-' for stdin)" value-name:"FILE"`
	HashKey  string `` /* 156-byte string literal not displayed */

	// Common knobs.
	Limit     int    `long:"limit" description:"Row cap for --sample / --plan (server caps further)" default:"100"`
	Output    string `short:"o" long:"output" description:"Output format: table | json | json-indent | ndjson" default:"table"`
	Host      string `long:"plugin-host" description:"Plugin debug host inside the AGI instance" default:"127.0.0.1"`
	Port      int    `long:"plugin-port" description:"Plugin debug port inside the AGI instance" default:"8851"`
	Transport string `` /* 127-byte string literal not displayed */

	// SSH knobs (mirroring agi attach). Ignored in --transport=local.
	ConnectTimeout time.Duration `short:"C" long:"connect-timeout" description:"SSH connect timeout (ssh transport only)" default:"10s"`
	SessionTimeout time.Duration `short:"S" long:"session-timeout" description:"SSH session timeout (ssh transport only)" default:"5m"`

	// HTTP timeout (used by the local transport; the ssh transport
	// inherits SessionTimeout instead).
	HTTPTimeout time.Duration `long:"http-timeout" description:"HTTP timeout for the local transport" default:"65s"`

	// Output redirection (rare; --output ndjson into a file is the
	// most common reason).
	Out flags.Filename `short:"O" long:"stdout" description:"Path to redirect stdout to"`

	Help AgiQueryCmdHelp `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiQueryCmd talks to the AGI plugin's localhost-only debug endpoints (registered by pkg/agi/plugin/frontend_debug.go). It picks one of two transports:

  • "local" — direct net/http to 127.0.0.1:8851, no backend, no SSH. Used when running on the AGI box itself (the marker file /opt/aerolab-agi-exec is the canonical AGI-host signal, established by template create and reused by checkUpgrade).
  • "ssh" — `instances.Exec` SSH'es to the AGI box and runs curl against the same localhost endpoint. Used everywhere else.

Auto-detection picks "local" when /opt/aerolab-agi-exec is present (we are on an AGI host) and "ssh" otherwise. --transport=local|ssh forces the choice for testing or proxied scenarios.

Modes (mutually exclusive; exactly one must be selected):

--info             ⇒ GET  /debug/db/info
--list-sets        ⇒ GET  /debug/db/sets
--describe SET     ⇒ GET  /debug/db/sets/SET
--sample SET       ⇒ GET  /debug/db/sample?set=SET&limit=N
--get-set SET --get-key K ⇒ GET /debug/db/get?set=SET&key=K
--plan FILE        ⇒ POST /debug/db/query (JSON plan from FILE; '-' = stdin)

func (*AgiQueryCmd) Execute

func (c *AgiQueryCmd) Execute(args []string) error

Execute is the flag-parser entry point. It resolves the transport before calling Initialize so we can skip backend init (which would fail with backend=none, the configuration AGI boxes ship with) on the local-transport path.

type AgiQueryCmdHelp

type AgiQueryCmdHelp struct{}

AgiQueryCmdHelp prints inline help. It's a separate command so the parent help wiring sees a real Execute method on the help struct.

func (*AgiQueryCmdHelp) Execute

func (c *AgiQueryCmdHelp) Execute(args []string) error

Execute prints help text for the agi query command.

type AgiRelabelCmd

type AgiRelabelCmd struct {
	ClusterName TypeAgiClusterName `short:"n" long:"name" description:"AGI name" default:"agi"`
	NewLabel    string             `short:"l" long:"label" description:"New label for the AGI instance"`
	GcpZone     string             `short:"z" long:"zone" description:"GCP only: zone where the instance is"`
	MaxRetries  int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiRelabelCmd changes the label of an AGI instance. The label is stored in /opt/agi/label and is also updated in instance tags.

func (*AgiRelabelCmd) Execute

func (c *AgiRelabelCmd) Execute(args []string) error

Execute implements the command execution for agi change-label.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiRelabelCmd) Relabel

func (c *AgiRelabelCmd) Relabel(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

Relabel changes the label of the AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

type AgiRetriggerCmd

type AgiRetriggerCmd struct {
	ClusterName TypeAgiClusterName `short:"n" long:"name" description:"AGI name" default:"agi"`

	// Source options
	ClusterSource TypeClusterName `long:"source-cluster" description:"Cluster name to use as the source for logs"`
	LocalSource   flags.Filename  `` /* 131-byte string literal not displayed */

	// SFTP source options
	SftpEnable  *bool   `long:"source-sftp-enable" description:"Enable SFTP source"`
	SftpThreads *int    `long:"source-sftp-threads" description:"Number of concurrent downloader threads"`
	SftpHost    *string `long:"source-sftp-host" description:"SFTP host"`
	SftpPort    *int    `long:"source-sftp-port" description:"SFTP port"`
	SftpUser    *string `long:"source-sftp-user" description:"SFTP user"`
	SftpPass    *string `long:"source-sftp-pass" description:"SFTP password (supports ENV::VAR_NAME)" webtype:"password" telemetry:"redact"`
	SftpKey     *string `long:"source-sftp-key" description:"Key file for SFTP login"`
	SftpPath    *string `long:"source-sftp-path" description:"Path on SFTP to download logs from"`
	SftpRegex   *string `long:"source-sftp-regex" description:"Regex to filter files to download"`

	// S3 source options
	S3Enable  *bool   `long:"source-s3-enable" description:"Enable S3 source"`
	S3Threads *int    `long:"source-s3-threads" description:"Number of concurrent downloader threads"`
	S3Region  *string `` /* 134-byte string literal not displayed */
	S3Bucket  *string `` /* 139-byte string literal not displayed */
	S3KeyID   *string `long:"source-s3-key-id" description:"AWS access key ID (supports ENV::VAR_NAME)" telemetry:"redact"`
	S3Secret  *string `long:"source-s3-secret-key" description:"AWS secret key (supports ENV::VAR_NAME)" webtype:"password" telemetry:"redact"`
	S3Path    *string `long:"source-s3-path" description:"Path prefix in S3 bucket"`
	S3Regex   *string `long:"source-s3-regex" description:"Regex to filter files to download"`

	// Time range options
	TimeRanges     *bool   `long:"ingest-timeranges-enable" description:"Enable time range filtering"`
	TimeRangesFrom *string `long:"ingest-timeranges-from" description:"Time range start (format: 2006-01-02T15:04:05Z07:00)"`
	TimeRangesTo   *string `long:"ingest-timeranges-to" description:"Time range end (format: 2006-01-02T15:04:05Z07:00)"`

	// Custom options
	CustomSourceName *string         `long:"ingest-custom-source-name" description:"Custom source name to display in Grafana"`
	PatternsFile     *flags.Filename `long:"ingest-patterns-file" description:"Custom patterns YAML file for log ingest"`
	IngestLogLevel   *int            `long:"ingest-log-level" description:"Log level: 1=CRITICAL,2=ERROR,3=WARN,4=INFO,5=DEBUG,6=DETAIL"`
	IngestCpuProfile *bool           `long:"ingest-cpu-profiling" description:"Enable CPU profiling for ingest"`

	Force      bool          `long:"force" description:"Do not ask for confirmation, just continue" webdisable:"true" webset:"true"`
	MaxRetries int           `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help       HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiRetriggerCmd re-runs the ingest process on an AGI instance. It compares the current configuration with new parameters, shows the diff, and restarts the ingest service.

The command can update:

  • SFTP source parameters
  • S3 source parameters
  • Time range filtering
  • Custom source name
  • Patterns file
  • Log level settings

func (*AgiRetriggerCmd) Execute

func (c *AgiRetriggerCmd) Execute(args []string) error

Execute implements the command execution for agi run-ingest.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiRetriggerCmd) Retrigger

func (c *AgiRetriggerCmd) Retrigger(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

Retrigger re-runs the ingest process on the AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

type AgiServiceStatus

type AgiServiceStatus struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Active bool   `json:"active"`
}

AgiServiceStatus represents the status of a single service.

type AgiShareCmd

type AgiShareCmd struct {
	ClusterName     TypeAgiClusterName `short:"n" long:"name" description:"AGI name" default:"agi"`
	KeyFile         flags.Filename     `short:"f" long:"pubkey" description:"Path to a pubkey to import to AGI instance"`
	Key             string             `short:"k" long:"key" description:"SSH public key content to add (alternative to --pubkey)"`
	Remove          bool               `short:"r" long:"remove" description:"Remove the specified key instead of adding it"`
	List            bool               `short:"l" long:"list" description:"List all authorized keys on the AGI instance"`
	ParallelThreads int                `short:"t" long:"threads" description:"Number of parallel threads to use" default:"10"`
	ConnectTimeout  time.Duration      `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	MaxRetries      int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiShareCmd shares an AGI instance by adding SSH public keys to authorized_keys. This allows other users to SSH into the AGI instance for administration.

func (*AgiShareCmd) Execute

func (c *AgiShareCmd) Execute(args []string) error

Execute implements the command execution for agi share.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiShareCmd) Share

func (c *AgiShareCmd) Share(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

Share manages SSH keys for the AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

type AgiStartCmd

type AgiStartCmd struct {
	Name       TypeAgiClusterName `short:"n" long:"name" description:"AGI instance name" default:"agi"`
	NoWait     bool               `long:"no-wait" description:"Do not wait for the instance to start"`
	DryRun     bool               `long:"dry-run" description:"Print what would be done but don't do it"`
	Threads    int                `short:"t" long:"threads" description:"Threads to use for service start" default:"1"`
	MaxRetries int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`

	Reattach Reattach `group:"Reattach" namespace:"reattach" description:"reattach options"`

	// AWS reattach options
	AWS AgiStartCmdAws `group:"AWS" namespace:"aws" description:"backend-aws"`

	// GCP reattach options
	GCP AgiStartCmdGcp `group:"GCP" namespace:"gcp" description:"backend-gcp"`

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiStartCmd starts an AGI instance that has been stopped. It starts the underlying instance, waits for it to be ready, and verifies that AGI services are running.

If no instance exists but an EFS/GCP volume with the AGI name exists, the command will automatically create a new instance and reattach it to the existing volume, preserving all AGI data.

Usage:

aerolab agi start -n myagi

func (*AgiStartCmd) Execute

func (c *AgiStartCmd) Execute(args []string) error

Execute implements the command execution for agi start.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiStartCmd) StartAGI

func (c *AgiStartCmd) StartAGI(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (backends.InstanceList, error)

StartAGI starts an AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • backends.InstanceList: The started AGI instance
  • error: nil on success, or an error describing what failed

type AgiStartCmdAws

type AgiStartCmdAws struct {
	EFSName string `long:"efs-name" description:"EFS volume name pattern (default uses AGI name)" default:"{AGI_NAME}"`
}

AgiStartCmdAws contains AWS-specific options for AGI start/reattach. Most settings are read from the EFS volume tags automatically.

type AgiStartCmdGcp

type AgiStartCmdGcp struct {
	VolName string `long:"vol-name" description:"Volume name pattern (default uses AGI name)" default:"{AGI_NAME}"`
}

AgiStartCmdGcp contains GCP-specific options for AGI start/reattach. Most settings are read from the volume tags automatically.

type AgiStatusCmd

type AgiStatusCmd struct {
	Name       TypeAgiClusterName `short:"n" long:"name" description:"AGI instance name" default:"agi"`
	Output     string             `short:"o" long:"output" description:"Output format (text, table, json, json-indent, jq)" default:"table"`
	TableTheme string             `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	Pager      bool               `short:"p" long:"pager" description:"Use a pager to display the output"`
	MaxRetries int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help       HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiStatusCmd shows the status of an AGI instance. This includes service status, system resources, and error summary.

Usage:

aerolab agi status -n myagi

func (*AgiStatusCmd) Execute

func (c *AgiStatusCmd) Execute(args []string) error

Execute implements the command execution for agi status.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiStatusCmd) ShowStatus

func (c *AgiStatusCmd) ShowStatus(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, out *os.File) error

ShowStatus shows the status of an AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments
  • out: Output writer

Returns:

  • error: nil on success, or an error describing what failed

type AgiStatusOutput

type AgiStatusOutput struct {
	Name      string             `json:"name"`
	Label     string             `json:"label"`
	State     string             `json:"state"`
	AccessURL string             `json:"accessURL"`
	Services  []AgiServiceStatus `json:"services"`
	System    AgiSystemStatus    `json:"system"`
	Ingest    AgiIngestStatus    `json:"ingest"`
	Errors    []string           `json:"errors,omitempty"`
}

AgiStatusOutput represents the output structure for AGI status command.

type AgiStopCmd

type AgiStopCmd struct {
	Name       TypeAgiClusterName `short:"n" long:"name" description:"AGI instance name" default:"agi"`
	Force      bool               `short:"f" long:"force" description:"Force stop without waiting for services"`
	NoWait     bool               `long:"no-wait" description:"Do not wait for the instance to stop"`
	DryRun     bool               `long:"dry-run" description:"Print what would be done but don't do it"`
	Threads    int                `short:"t" long:"threads" description:"Threads to use for service stop" default:"1"`
	MaxRetries int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help       HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiStopCmd stops an AGI instance gracefully. It first stops the AGI services, then stops the underlying instance.

Usage:

aerolab agi stop -n myagi

func (*AgiStopCmd) Execute

func (c *AgiStopCmd) Execute(args []string) error

Execute implements the command execution for agi stop.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiStopCmd) StopAGI

func (c *AgiStopCmd) StopAGI(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (backends.InstanceList, error)

StopAGI stops an AGI instance.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • backends.InstanceList: The stopped AGI instance
  • error: nil on success, or an error describing what failed

type AgiSystemStatus

type AgiSystemStatus struct {
	DiskTotal   string `json:"diskTotal"`
	DiskUsed    string `json:"diskUsed"`
	DiskFree    string `json:"diskFree"`
	DiskPercent int    `json:"diskPercent"`
	MemTotal    string `json:"memTotal"`
	MemUsed     string `json:"memUsed"`
	MemFree     string `json:"memFree"`
	MemPercent  int    `json:"memPercent"`
}

AgiSystemStatus represents system resource status.

type AgiTemplateCmd

type AgiTemplateCmd struct {
	Create  AgiTemplateCreateCmd  `command:"create" subcommands-optional:"true" description:"Create AGI template" webicon:"fas fa-plus" invwebforce:"true"`
	List    AgiTemplateListCmd    `command:"list" subcommands-optional:"true" description:"List AGI templates" webicon:"fas fa-list"`
	Destroy AgiTemplateDestroyCmd `command:"destroy" subcommands-optional:"true" description:"Destroy AGI template" webicon:"fas fa-trash" invwebforce:"true"`
	Vacuum  AgiTemplateVacuumCmd  `command:"vacuum" subcommands-optional:"true" description:"Clean dangling templates" webicon:"fas fa-broom"`
	Help    HelpCmd               `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiTemplateCmd is the AGI template management command structure. AGI templates are pre-built images containing all required software (grafana, plugin, ingest, ttyd, filebrowser) for fast AGI instance creation.

func (*AgiTemplateCmd) Execute

func (c *AgiTemplateCmd) Execute(args []string) error

type AgiTemplateCreateCmd

type AgiTemplateCreateCmd struct {
	GrafanaVersion     string         `short:"g" long:"grafana-version" description:"Grafana version to install" default:"11.2.6"`
	ToolsVersion       string         `long:"tools-version" description:"Aerospike tools version to install ('latest' picks the newest)" default:"latest"`
	Distro             string         `short:"d" long:"distro" description:"Linux distribution to use" default:"ubuntu"`
	DistroVersion      string         `short:"i" long:"distro-version" description:"Distribution version to use" default:"latest"`
	Arch               string         `short:"a" long:"arch" description:"Architecture (amd64 or arm64)" default:"amd64"`
	Timeout            int            `short:"t" long:"timeout" description:"Timeout in minutes for template creation" default:"20"`
	NoVacuum           bool           `short:"V" long:"no-vacuum" description:"Don't cleanup temporary instance on failure"`
	DryRun             bool           `long:"dry-run" description:"Validate parameters only, don't create template"`
	Owner              string         `short:"o" long:"owner" description:"Owner tag value for the template"`
	DisablePublicIP    bool           `long:"aws.no-public-ip" description:"AWS: Disable public IP assignment"`
	GCPDisablePublicIP bool           `long:"gcp.no-public-ip" description:"GCP: Disable public IP assignment"`
	GCPVPC             string         `long:"gcp.vpc" description:"GCP: VPC network name to use; empty=default VPC"`
	GCPSubnet          string         `long:"gcp.subnet" description:"GCP: subnet name within the selected VPC; empty=auto-select first subnet in the zone's region"`
	AerolabBinary      flags.Filename `short:"b" long:"aerolab-binary" description:"Path to local aerolab binary to install (required if running unofficial build)"`
	WithEFS            bool           `long:"aws.with-efs" description:"AWS: Pre-install EFS utilities in template for faster AGI creation"`
	MaxRetries         int            `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep         time.Duration  `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help               HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiTemplateCreateCmd creates a new AGI template image with all required software pre-installed. This is the most complex command in Phase 1, handling multi-step orchestration of software installation and image creation.

The template includes:

  • Grafana OSS
  • ttyd (web terminal)
  • filebrowser
  • aerolab binary with symlinks
  • systemd service files for all AGI services
  • Default directory structure
  • Default SSL certificates

func (*AgiTemplateCreateCmd) CreateTemplate

func (c *AgiTemplateCreateCmd) CreateTemplate(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (string, error)

CreateTemplate creates an AGI template image with all required software pre-installed.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments

Returns:

  • string: The name of the created template image
  • error: nil on success, or an error describing what failed

func (*AgiTemplateCreateCmd) Execute

func (c *AgiTemplateCreateCmd) Execute(args []string) error

Execute implements the command execution for agi template create.

Returns:

  • error: nil on success, or an error describing what failed

type AgiTemplateDestroyCmd

type AgiTemplateDestroyCmd struct {
	Arch           string  `short:"a" long:"arch" description:"Architecture to destroy the template for (amd64, arm64)"`
	AgiVersion     int     `short:"i" long:"agi-version" description:"AGI version number to destroy"`
	GrafanaVersion string  `short:"g" long:"grafana-version" description:"Grafana version to destroy the template for"`
	Force          bool    `short:"f" long:"force" description:"Force the destruction of the template - do not ask for confirmation"`
	DryRun         bool    `long:"dry-run" description:"Do not actually destroy the template, just run the basic checks"`
	Help           HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiTemplateDestroyCmd destroys a specific AGI template.

Usage:

aerolab agi template destroy
aerolab agi template destroy -a amd64
aerolab agi template destroy --agi-version 7

func (*AgiTemplateDestroyCmd) DestroyAgiTemplate

func (c *AgiTemplateDestroyCmd) DestroyAgiTemplate(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

DestroyAgiTemplate destroys AGI templates matching the specified criteria.

Parameters:

  • system: The initialized system context
  • inventory: The backend inventory to search
  • logger: Logger for output messages
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiTemplateDestroyCmd) Execute

func (c *AgiTemplateDestroyCmd) Execute(args []string) error

Execute implements the command execution for agi template destroy.

Returns:

  • error: nil on success, or an error describing what failed

type AgiTemplateListCmd

type AgiTemplateListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiTemplateListCmd lists available AGI templates from inventory.

Usage:

aerolab agi template list
aerolab agi template list -o json

func (*AgiTemplateListCmd) Execute

func (c *AgiTemplateListCmd) Execute(args []string) error

Execute implements the command execution for agi template list.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiTemplateListCmd) ListAgiTemplates

func (c *AgiTemplateListCmd) ListAgiTemplates(system *System, inventory *backends.Inventory, args []string) error

ListAgiTemplates lists all AGI templates in the inventory.

Parameters:

  • system: The initialized system context
  • inventory: The backend inventory to search
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

type AgiTemplateVacuumCmd

type AgiTemplateVacuumCmd struct {
	DryRun bool    `long:"dry-run" description:"Do not actually destroy templates/instances, just show what would be removed"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

AgiTemplateVacuumCmd cleans dangling/outdated AGI templates and instances. This removes: - Dangling temporary instances used during AGI template creation (crashed builds) - AGI templates that are older than the current AGI version

Usage:

aerolab agi template vacuum
aerolab agi template vacuum --dry-run

func (*AgiTemplateVacuumCmd) Execute

func (c *AgiTemplateVacuumCmd) Execute(args []string) error

Execute implements the command execution for agi template vacuum.

Returns:

  • error: nil on success, or an error describing what failed

func (*AgiTemplateVacuumCmd) VacuumAgiTemplates

func (c *AgiTemplateVacuumCmd) VacuumAgiTemplates(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

VacuumAgiTemplates removes dangling AGI template creation instances and outdated AGI templates.

Parameters:

  • system: The initialized system context
  • inventory: The backend inventory to search
  • logger: Logger for output messages
  • args: Additional command arguments

Returns:

  • error: nil on success, or an error describing what failed

type AgiVolumeOutput

type AgiVolumeOutput struct {
	Name        string `json:"name"`
	Label       string `json:"label,omitempty"`
	Type        string `json:"type"`
	SizeGiB     int64  `json:"sizeGiB"`
	Zone        string `json:"zone,omitempty"`
	State       string `json:"state"`
	AttachedTo  string `json:"attachedTo,omitempty"`
	Owner       string `json:"owner"`
	Backend     string `json:"backend"`
	Expires     string `json:"expires,omitempty"`
	SourceLocal string `json:"sourceLocal,omitempty"`
	SourceSftp  string `json:"sourceSftp,omitempty"`
	SourceS3    string `json:"sourceS3,omitempty"`
	CreatedAt   string `json:"createdAt"`
	// Details contains the full volume information from the backend inventory.
	Details *backends.Volume `json:"details,omitempty"`
}

AgiVolumeOutput represents the output structure for AGI volumes.

type AttachAGICmd

type AttachAGICmd struct {
	ClusterName     TypeAgiClusterName     `short:"n" long:"name" description:"AGI name" default:"agi"`
	Node            TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename         `` /* 156-byte string literal not displayed */
	Tail            []string               `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AttachAGICmdHelp       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachAGICmd) AttachAGI

func (c *AttachAGICmd) AttachAGI(system *System, inventory *backends.Inventory, args []string) error

func (*AttachAGICmd) Execute

func (c *AttachAGICmd) Execute(args []string) error

type AttachAGICmdHelp

type AttachAGICmdHelp struct{}

func (*AttachAGICmdHelp) Execute

func (c *AttachAGICmdHelp) Execute(args []string) error

type AttachAqlCmd

type AttachAqlCmd struct {
	ClusterName     TypeClusterName        `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Node            TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename         `` /* 156-byte string literal not displayed */
	Tail            []string               `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AttachAqlCmdHelp       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachAqlCmd) AttachAql

func (c *AttachAqlCmd) AttachAql(system *System, inventory *backends.Inventory, args []string) error

func (*AttachAqlCmd) Execute

func (c *AttachAqlCmd) Execute(args []string) error

type AttachAqlCmdHelp

type AttachAqlCmdHelp struct{}

func (*AttachAqlCmdHelp) Execute

func (c *AttachAqlCmdHelp) Execute(args []string) error

type AttachAsadmCmd

type AttachAsadmCmd struct {
	ClusterName     TypeClusterName        `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Node            TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename         `` /* 156-byte string literal not displayed */
	Tail            []string               `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AttachAsadmCmdHelp     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachAsadmCmd) AttachAsadm

func (c *AttachAsadmCmd) AttachAsadm(system *System, inventory *backends.Inventory, args []string) error

func (*AttachAsadmCmd) Execute

func (c *AttachAsadmCmd) Execute(args []string) error

type AttachAsadmCmdHelp

type AttachAsadmCmdHelp struct{}

func (*AttachAsadmCmdHelp) Execute

func (c *AttachAsadmCmdHelp) Execute(args []string) error

type AttachAsinfoCmd

type AttachAsinfoCmd struct {
	ClusterName     TypeClusterName        `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Node            TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename         `` /* 156-byte string literal not displayed */
	Tail            []string               `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AttachAsinfoCmdHelp    `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachAsinfoCmd) AttachAsinfo

func (c *AttachAsinfoCmd) AttachAsinfo(system *System, inventory *backends.Inventory, args []string) error

func (*AttachAsinfoCmd) Execute

func (c *AttachAsinfoCmd) Execute(args []string) error

type AttachAsinfoCmdHelp

type AttachAsinfoCmdHelp struct{}

func (*AttachAsinfoCmdHelp) Execute

func (c *AttachAsinfoCmdHelp) Execute(args []string) error

type AttachClientCmd

type AttachClientCmd struct {
	ClusterName     TypeClientName         `short:"n" long:"name" description:"Client name" default:"client"`
	Node            TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename         `` /* 156-byte string literal not displayed */
	Tail            []string               `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AttachClientCmdHelp    `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachClientCmd) AttachClient

func (c *AttachClientCmd) AttachClient(system *System, inventory *backends.Inventory, args []string) error

func (*AttachClientCmd) Execute

func (c *AttachClientCmd) Execute(args []string) error

type AttachClientCmdHelp

type AttachClientCmdHelp struct{}

func (*AttachClientCmdHelp) Execute

func (c *AttachClientCmdHelp) Execute(args []string) error

type AttachCmd

type AttachCmd struct {
	Shell  AttachShellCmd  `command:"shell" subcommands-optional:"true" description:"Attach to shell" webicon:"fas fa-terminal" simplemode:"false"`
	Client AttachClientCmd `` /* 128-byte string literal not displayed */
	Aql    AttachAqlCmd    `command:"aql" subcommands-optional:"true" description:"Run aql on node" webicon:"fas fa-database" simplemode:"false"`
	Asadm  AttachAsadmCmd  `command:"asadm" subcommands-optional:"true" description:"Run asadm on node" webicon:"fas fa-hammer" simplemode:"false"`
	Asinfo AttachAsinfoCmd `command:"asinfo" subcommands-optional:"true" description:"Run asinfo on node" webicon:"fas fa-circle-info" simplemode:"false"`
	AGI    AttachAGICmd    `command:"agi" subcommands-optional:"true" description:"Attach to an AGI node" webicon:"fas fa-chart-line" simplemode:"false"`
	Trino  AttachTrinoCmd  `` /* 134-byte string literal not displayed */
	Help   HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachCmd) Execute

func (c *AttachCmd) Execute(args []string) error

type AttachHelpCmd

type AttachHelpCmd struct{}

func (*AttachHelpCmd) Execute

func (c *AttachHelpCmd) Execute(args []string) error

type AttachShellCmd

type AttachShellCmd struct {
	ClusterName     TypeClusterName        `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Node            TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Detach          bool                   `` /* 184-byte string literal not displayed */
	Parallel        bool                   `short:"p" long:"parallel" description:"enable parallel execution across all machines"`
	ParallelThreads int                    `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Env             []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout  time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Out             flags.Filename         `short:"O" long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename         `` /* 156-byte string literal not displayed */
	Tail            []string               `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
	Help            AttachShellCmdHelp     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachShellCmd) AttachShell

func (c *AttachShellCmd) AttachShell(system *System, inventory *backends.Inventory, args []string) error

func (*AttachShellCmd) Execute

func (c *AttachShellCmd) Execute(args []string) error

type AttachShellCmdHelp

type AttachShellCmdHelp struct{}

func (*AttachShellCmdHelp) Execute

func (c *AttachShellCmdHelp) Execute(args []string) error

type AttachTrinoCmd

type AttachTrinoCmd struct {
	ClusterName    TypeClientName         `short:"n" long:"name" description:"Trino name" default:"trino"`
	Node           TypeNodesPlusAllOption `` /* 201-byte string literal not displayed */
	Namespace      string                 `short:"m" long:"namespace" description:"Namespace to use" default:"test"`
	Env            []string               `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	ConnectTimeout time.Duration          `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout time.Duration          `short:"S" long:"session-timeout" description:"Session timeout"`
	Help           AttachTrinoCmdHelp     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*AttachTrinoCmd) AttachTrino

func (c *AttachTrinoCmd) AttachTrino(system *System, inventory *backends.Inventory, args []string) error

func (*AttachTrinoCmd) Execute

func (c *AttachTrinoCmd) Execute(args []string) error

type AttachTrinoCmdHelp

type AttachTrinoCmdHelp struct{}

func (*AttachTrinoCmdHelp) Execute

func (c *AttachTrinoCmdHelp) Execute(args []string) error

type BlockDevice

type BlockDevice struct {
	Name         string         `json:"name"`
	Path         string         `json:"path"`
	FsType       string         `json:"fstype"`
	FsSize       string         `json:"fssize"`
	MountPoint   string         `json:"mountpoint"`
	Model        string         `json:"model"`      // "Amazon EC2 NVMe Instance Storage" or "Amazon Elastic Block Store"
	ModelType    string         `json:"model_type"` // "nvme" or "ebs"
	Size         string         `json:"size"`
	Type         string         `json:"type"` // loop or disk or part
	PartUUID     string         `json:"partuuid"`
	PartUUIDPath string         `json:"partuuid_path"`
	Children     []*BlockDevice `json:"children"`
}

func (*BlockDevice) Sort

func (b *BlockDevice) Sort()

type ClientChangeExpiryCmd

type ClientChangeExpiryCmd struct {
	ClientName TypeClientName `short:"n" long:"name" description:"Client group name" default:"client"`
	Machines   TypeMachines   `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	ExpireIn   TypeExpiry     `` /* 136-byte string literal not displayed */
	Help       HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientChangeExpiryCmd) ChangeExpiryClient

func (c *ClientChangeExpiryCmd) ChangeExpiryClient(system *System, inventory *backends.Inventory, args []string, logger *logger.Logger) (err error)

func (*ClientChangeExpiryCmd) Execute

func (c *ClientChangeExpiryCmd) Execute(args []string) error

type ClientCmd

type ClientCmd struct {
	Create          ClientCreateCmd             `` /* 133-byte string literal not displayed */
	Configure       ClientConfigureCmd          `command:"configure" subcommands-optional:"true" description:"(re)configure some clients, such as ams" webicon:"fas fa-gear"`
	Template        ClientTemplateCmd           `` /* 161-byte string literal not displayed */
	List            ClientListCmd               `command:"list" subcommands-optional:"true" description:"List client machine groups" webicon:"fas fa-list"`
	Start           ClientStartCmd              `` /* 127-byte string literal not displayed */
	Stop            ClientStopCmd               `command:"stop" subcommands-optional:"true" description:"Stop a client machine group" webicon:"fas fa-stop" invwebforce:"true"`
	Grow            ClientGrowCmd               `` /* 132-byte string literal not displayed */
	Destroy         ClientDestroyCmd            `command:"destroy" subcommands-optional:"true" description:"Destroy client(s)" webicon:"fas fa-trash" invwebforce:"true"`
	Attach          AttachClientCmd             `` /* 150-byte string literal not displayed */
	Share           ClientShareCmd              `` /* 141-byte string literal not displayed */
	UpdateHostsFile InstancesUpdateHostsFileCmd `` /* 134-byte string literal not displayed */
	Help            HelpCmd                     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientCmd) Execute

func (c *ClientCmd) Execute(args []string) error

type ClientConfigureAMSCmd

type ClientConfigureAMSCmd struct {
	ClientName      TypeClientName  `short:"n" long:"name" description:"Client group name" default:"ams"`
	Machines        TypeMachines    `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	ConnectClusters TypeClusterName `short:"s" long:"clusters" description:"Comma-separated list of clusters to configure as source for this AMS"`
	ConnectClients  TypeClientName  `short:"S" long:"clients" description:"Comma-separated list of (graph) clients to configure as source for this AMS"`
	MaxRetries      int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientConfigureAMSCmd) Execute

func (c *ClientConfigureAMSCmd) Execute(args []string) error

type ClientConfigureCmd

type ClientConfigureCmd struct {
	Tools    ClientConfigureToolsCmd    `command:"tools" subcommands-optional:"true" description:"Configure aerospike-tools" webicon:"fas fa-toolbox"`
	AMS      ClientConfigureAMSCmd      `command:"ams" subcommands-optional:"true" description:"Configure AMS (Prometheus/Grafana)" webicon:"fas fa-layer-group"`
	Firewall ClientConfigureFirewallCmd `command:"firewall" subcommands-optional:"true" description:"Configure firewall rules" webicon:"fas fa-shield-alt"`
	Expiry   ClientChangeExpiryCmd      `command:"expiry" subcommands-optional:"true" description:"Change expiry" webicon:"fas fa-clock"`
	Help     HelpCmd                    `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientConfigureCmd) Execute

func (c *ClientConfigureCmd) Execute(args []string) error

type ClientConfigureFirewallCmd

type ClientConfigureFirewallCmd struct {
	ClientName   TypeClientName `short:"n" long:"name" description:"Client group name" default:"client"`
	Machines     TypeMachines   `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	FirewallName string         `short:"f" long:"firewall" description:"Firewall name to assign to the client machines"`
	Help         HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientConfigureFirewallCmd) Execute

func (c *ClientConfigureFirewallCmd) Execute(args []string) error

type ClientConfigureToolsCmd

type ClientConfigureToolsCmd struct {
	ClientName TypeClientName `short:"n" long:"name" description:"Client group name" default:"tools"`
	Machines   TypeMachines   `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	ConnectAMS TypeClientName `short:"m" long:"ams" default:"ams" description:"AMS client machine name"`
	Threads    int            `short:"t" long:"threads" description:"Number of parallel threads" default:"10"`
	MaxRetries int            `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration  `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help       HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientConfigureToolsCmd) Execute

func (c *ClientConfigureToolsCmd) Execute(args []string) error

type ClientCreateAMSCmd

type ClientCreateAMSCmd struct {
	ClientCreateNoneCmd
	GrafanaVersion    string          `long:"grafana-version" description:"Grafana version to install" default:"12.4.3"`
	PrometheusVersion string          `long:"prometheus-version" description:"Prometheus version to install" default:"latest"`
	ConnectClusters   TypeClusterName `short:"s" long:"clusters" description:"Comma-separated list of clusters to configure as source for this AMS"`
	ConnectClients    TypeClientName  `short:"S" long:"clients" description:"Comma-separated list of (graph) clients to configure as source for this AMS"`
	Dashboards        flags.Filename  `` /* 152-byte string literal not displayed */
	DebugDashboards   bool            `long:"debug-dashboards" description:"Enable debug output for dashboard installation"`
}

func (*ClientCreateAMSCmd) Execute

func (c *ClientCreateAMSCmd) Execute(args []string) error

type ClientCreateBaseCmd

type ClientCreateBaseCmd struct {
	ClientCreateNoneCmd
	// contains filtered or unexported fields
}

func (*ClientCreateBaseCmd) Execute

func (c *ClientCreateBaseCmd) Execute(args []string) error

type ClientCreateCmd

type ClientCreateCmd struct {
	None   ClientCreateNoneCmd   `` /* 144-byte string literal not displayed */
	Base   ClientCreateBaseCmd   `command:"base" subcommands-optional:"true" description:"Simple base image" webicon:"fas fa-grip-lines" invwebforce:"true"`
	Tools  ClientCreateToolsCmd  `command:"tools" subcommands-optional:"true" description:"Aerospike-tools" webicon:"fas fa-toolbox" invwebforce:"true"`
	AMS    ClientCreateAMSCmd    `` /* 174-byte string literal not displayed */
	VSCode ClientCreateVSCodeCmd `` /* 126-byte string literal not displayed */
	Graph  ClientCreateGraphCmd  `` /* 139-byte string literal not displayed */
	EksCtl ClientCreateEksCtlCmd `` /* 191-byte string literal not displayed */
	Help   HelpCmd               `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientCreateCmd) Execute

func (c *ClientCreateCmd) Execute(args []string) error

type ClientCreateEksCtlCmd

type ClientCreateEksCtlCmd struct {
	ClientCreateNoneCmd
	EksAwsRegion          string         `short:"r" long:"eks-aws-region" description:"AWS region to install expiries system too and configure as default region"`
	EksAwsKeyId           string         `` /* 132-byte string literal not displayed */
	EksAwsSecretKey       string         `` /* 140-byte string literal not displayed */
	EksAwsInstanceProfile string         `short:"x" long:"eks-aws-profile" description:"AWS instance profile to use instead of KEYID/SecretKey for authentication"`
	FeaturesFilePath      flags.Filename `` /* 142-byte string literal not displayed */
	AerolabBinary         flags.Filename `long:"aerolab-binary" description:"Path to local aerolab binary to install (required if running unofficial build)"`
}

func (*ClientCreateEksCtlCmd) Execute

func (c *ClientCreateEksCtlCmd) Execute(args []string) error

type ClientCreateGraphCmd

type ClientCreateGraphCmd struct {
	// The default group name comes from clientTypeDefaultNames in
	// cmdDefaults.go, alongside the other client types.
	ClientName         TypeClientName           `short:"n" long:"name" description:"Client group name"`
	ClientCount        int                      `short:"c" long:"count" description:"Number of clients" default:"1"`
	Owner              string                   `short:"o" long:"owner" description:"Owner of the instances"`
	AWS                InstancesCreateCmdAws    `group:"AWS" namespace:"aws" description:"backend-aws"`
	GCP                InstancesCreateCmdGcp    `group:"GCP" namespace:"gcp" description:"backend-gcp"`
	Docker             InstancesCreateCmdDocker `group:"Docker" namespace:"docker" description:"backend-docker"`
	Tags               []string                 `short:"t" long:"tag" description:"Tags to add to the instances, format: k=v"`
	SeedClusterName    TypeClusterName          `short:"C" long:"seed-cluster" description:"Cluster name to seed from" default:"asd"`
	Seed               string                   `` /* 138-byte string literal not displayed */
	Namespace          string                   `short:"m" long:"namespace" description:"Namespace name to configure graph to use" default:"test"`
	ExtraProperties    []string                 `` /* 133-byte string literal not displayed */
	AMS                string                   `long:"ams" description:"Name of an AMS client to add this machine to prometheus configs to"`
	RAMMb              int                      `long:"ram-mb" description:"Manually specify amount of RAM MiB to use"`
	GraphImage         string                   `long:"graph-image" description:"Docker image to use for graph installation" default:"aerospike/aerospike-graph-service"`
	DockerLoginUser    string                   `long:"docker-user" description:"Login to docker registry for graph installation"`
	DockerLoginPass    string                   `long:"docker-pass" description:"Login to docker registry for graph installation" webtype:"password" telemetry:"redact"`
	DockerLoginURL     string                   `long:"docker-url" description:"Login to docker registry for graph installation"`
	GraphPrivileged    bool                     `long:"graph-privileged" description:"Force graph to run in privileged docker container mode"`
	JustDoIt           bool                     `long:"confirm" description:"Confirm any warning questions without being asked" webdisable:"true" webset:"true"`
	TypeOverride       string                   `long:"type-override" description:"Override the client type label"`
	ParallelSSHThreads int                      `short:"p" long:"threads" description:"Number of threads to use for the execution" default:"10"`
	// Retry configuration
	MaxRetries         int           `` /* 134-byte string literal not displayed */
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between transient retries" default:"30s" simplemode:"false"`
	CapacityRetries    int           `long:"capacity-retries" description:"Maximum retries for capacity errors (AWS/GCP only)" default:"0" simplemode:"false"`
	CapacityRetrySleep time.Duration `long:"capacity-retry-sleep" description:"Sleep duration between capacity retries" default:"60s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientCreateGraphCmd) Execute

func (c *ClientCreateGraphCmd) Execute(args []string) error

type ClientCreateNoneCmd

type ClientCreateNoneCmd struct {
	// Every client type embeds this struct, so the default group name cannot
	// be a struct tag: it has to differ per client type. See
	// clientTypeDefaultNames in cmdDefaults.go.
	ClientName         TypeClientName           `short:"n" long:"name" description:"Client group name"`
	ClientCount        int                      `short:"c" long:"count" description:"Number of clients" default:"1"`
	Owner              string                   `short:"o" long:"owner" description:"Owner of the instances"`
	AWS                InstancesCreateCmdAws    `group:"AWS" namespace:"aws" description:"backend-aws"`
	GCP                InstancesCreateCmdGcp    `group:"GCP" namespace:"gcp" description:"backend-gcp"`
	Docker             InstancesCreateCmdDocker `group:"Docker" namespace:"docker" description:"backend-docker"`
	OS                 string                   `long:"os" description:"OS to use for the instances" default:"ubuntu"`
	Version            string                   `long:"version" description:"Version of the OS to use for the instances" default:"24.04"`
	Arch               string                   `long:"arch" description:"Architecture override to use for the instances (amd64, arm64)"`
	Tags               []string                 `short:"t" long:"tag" description:"Tags to add to the instances, format: k=v"`
	NoSetHostname      bool                     `` /* 132-byte string literal not displayed */
	NoSetDNS           bool                     `long:"no-set-dns" description:"Set to prevent aerolab from updating resolved to use 1.1.1.1/8.8.8.8 DNS"`
	StartScript        flags.Filename           `` /* 133-byte string literal not displayed */
	TypeOverride       string                   `long:"type-override" description:"Override the client type label"`
	ParallelSSHThreads int                      `short:"p" long:"threads" description:"Number of threads to use for the execution" default:"10"`
	// Retry configuration
	MaxRetries         int           `` /* 134-byte string literal not displayed */
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between transient retries" default:"30s" simplemode:"false"`
	CapacityRetries    int           `long:"capacity-retries" description:"Maximum retries for capacity errors (AWS/GCP only)" default:"0" simplemode:"false"`
	CapacityRetrySleep time.Duration `long:"capacity-retry-sleep" description:"Sleep duration between capacity retries" default:"60s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*ClientCreateNoneCmd) Execute

func (c *ClientCreateNoneCmd) Execute(args []string) error

type ClientCreateToolsCmd

type ClientCreateToolsCmd struct {
	ClientCreateNoneCmd
	ToolsVersion TypeAerospikeVersion `short:"v" long:"tools-version" description:"Aerospike tools version to install" default:"latest"`
}

func (*ClientCreateToolsCmd) Execute

func (c *ClientCreateToolsCmd) Execute(args []string) error

type ClientCreateVSCodeCmd

type ClientCreateVSCodeCmd struct {
	ClientCreateNoneCmd
	VSCodePassword string `` /* 126-byte string literal not displayed */
	Kernels        string `` /* 155-byte string literal not displayed */
}

func (*ClientCreateVSCodeCmd) Execute

func (c *ClientCreateVSCodeCmd) Execute(args []string) error

type ClientDestroyCmd

type ClientDestroyCmd struct {
	ClientName TypeClientName `short:"n" long:"name" description:"Client names, comma separated OR 'all' to affect all clients" default:"client"`
	Machines   TypeMachines   `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	Parallel   bool           `short:"p" long:"parallel" description:"If destroying many clients at once, set this to destroy in parallel"`
	Force      bool           `short:"f" long:"force" description:"Force destroy without confirmation" webdisable:"true" webset:"true"`
	Help       HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientDestroyCmd) Execute

func (c *ClientDestroyCmd) Execute(args []string) error

type ClientGrowCmd

type ClientGrowCmd struct {
	None   ClientCreateNoneCmd   `` /* 144-byte string literal not displayed */
	Base   ClientCreateBaseCmd   `command:"base" subcommands-optional:"true" description:"Simple base image" webicon:"fas fa-grip-lines" invwebforce:"true"`
	Tools  ClientCreateToolsCmd  `command:"tools" subcommands-optional:"true" description:"Aerospike-tools" webicon:"fas fa-toolbox" invwebforce:"true"`
	AMS    ClientCreateAMSCmd    `` /* 174-byte string literal not displayed */
	VSCode ClientCreateVSCodeCmd `` /* 126-byte string literal not displayed */
	Graph  ClientCreateGraphCmd  `` /* 139-byte string literal not displayed */
	EksCtl ClientCreateEksCtlCmd `` /* 191-byte string literal not displayed */
	Help   HelpCmd               `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientGrowCmd) Execute

func (c *ClientGrowCmd) Execute(args []string) error

type ClientListCmd

type ClientListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Owner      string   `short:"O" long:"owner" description:"Filter by owner of the client"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientListCmd) Execute

func (c *ClientListCmd) Execute(args []string) error

func (*ClientListCmd) ListClients

func (c *ClientListCmd) ListClients(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

type ClientShareCmd

type ClientShareCmd struct {
	ClientName      TypeClientName `short:"n" long:"name" description:"Client name" default:"client"`
	KeyFile         flags.Filename `short:"f" long:"pubkey" description:"Path to a pubkey to import to client nodes"`
	ParallelThreads int            `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Help            HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientShareCmd) Execute

func (c *ClientShareCmd) Execute(args []string) error

type ClientStartCmd

type ClientStartCmd struct {
	ClientName      TypeClientName `short:"n" long:"name" description:"Client names, comma separated OR 'all' to affect all clients" default:"client"`
	Machines        TypeMachines   `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	ParallelThreads int            `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries      int            `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration  `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientStartCmd) Execute

func (c *ClientStartCmd) Execute(args []string) error

type ClientStopCmd

type ClientStopCmd struct {
	ClientName TypeClientName `short:"n" long:"name" description:"Client names, comma separated OR 'all' to affect all clients" default:"client"`
	Machines   TypeMachines   `short:"l" long:"nodes" description:"Node list, comma separated. Empty=ALL" default:""`
	Help       HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClientStopCmd) Execute

func (c *ClientStopCmd) Execute(args []string) error

type ClientTemplateAMSCleanupCmd

type ClientTemplateAMSCleanupCmd struct {
	DryRun bool    `long:"dry-run" description:"Do not actually destroy templates/instances, just show what would be removed"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

ClientTemplateAMSCleanupCmd cleans dangling AMS template creation instances and superseded AMS template images.

This removes:

  • Dangling temporary instances used during AMS template creation (these are tagged aerolab.type=images.create + aerolab.tmpl.version=ams-* and may survive a crashed build or Ctrl-C during creation).
  • Superseded AMS templates: for each architecture, anything whose aerolab.ams.generation tag is lower than the highest generation found, or missing/unparsable.

Usage:

aerolab client template ams cleanup
aerolab client template ams cleanup --dry-run

func (*ClientTemplateAMSCleanupCmd) CleanupAMSTemplates

func (c *ClientTemplateAMSCleanupCmd) CleanupAMSTemplates(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

CleanupAMSTemplates removes dangling AMS template creation instances and any AMS template images whose generation tag is lower than the current highest generation (or is missing/unparsable) for their architecture.

func (*ClientTemplateAMSCleanupCmd) Execute

func (c *ClientTemplateAMSCleanupCmd) Execute(args []string) error

Execute runs `client template ams cleanup`.

type ClientTemplateAMSCmd

type ClientTemplateAMSCmd struct {
	Create  ClientTemplateAMSCreateCmd  `` /* 152-byte string literal not displayed */
	Refresh ClientTemplateAMSRefreshCmd `` /* 178-byte string literal not displayed */
	List    ClientTemplateAMSListCmd    `command:"list" subcommands-optional:"true" description:"List AMS templates" webicon:"fas fa-list"`
	Destroy ClientTemplateAMSDestroyCmd `command:"destroy" subcommands-optional:"true" description:"Destroy AMS template(s)" webicon:"fas fa-trash" invwebforce:"true"`
	Cleanup ClientTemplateAMSCleanupCmd `` /* 157-byte string literal not displayed */
	Help    HelpCmd                     `command:"help" subcommands-optional:"true" description:"Print help"`
}

ClientTemplateAMSCmd is the AMS template management command group. AMS templates are pre-built images containing Prometheus, Grafana (with plugins and generic datasources) and Loki, used for fast AMS client creation.

func (*ClientTemplateAMSCmd) Execute

func (c *ClientTemplateAMSCmd) Execute(args []string) error

Execute prints the help when `client template ams` is invoked without a subcommand.

type ClientTemplateAMSCreateCmd

type ClientTemplateAMSCreateCmd struct {
	GrafanaVersion     string        `short:"g" long:"grafana-version" description:"Grafana version to install" default:"12.4.3"`
	PrometheusVersion  string        `short:"P" long:"prometheus-version" description:"Prometheus version to install" default:"latest"`
	Distro             string        `short:"d" long:"distro" description:"Linux distribution to use" default:"ubuntu"`
	DistroVersion      string        `short:"i" long:"distro-version" description:"Distribution version to use" default:"24.04"`
	Arch               string        `` /* 136-byte string literal not displayed */
	Timeout            int           `short:"t" long:"timeout" description:"Timeout in minutes for template creation" default:"30"`
	NoVacuum           bool          `short:"V" long:"no-vacuum" description:"Don't cleanup temporary instance on failure"`
	DryRun             bool          `long:"dry-run" description:"Validate parameters only, don't create template"`
	Owner              string        `short:"o" long:"owner" description:"Owner tag value for the template"`
	DisablePublicIP    bool          `long:"aws.no-public-ip" description:"AWS: Disable public IP assignment"`
	GCPDisablePublicIP bool          `long:"gcp.no-public-ip" description:"GCP: Disable public IP assignment"`
	GCPVPC             string        `long:"gcp.vpc" description:"GCP: VPC network name to use; empty=default VPC"`
	GCPSubnet          string        `long:"gcp.subnet" description:"GCP: subnet name within the selected VPC; empty=auto-select first subnet in the zone's region"`
	MaxRetries         int           `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

ClientTemplateAMSCreateCmd creates a new AMS template image with Prometheus, Grafana (plugins and generic datasources) and Loki pre-installed. The template is tagged with a monotonically-increasing generation number so multiple generations can coexist; `client create ams` picks the highest generation automatically.

Usage:

aerolab client template ams create
aerolab client template ams create -a arm64

func (*ClientTemplateAMSCreateCmd) CreateTemplate

func (c *ClientTemplateAMSCreateCmd) CreateTemplate(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, allowRefresh bool) (string, error)

CreateTemplate builds a new AMS template image. When allowRefresh is false (`client template ams create` path, and the auto-create path from `client create ams`) it errors out if any AMS template already exists for the target architecture. When allowRefresh is true (`client template ams refresh` path) it always creates a new generation and destroys any older ones on success.

Parameters:

  • system: The initialized system context
  • inventory: The current backend inventory
  • logger: Logger for output
  • args: Additional command arguments
  • allowRefresh: true for refresh semantics, false for strict create

Returns:

  • string: The name of the created (or newly-discovered) template image
  • error: nil on success, or an error describing what failed

func (*ClientTemplateAMSCreateCmd) Execute

func (c *ClientTemplateAMSCreateCmd) Execute(args []string) error

Execute runs `client template ams create`.

type ClientTemplateAMSDestroyCmd

type ClientTemplateAMSDestroyCmd struct {
	Arch              string  `short:"a" long:"arch" description:"Architecture to destroy the template for (amd64, arm64)"`
	Generation        int     `short:"i" long:"generation" description:"AMS template generation number to destroy"`
	PrometheusVersion string  `short:"P" long:"prometheus-version" description:"Prometheus version to destroy the template for"`
	GrafanaVersion    string  `short:"g" long:"grafana-version" description:"Grafana version to destroy the template for"`
	Force             bool    `short:"f" long:"force" description:"Force the destruction of the template - do not ask for confirmation"`
	DryRun            bool    `long:"dry-run" description:"Do not actually destroy the template, just run the basic checks"`
	Help              HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

ClientTemplateAMSDestroyCmd destroys AMS template images.

Usage:

aerolab client template ams destroy            # destroy all (prompt)
aerolab client template ams destroy -a amd64   # destroy only amd64 templates
aerolab client template ams destroy --generation 3
aerolab client template ams destroy --force

func (*ClientTemplateAMSDestroyCmd) DestroyAMSTemplates

func (c *ClientTemplateAMSDestroyCmd) DestroyAMSTemplates(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

DestroyAMSTemplates destroys AMS templates matching the specified criteria.

func (*ClientTemplateAMSDestroyCmd) Execute

func (c *ClientTemplateAMSDestroyCmd) Execute(args []string) error

Execute runs `client template ams destroy`.

type ClientTemplateAMSListCmd

type ClientTemplateAMSListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

ClientTemplateAMSListCmd lists available AMS templates from inventory. Emits a warning when more than one template exists for a given architecture (since `client create ams` will only pick the highest generation and the others are unused).

Usage:

aerolab client template ams list
aerolab client template ams list -o json

func (*ClientTemplateAMSListCmd) Execute

func (c *ClientTemplateAMSListCmd) Execute(args []string) error

Execute runs `client template ams list`.

func (*ClientTemplateAMSListCmd) ListAMSTemplates

func (c *ClientTemplateAMSListCmd) ListAMSTemplates(system *System, inventory *backends.Inventory, args []string) error

ListAMSTemplates lists all AMS templates in the inventory. When more than one template exists for the same architecture it emits a warning recommending `client template ams cleanup` since only the highest generation is used by `client create ams`.

type ClientTemplateAMSRefreshCmd

type ClientTemplateAMSRefreshCmd struct {
	ClientTemplateAMSCreateCmd
}

ClientTemplateAMSRefreshCmd builds a new AMS template generation and, on success, destroys all previous AMS template generations. If no existing template exists, this is equivalent to `client template ams create`.

Usage:

aerolab client template ams refresh
aerolab client template ams refresh -a arm64

func (*ClientTemplateAMSRefreshCmd) Execute

func (c *ClientTemplateAMSRefreshCmd) Execute(args []string) error

Execute runs `client template ams refresh`.

type ClientTemplateCmd

type ClientTemplateCmd struct {
	AMS  ClientTemplateAMSCmd `` /* 134-byte string literal not displayed */
	Help HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

ClientTemplateCmd is the parent command group for client template management. Templates are pre-built images that let `client create <type>` skip heavy package installation. Currently only AMS clients have a template implementation.

func (*ClientTemplateCmd) Execute

func (c *ClientTemplateCmd) Execute(args []string) error

Execute prints the help when `client template` is invoked without a subcommand.

type CloudAuthCmd

type CloudAuthCmd struct {
	GetToken CloudAuthGetTokenCmd `command:"get-token" subcommands-optional:"true" description:"Get and print the auth token" webicon:"fas fa-key"`
	Help     HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudAuthCmd) Execute

func (c *CloudAuthCmd) Execute(args []string) error

type CloudAuthGetTokenCmd

type CloudAuthGetTokenCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudAuthGetTokenCmd) Execute

func (c *CloudAuthGetTokenCmd) Execute(args []string) error

type CloudClustersCmd

type CloudClustersCmd struct {
	List             CloudClustersListCmd             `command:"list" subcommands-optional:"true" description:"List aerospike clusters" webicon:"fas fa-list"`
	Create           CloudClustersCreateCmd           `command:"create" subcommands-optional:"true" description:"Create an aerospike cluster and VPC peering" webicon:"fas fa-plus"`
	Delete           CloudClustersDeleteCmd           `command:"delete" subcommands-optional:"true" description:"Delete an aerospike cluster and VPC peering" webicon:"fas fa-trash"`
	Update           CloudClustersUpdateCmd           `command:"update" subcommands-optional:"true" description:"Update an aerospike cluster" webicon:"fas fa-pencil"`
	PeerVPC          CloudClustersPeerVPCCmd          `` /* 137-byte string literal not displayed */
	VPCPeeringStatus CloudClustersVPCPeeringStatusCmd `` /* 136-byte string literal not displayed */
	Get              CloudClustersGetCmd              `command:"get" subcommands-optional:"true" description:"Get cluster connection details" webicon:"fas fa-info"`
	Wait             CloudClustersWaitCmd             `command:"wait" subcommands-optional:"true" description:"Wait for cluster health.status" webicon:"fas fa-hourglass"`
	Credentials      CloudClustersCredentialsCmd      `command:"credentials" subcommands-optional:"true" description:"Cluster credentials operations" webicon:"fas fa-key"`
	EnableLogsAccess CloudClustersEnableLogsAccessCmd `` /* 148-byte string literal not displayed */
	Help             HelpCmd                          `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersCmd) Execute

func (c *CloudClustersCmd) Execute(args []string) error

type CloudClustersCreateCmd

type CloudClustersCreateCmd struct {
	Name                  string   `short:"n" long:"name" description:"Name of the cluster"`
	InstanceType          string   `short:"i" long:"instance-type" description:"Instance type"`
	Region                string   `short:"r" long:"region" description:"Region"`
	AvailabilityZoneCount int      `short:"a" long:"availability-zone-count" description:"Number of availability zones (1-3)" default:"2"`
	ClusterSize           int      `short:"s" long:"cluster-size" description:"Number of nodes in cluster"`
	DataStorage           string   `short:"d" long:"data-storage" description:"Data storage type (memory, local-disk, network-storage)"`
	Credentials           string   `` /* 185-byte string literal not displayed */
	VPCID                 string   `short:"v" long:"vpc-id" description:"VPC ID to peer the cluster to" default:"default"`
	ForceRouteCreation    bool     `short:"f" long:"force-route-creation" description:"Force route creation even if it already exists"`
	DataResiliency        string   `long:"data-resiliency" description:"Data resiliency (local-disk, network-storage)"`
	DataPlaneVersion      string   `long:"data-plane-version" description:"Data plane version" default:"latest"`
	CloudCIDR             string   `` /* 281-byte string literal not displayed */
	DryRun                bool     `long:"dry-run" description:"Perform checks and print what would be done without actually creating anything"`
	NoLogsAccess          bool     `long:"no-logs-access" description:"Skip enabling S3 log bucket access after cluster creation"`
	LogsAccessRoles       []string `` /* 225-byte string literal not displayed */
	CustomConf            string   `` /* 177-byte string literal not displayed */
	Help                  HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersCreateCmd) CreateCloudDb

func (c *CloudClustersCreateCmd) CreateCloudDb(system *System, inventory *backends.Inventory, args []string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer, logger *logger.Logger) error

func (*CloudClustersCreateCmd) Execute

func (c *CloudClustersCreateCmd) Execute(args []string) error

type CloudClustersCredentialsCmd

type CloudClustersCredentialsCmd struct {
	List   CloudClustersCredentialsListCmd   `command:"list" subcommands-optional:"true" description:"List cluster credentials" webicon:"fas fa-list"`
	Create CloudClustersCredentialsCreateCmd `command:"create" subcommands-optional:"true" description:"Create cluster credential" webicon:"fas fa-plus"`
	Delete CloudClustersCredentialsDeleteCmd `command:"delete" subcommands-optional:"true" description:"Delete cluster credential" webicon:"fas fa-trash"`
	Help   HelpCmd                           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersCredentialsCmd) Execute

func (c *CloudClustersCredentialsCmd) Execute(args []string) error

type CloudClustersCredentialsCreateCmd

type CloudClustersCredentialsCreateCmd struct {
	Help      HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
	ClusterID string   `short:"c" long:"cluster-id" description:"Cluster ID"`
	Username  string   `short:"u" long:"username" description:"Username"`
	Password  string   `short:"p" long:"password" description:"Password" telemetry:"redact"`
	Roles     []string `short:"r" long:"roles" description:"Roles (read, write, read-write)" default:"read-write"`
	Wait      bool     `short:"w" long:"wait" description:"Wait for credentials to become active"`
}

func (*CloudClustersCredentialsCreateCmd) CreateCloudCredentials

func (c *CloudClustersCredentialsCreateCmd) CreateCloudCredentials(system *System) error

func (*CloudClustersCredentialsCreateCmd) Execute

func (c *CloudClustersCredentialsCreateCmd) Execute(args []string) error

type CloudClustersCredentialsDeleteCmd

type CloudClustersCredentialsDeleteCmd struct {
	Help          HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	ClusterID     string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	CredentialsID string  `short:"C" long:"credentials-id" description:"Credentials ID"`
}

func (*CloudClustersCredentialsDeleteCmd) Execute

func (c *CloudClustersCredentialsDeleteCmd) Execute(args []string) error

type CloudClustersCredentialsListCmd

type CloudClustersCredentialsListCmd struct {
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	ClusterID string  `short:"c" long:"cluster-id" description:"Cluster ID"`
}

func (*CloudClustersCredentialsListCmd) Execute

func (c *CloudClustersCredentialsListCmd) Execute(args []string) error

type CloudClustersDeleteCmd

type CloudClustersDeleteCmd struct {
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	ClusterID string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	NoWait    bool    `long:"no-wait" description:"Do not wait until cluster status is decommissioned"`
	Force     bool    `short:"f" long:"force" description:"Skip confirmation prompt"`
}

func (*CloudClustersDeleteCmd) Execute

func (c *CloudClustersDeleteCmd) Execute(args []string) error

type CloudClustersEnableLogsAccessCmd

type CloudClustersEnableLogsAccessCmd struct {
	ClusterID       string   `short:"c" long:"cluster-id" description:"Cluster ID"`
	ClusterName     string   `short:"n" long:"name" description:"Cluster name (alternative to cluster-id)"`
	AuthorizedRoles []string `` /* 176-byte string literal not displayed */
	Append          bool     `short:"a" long:"append" description:"Append to existing authorized roles instead of replacing them"`
	Help            HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

CloudClustersEnableLogsAccessCmd enables log access for an Aerospike Cloud cluster by granting specified AWS IAM roles or accounts access to the cluster's S3 log bucket.

func (*CloudClustersEnableLogsAccessCmd) EnableLogsAccess

func (c *CloudClustersEnableLogsAccessCmd) EnableLogsAccess(system *System, inventory *backends.Inventory, logger *logger.Logger) error

EnableLogsAccess enables log access for an Aerospike Cloud cluster by updating the logging configuration.

Parameters:

  • system: The system context
  • inventory: The backend inventory
  • logger: The logger instance

Returns:

  • error: nil on success, or an error describing what failed

func (*CloudClustersEnableLogsAccessCmd) Execute

func (c *CloudClustersEnableLogsAccessCmd) Execute(args []string) error

type CloudClustersGetCmd

type CloudClustersGetCmd struct {
	Host    CloudClustersGetHostCmd    `command:"host" subcommands-optional:"true" description:"Get cluster host" webicon:"fas fa-network-wired"`
	TlsCert CloudClustersGetTlsCertCmd `command:"tls-cert" subcommands-optional:"true" description:"Get cluster TLS certificate" webicon:"fas fa-lock"`
	Help    HelpCmd                    `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersGetCmd) Execute

func (c *CloudClustersGetCmd) Execute(args []string) error

type CloudClustersGetHostCmd

type CloudClustersGetHostCmd struct {
	ClusterID   string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	ClusterName string  `short:"n" long:"name" description:"Cluster name"`
	Help        HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersGetHostCmd) Execute

func (c *CloudClustersGetHostCmd) Execute(args []string) error

type CloudClustersGetTlsCertCmd

type CloudClustersGetTlsCertCmd struct {
	ClusterID   string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	ClusterName string  `short:"n" long:"name" description:"Cluster name"`
	Help        HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersGetTlsCertCmd) Execute

func (c *CloudClustersGetTlsCertCmd) Execute(args []string) error

type CloudClustersListCmd

type CloudClustersListCmd struct {
	Output        string   `` /* 130-byte string literal not displayed */
	TableTheme    string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy        []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager         bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	StatusNe      string   `long:"status-ne" description:"Filter clusters to exclude specified statuses (comma-separated)" default:"decommissioned"`
	WithVPCStatus bool     `short:"v" long:"with-vpc-status" description:"Include VPC peering status for each cluster (requires AWS backend)"`
	Help          HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersListCmd) Execute

func (c *CloudClustersListCmd) Execute(args []string) error

func (*CloudClustersListCmd) GetClusters

func (c *CloudClustersListCmd) GetClusters() ([]Cluster, map[string]any, error)

GetClusters retrieves the list of Aerospike Cloud clusters without formatting. This method can be called by other commands that need access to the cluster data.

Returns:

  • []Cluster: The list of clusters
  • map[string]interface{}: The raw JSON response for JSON output formats
  • error: nil on success, or an error describing what failed

func (*CloudClustersListCmd) ListClusters

func (c *CloudClustersListCmd) ListClusters(out io.Writer, page *pager.Pager) error

ListClusters retrieves and formats Aerospike Cloud clusters for table/text output. This method can be called by other commands (like inventory list) to include cloud clusters.

Parameters:

  • out: The io.Writer to write the output to
  • page: Optional pager for color support detection

Returns:

  • error: nil on success, or an error describing what failed

type CloudClustersPeerVPCCmd

type CloudClustersPeerVPCCmd struct {
	ClusterID          string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	Region             string  `short:"r" long:"region" description:"VPC region (auto-detected from VPC if not specified)"`
	VPCID              string  `short:"v" long:"vpc-id" description:"VPC ID to peer the cluster to" default:"default"`
	StageInitiate      bool    `` /* 159-byte string literal not displayed */
	StageAccept        bool    `` /* 155-byte string literal not displayed */
	StageRoute         bool    `` /* 154-byte string literal not displayed */
	StageAssociateDNS  bool    `` /* 171-byte string literal not displayed */
	ForceRouteCreation bool    `short:"f" long:"force-route-creation" description:"Force route creation even if it already exists"`
	Help               HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`

	// Internal fields for programmatic use (not CLI flags)
	// These allow callers like db create to pass pre-resolved values
	PreResolvedVPCCIDR   string // VPC CIDR if already known
	PreResolvedAccountID string // AWS account ID if already known
	PreResolvedVPCRegion string // VPC region if already known
	CleanupOnError       func() // Cleanup function to call on error (e.g., blackhole route cleanup)
}

func (*CloudClustersPeerVPCCmd) Execute

func (c *CloudClustersPeerVPCCmd) Execute(args []string) error

func (*CloudClustersPeerVPCCmd) PeerVPC

func (c *CloudClustersPeerVPCCmd) PeerVPC(system *System, inventory *backends.Inventory, args []string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer, logger *logger.Logger) error

type CloudClustersUpdateCmd

type CloudClustersUpdateCmd struct {
	ClusterID    string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	Name         string  `short:"n" long:"name" description:"Name of the cluster"`
	InstanceType string  `short:"i" long:"instance-type" description:"Instance type (vertical scaling)"`
	ClusterSize  int     `short:"s" long:"cluster-size" description:"Number of nodes in cluster (horizontal scaling)"`
	NoWait       bool    `long:"no-wait" description:"Do not wait for cluster update to complete"`
	DryRun       bool    `long:"dry-run" description:"Print the JSON request that would be sent without actually sending it"`
	CustomConf   string  `` /* 177-byte string literal not displayed */
	Help         HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersUpdateCmd) Execute

func (c *CloudClustersUpdateCmd) Execute(args []string) error

func (*CloudClustersUpdateCmd) UpdateCloudCluster

func (c *CloudClustersUpdateCmd) UpdateCloudCluster(system *System, inventory *backends.Inventory, args []string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer, logger *logger.Logger) error

type CloudClustersVPCPeeringStatusCmd

type CloudClustersVPCPeeringStatusCmd struct {
	ClusterID string  `short:"c" long:"cluster-id" description:"Cluster ID"`
	VPCID     string  `short:"v" long:"vpc-id" description:"VPC ID (optional, checks all peerings if not specified)"`
	Output    string  `short:"o" long:"output" description:"Output format (json, json-indent)" default:"json-indent"`
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersVPCPeeringStatusCmd) Execute

func (c *CloudClustersVPCPeeringStatusCmd) Execute(args []string) error

func (*CloudClustersVPCPeeringStatusCmd) GetVPCPeeringStatus

func (c *CloudClustersVPCPeeringStatusCmd) GetVPCPeeringStatus(system *System, inventory *backends.Inventory, log *logger.Logger) (*VPCPeeringStatusResponse, error)

GetVPCPeeringStatus gets the VPC peering status for a cluster

type CloudClustersWaitCmd

type CloudClustersWaitCmd struct {
	ClusterID   string   `short:"c" long:"cluster-id" description:"Cluster ID"`
	Status      []string `short:"s" long:"status" description:"Wait for health.status to match any of these values (can be specified multiple times)"`
	StatusNe    []string `long:"status-ne" description:"Wait for health.status to NOT match any of these values (can be specified multiple times)"`
	WaitTimeout int      `short:"t" long:"wait-timeout" description:"Timeout in seconds (0 = no timeout)" default:"3600"`
	Help        HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudClustersWaitCmd) Execute

func (c *CloudClustersWaitCmd) Execute(args []string) error

type CloudCmd

type CloudCmd struct {
	ListInstanceTypes CloudListInstanceTypesCmd `command:"list-instance-types" subcommands-optional:"true" description:"List instance types" webicon:"fas fa-list"`
	Secrets           CloudSecretsCmd           `command:"secrets" subcommands-optional:"true" description:"Secrets operations" webicon:"fas fa-key"`
	Clusters          CloudClustersCmd          `command:"clusters" subcommands-optional:"true" description:"Clusters operations" webicon:"fas fa-database"`
	Auth              CloudAuthCmd              `command:"auth" subcommands-optional:"true" description:"Authentication operations" webicon:"fas fa-lock"`
	GenConfTemplates  CloudGenConfTemplatesCmd  `` /* 148-byte string literal not displayed */
	Help              HelpCmd                   `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudCmd) Execute

func (c *CloudCmd) Execute(args []string) error

type CloudGenConfTemplatesCmd

type CloudGenConfTemplatesCmd struct {
	OutputDir string  `short:"d" long:"output-dir" description:"Directory to save template files" default:"."`
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudGenConfTemplatesCmd) Execute

func (c *CloudGenConfTemplatesCmd) Execute(args []string) error

func (*CloudGenConfTemplatesCmd) GenerateTemplates

func (c *CloudGenConfTemplatesCmd) GenerateTemplates(system *System) error

type CloudListInstanceTypesCmd

type CloudListInstanceTypesCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Region     string   `long:"region" description:"Filter by region (only for non-json, non-jq output)"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudListInstanceTypesCmd) Execute

func (c *CloudListInstanceTypesCmd) Execute(args []string) error

type CloudProvider

type CloudProvider struct {
	ID      string   `json:"id"`
	Name    string   `json:"name"`
	Regions []Region `json:"regions"`
}

CloudProvider represents a cloud provider

type CloudProvidersResponse

type CloudProvidersResponse struct {
	Count   int             `json:"count"`
	Results []CloudProvider `json:"results"`
}

CloudProvidersResponse represents the API response structure

type CloudSecretsCmd

type CloudSecretsCmd struct {
	List   CloudSecretsListCmd   `command:"list" subcommands-optional:"true" description:"List secrets" webicon:"fas fa-list"`
	Create CloudSecretsCreateCmd `command:"create" subcommands-optional:"true" description:"Create secret" webicon:"fas fa-plus"`
	Delete CloudSecretsDeleteCmd `command:"delete" subcommands-optional:"true" description:"Delete secret" webicon:"fas fa-trash"`
	Help   HelpCmd               `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudSecretsCmd) Execute

func (c *CloudSecretsCmd) Execute(args []string) error

type CloudSecretsCreateCmd

type CloudSecretsCreateCmd struct {
	Name        string  `short:"n" long:"name" description:"Secret name" webicon:"fas fa-plus"`
	Description string  `short:"d" long:"description" description:"Secret description" webicon:"fas fa-info"`
	Value       string  `short:"v" long:"value" description:"Secret value" telemetry:"redact"`
	Help        HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudSecretsCreateCmd) Execute

func (c *CloudSecretsCreateCmd) Execute(args []string) error

type CloudSecretsDeleteCmd

type CloudSecretsDeleteCmd struct {
	SecretID string  `short:"s" long:"secret-id" description:"Secret ID" webicon:"fas fa-trash"`
	Help     HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudSecretsDeleteCmd) Execute

func (c *CloudSecretsDeleteCmd) Execute(args []string) error

type CloudSecretsListCmd

type CloudSecretsListCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CloudSecretsListCmd) Execute

func (c *CloudSecretsListCmd) Execute(args []string) error

type Cluster

type Cluster struct {
	ID                string            `json:"id"`
	Name              string            `json:"name"`
	AerospikeCloud    AerospikeCloud    `json:"aerospikeCloud"`
	AerospikeServer   AerospikeServer   `json:"aerospikeServer"`
	ConnectionDetails ConnectionDetails `json:"connectionDetails"`
	Health            Health            `json:"health"`
	Infrastructure    Infrastructure    `json:"infrastructure"`
	Logging           ClusterLogging    `json:"logging"`
	CreatedAt         string            `json:"createdAt"`
	UpdatedAt         string            `json:"updatedAt"`
}

Cluster represents a single cluster entry

type ClusterAddAerolabCmd

type ClusterAddAerolabCmd struct {
	ClusterName     TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	CustomConf      flags.Filename  `short:"o" long:"custom-conf" description:"To deploy a custom ape.toml configuration file, specify it's path here"`
	AerolabVersion  string          `short:"v" long:"aerolab-version" description:"Aerolab version to install" default:"latest"`
	Prerelease      bool            `short:"r" long:"prerelease" description:"Install prerelease version"`
	ParallelThreads int             `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries      int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterAddAerolabCmd) AddAerolabCluster

func (c *ClusterAddAerolabCmd) AddAerolabCluster(system *System, inventory *backends.Inventory, args []string, stdin *io.ReadCloser, stdout *io.Writer, stderr *io.Writer, logger *logger.Logger) (output []*backends.ExecOutput, err error)

func (*ClusterAddAerolabCmd) Execute

func (c *ClusterAddAerolabCmd) Execute(args []string) error

type ClusterAddCmd

type ClusterAddCmd struct {
	Exporter ClusterAddExporterCmd `` /* 135-byte string literal not displayed */
	Firewall ClusterAddFirewallCmd `command:"firewall" subcommands-optional:"true" description:"Add firewall rules to an existing cluster" webicon:"fas fa-fire"`
	Expiry   ClusterAddExpiryCmd   `` /* 148-byte string literal not displayed */
	AeroLab  ClusterAddAerolabCmd  `command:"aerolab" subcommands-optional:"true" description:"Deploy aerolab binary on a cluster" webicon:"fas fa-flask"`
	PublicIP ClusterAddPublicIPCmd `` /* 126-byte string literal not displayed */
	Help     HelpCmd               `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterAddCmd) Execute

func (c *ClusterAddCmd) Execute(args []string) error

type ClusterAddExpiryCmd

type ClusterAddExpiryCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	ExpireIn    TypeExpiry      `short:"e" long:"expire-in" description:"Expiry in duration from now; Y/M/W/D/h/m/s, ex 1D12h 2W 1Y6M" default:"30h"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterAddExpiryCmd) AddExpiryCluster

func (c *ClusterAddExpiryCmd) AddExpiryCluster(system *System, inventory *backends.Inventory, args []string, logger *logger.Logger) (err error)

func (*ClusterAddExpiryCmd) Execute

func (c *ClusterAddExpiryCmd) Execute(args []string) error

type ClusterAddExporterCmd

type ClusterAddExporterCmd struct {
	ClusterName         TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes               TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	CustomConf          flags.Filename  `short:"o" long:"custom-conf" description:"To deploy a custom ape.toml configuration file, specify it's path here"`
	ExporterVersion     string          `short:"v" long:"exporter-version" description:"Exporter version to install" default:"latest"`
	NodeExporterVersion string          `long:"node-exporter-version" description:"Node exporter version to install (e.g., 1.5.0)" default:"latest"`
	ParallelThreads     int             `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries          int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep          time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help                HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterAddExporterCmd) AddExporterCluster

func (c *ClusterAddExporterCmd) AddExporterCluster(system *System, inventory *backends.Inventory, args []string, stdin *io.ReadCloser, stdout *io.Writer, stderr *io.Writer, logger *logger.Logger) (output []*backends.ExecOutput, err error)

func (*ClusterAddExporterCmd) Execute

func (c *ClusterAddExporterCmd) Execute(args []string) error

type ClusterAddFirewallCmd

type ClusterAddFirewallCmd struct {
	ClusterName  TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes        TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	CustomConf   flags.Filename  `short:"o" long:"custom-conf" description:"To deploy a custom ape.toml configuration file, specify it's path here"`
	FirewallName string          `short:"f" long:"firewall" description:"Firewall name to assign to the nodes"`
	Help         HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterAddFirewallCmd) AddFirewallCluster

func (c *ClusterAddFirewallCmd) AddFirewallCluster(system *System, inventory *backends.Inventory, args []string, logger *logger.Logger) (err error)

func (*ClusterAddFirewallCmd) Execute

func (c *ClusterAddFirewallCmd) Execute(args []string) error

type ClusterAddPublicIPCmd

type ClusterAddPublicIPCmd struct {
	ClusterName     TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	ParallelThreads int             `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries      int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterAddPublicIPCmd) AddPublicIPCluster

func (c *ClusterAddPublicIPCmd) AddPublicIPCluster(system *System, inventory *backends.Inventory, args []string, stdin *io.ReadCloser, stdout *io.Writer, stderr *io.Writer, logger *logger.Logger) (output []*backends.ExecOutput, err error)

func (*ClusterAddPublicIPCmd) Execute

func (c *ClusterAddPublicIPCmd) Execute(args []string) error

type ClusterApplyCmd

type ClusterApplyCmd struct {
	ClusterName             TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Count                   int             `short:"c" long:"count" description:"Desired number of nodes in the cluster" default:"1"`
	CustomConfigFilePath    flags.Filename  `short:"o" long:"custom-conf" description:"Custom aerospike config file path to install"`
	CustomToolsFilePath     flags.Filename  `short:"z" long:"tools-conf" description:"Custom astools config file path to install"`
	FeaturesFilePath        flags.Filename  `short:"f" long:"feature-file" description:"Features file to install, or directory containing feature files"`
	FeaturesFilePrintDetail bool            `long:"feature-file-print-detail" description:"Print details of discovered features files" hidden:"true"`
	HeartbeatMode           TypeHBMode      `` /* 153-byte string literal not displayed */
	MulticastAddress        string          `long:"mcast-address" description:"Multicast address to change to in config file" simplemode:"false"`
	MulticastPort           string          `long:"mcast-port" description:"Multicast port to change to in config file" simplemode:"false"`

	AutoStartAerospike    TypeYesNo              `short:"s" long:"start" description:"Auto-start aerospike after creation of cluster (y/n)" default:"y" webchoice:"y,n"`
	NoOverrideClusterName bool                   `` /* 155-byte string literal not displayed */
	NoSetDNS              bool                   `long:"no-set-dns" description:"set to prevent aerolab from updating resolved to use 1.1.1.1/8.8.8.8 DNS"`
	ScriptEarly           flags.Filename         `` /* 150-byte string literal not displayed */
	ScriptLate            flags.Filename         `` /* 147-byte string literal not displayed */
	ParallelThreads       int                    `short:"p" long:"threads" description:"number of threads to use for parallel operations" default:"10" simplemode:"false"`
	NoVacuumOnFail        bool                   `` /* 133-byte string literal not displayed */
	Owner                 string                 `long:"owner" description:"AWS/GCP only: create owner tag with this value" simplemode:"false"`
	Tags                  []string               `` /* 132-byte string literal not displayed */
	PriceOnly             bool                   `long:"price" description:"Only display price of ownership; do not actually create the cluster" simplemode:"false"`
	Force                 bool                   `short:"F" long:"force" description:"Force destroy when shrinking"`
	DryRun                bool                   `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	Aws                   ClusterCreateCmdAws    `group:"AWS" namespace:"aws" description:"backend-aws"`
	Gcp                   ClusterCreateCmdGcp    `group:"GCP" namespace:"gcp" description:"backend-gcp"`
	Docker                ClusterCreateCmdDocker `group:"Docker" namespace:"docker" description:"backend-docker"`
	// Retry configuration
	MaxRetries         int           `` /* 134-byte string literal not displayed */
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between transient retries" default:"30s" simplemode:"false"`
	CapacityRetries    int           `long:"capacity-retries" description:"Maximum retries for capacity errors (AWS/GCP only)" default:"0" simplemode:"false"`
	CapacityRetrySleep time.Duration `long:"capacity-retry-sleep" description:"Sleep duration between capacity retries" default:"60s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*ClusterApplyCmd) ApplyCluster

func (c *ClusterApplyCmd) ApplyCluster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

ApplyCluster applies the desired cluster size by creating, growing, or shrinking the cluster as needed. This function performs the following operations: 1. Determines the current cluster size 2. Compares with desired size to determine action (create/grow/shrink/noop) 3. Calls the appropriate cluster command (create/grow/destroy) 4. Outputs the node numbers that were created or destroyed

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • backends.InstanceList: List of instances that were processed
  • error: nil on success, or an error describing what failed

func (*ClusterApplyCmd) Execute

func (c *ClusterApplyCmd) Execute(args []string) error

type ClusterCmd

type ClusterCmd struct {
	Create          ClusterCreateCmd            `` /* 127-byte string literal not displayed */
	Grow            ClusterGrowCmd              `command:"grow" subcommands-optional:"true" description:"Add nodes to cluster" webicon:"fas fa-circle-plus" invwebforce:"true"`
	Apply           ClusterApplyCmd             `command:"apply" subcommands-optional:"true" description:"Apply a cluster size (grow/shrink/create)" webicon:"fas fa-gear"`
	List            ClusterListCmd              `command:"list" subcommands-optional:"true" description:"List clusters" webicon:"fas fa-list"`
	Start           ClusterStartCmd             `command:"start" subcommands-optional:"true" description:"Start cluster" webicon:"fas fa-play" invwebforce:"true"`
	Stop            ClusterStopCmd              `command:"stop" subcommands-optional:"true" description:"Stop cluster" webicon:"fas fa-stop" invwebforce:"true"`
	Destroy         ClusterDestroyCmd           `command:"destroy" subcommands-optional:"true" description:"Destroy cluster" webicon:"fas fa-trash" invwebforce:"true"`
	Add             ClusterAddCmd               `command:"add" subcommands-optional:"true" description:"Add features to clusters, ex: ams" webicon:"fas fa-gear"`
	Partition       ClusterPartitionCmd         `command:"partition" subcommands-optional:"true" description:"node disk partitioner" webicon:"fas fa-divide"`
	Attach          AttachShellCmd              `` /* 128-byte string literal not displayed */
	Share           ClusterShareCmd             `` /* 151-byte string literal not displayed */
	UpdateHostsFile InstancesUpdateHostsFileCmd `` /* 134-byte string literal not displayed */
	Help            HelpCmd                     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterCmd) Execute

func (c *ClusterCmd) Execute(args []string) error

type ClusterCreateCmd

type ClusterCreateCmd struct {
	ClusterName             TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	NodeCount               int             `short:"c" long:"count" description:"Number of nodes" default:"1"`
	CustomConfigFilePath    flags.Filename  `short:"o" long:"custom-conf" description:"Custom aerospike config file path to install"`
	CustomToolsFilePath     flags.Filename  `short:"z" long:"tools-conf" description:"Custom astools config file path to install"`
	FeaturesFilePath        flags.Filename  `short:"f" long:"feature-file" description:"Features file to install, or directory containing feature files"`
	FeaturesFilePrintDetail bool            `long:"feature-file-print-detail" description:"Print details of discovered features files" hidden:"true"`
	HeartbeatMode           TypeHBMode      `` /* 153-byte string literal not displayed */
	MulticastAddress        string          `long:"mcast-address" description:"Multicast address to change to in config file" simplemode:"false"`
	MulticastPort           string          `long:"mcast-port" description:"Multicast port to change to in config file" simplemode:"false"`

	AutoStartAerospike    TypeYesNo              `short:"s" long:"start" description:"Auto-start aerospike after creation of cluster (y/n)" default:"y" webchoice:"y,n"`
	NoOverrideClusterName bool                   `` /* 155-byte string literal not displayed */
	NoSetDNS              bool                   `long:"no-set-dns" description:"set to prevent aerolab from updating resolved to use 1.1.1.1/8.8.8.8 DNS"`
	ScriptEarly           flags.Filename         `` /* 150-byte string literal not displayed */
	ScriptLate            flags.Filename         `` /* 147-byte string literal not displayed */
	ParallelThreads       int                    `short:"p" long:"threads" description:"number of threads to use for parallel operations" default:"10" simplemode:"false"`
	NoVacuumOnFail        bool                   `` /* 133-byte string literal not displayed */
	Owner                 string                 `long:"owner" description:"AWS/GCP only: create owner tag with this value" simplemode:"false"`
	Tags                  []string               `` /* 132-byte string literal not displayed */
	PriceOnly             bool                   `long:"price" description:"Only display price of ownership; do not actually create the cluster" simplemode:"false"`
	Aws                   ClusterCreateCmdAws    `group:"AWS" namespace:"aws" description:"backend-aws"`
	Gcp                   ClusterCreateCmdGcp    `group:"GCP" namespace:"gcp" description:"backend-gcp"`
	Docker                ClusterCreateCmdDocker `group:"Docker" namespace:"docker" description:"backend-docker"`
	// Retry configuration
	MaxRetries         int           `` /* 134-byte string literal not displayed */
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between transient retries" default:"30s" simplemode:"false"`
	CapacityRetries    int           `long:"capacity-retries" description:"Maximum retries for capacity errors (AWS/GCP only)" default:"0" simplemode:"false"`
	CapacityRetrySleep time.Duration `long:"capacity-retry-sleep" description:"Sleep duration between capacity retries" default:"60s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*ClusterCreateCmd) CreateCluster

func (c *ClusterCreateCmd) CreateCluster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

func (*ClusterCreateCmd) Execute

func (c *ClusterCreateCmd) Execute(args []string) error

func (*ClusterCreateCmd) FeaturesFilePathResolve

func (c *ClusterCreateCmd) FeaturesFilePathResolve(system *System, inventory *backends.Inventory, logger *logger.Logger) (string, error)

func (*ClusterCreateCmd) SanityChecks

func (c *ClusterCreateCmd) SanityChecks(system *System, inventory *backends.Inventory, logger *logger.Logger, action string) error

type ClusterCreateCmdAws

type ClusterCreateCmdAws struct {
	AMI                 string          `` /* 172-byte string literal not displayed */
	InstanceType        guiInstanceType `long:"instance" description:"instance type to use" default:"" webrequired:"true" webchoice:"method::List"`
	Disk                []string        `` /* 317-byte string literal not displayed */
	SubnetID            string          `` /* 156-byte string literal not displayed */
	PublicIP            bool            `` /* 171-byte string literal not displayed */
	NoBestPractices     bool            `long:"no-best-practices" description:"set to stop best practices from being executed in setup" simplemode:"false"`
	SecGroupName        []string        `` /* 135-byte string literal not displayed */
	EFSMount            string          `long:"efs-mount" description:"mount EFS volume; format: NAME:MountPath to mount the EFS root" simplemode:"false"`
	EFSCreate           bool            `long:"efs-create" description:"set to create the EFS volume if it doesn't exist" simplemode:"false"`
	EFSOneZone          bool            `` /* 163-byte string literal not displayed */
	EFSFips             bool            `long:"efs-fips" description:"enable FIPS mode for the EFS mount" simplemode:"false"`
	TerminateOnPoweroff bool            `` /* 167-byte string literal not displayed */
	SpotInstance        bool            `long:"spot" description:"set to request a spot instance in place of on-demand"`
	Expires             TypeExpiry      `` /* 166-byte string literal not displayed */
	EFSExpires          TypeExpiry      `` /* 132-byte string literal not displayed */
	IAMInstanceProfile  string          `long:"instance-profile" description:"IAM instance profile to use for the instances"`
	InstanceDNS         InstanceDNS     `group:"Automated AWS Route53 DNS" namespace:"dns" description:"backend-aws"`
}

type ClusterCreateCmdDocker

type ClusterCreateCmdDocker struct {
	ExposePortsToHost string   `` /* 145-byte string literal not displayed */
	NoAutoExpose      bool     `` /* 234-byte string literal not displayed */
	CpuLimit          string   `` /* 136-byte string literal not displayed */
	RamLimit          string   `long:"ram-limit" description:"Limit RAM available to each node, e.g. 500m, or 1g." default:"" simplemode:"false"`
	SwapLimit         string   `` /* 183-byte string literal not displayed */
	NoFILELimit       int      `` /* 192-byte string literal not displayed */
	NoPatchV7Config   bool     `` /* 233-byte string literal not displayed */
	Privileged        bool     `long:"privileged" description:"Docker only: run container in privileged mode"`
	NetworkName       string   `` /* 166-byte string literal not displayed */
	ClientType        string   `hidden:"true" description:"specify client type on a cluster, valid for AGI" default:""`
	Disks             []string `` /* 244-byte string literal not displayed */
	TemplateSource    string   `` /* 259-byte string literal not displayed */
}

type ClusterCreateCmdGcp

type ClusterCreateCmdGcp struct {
	Image               string          `` /* 130-byte string literal not displayed */
	InstanceType        guiInstanceType `long:"instance" description:"instance type to use" default:"" webrequired:"true" webchoice:"method::List"`
	Disk                []string        `` /* 371-byte string literal not displayed */
	PublicIP            bool            `` /* 171-byte string literal not displayed */
	Zone                guiZone         `long:"zone" description:"zone name to deploy to" webrequired:"true" webchoice:"method::List"`
	VPC                 guiVpc          `long:"vpc" description:"VPC network name to use; empty=default VPC" webchoice:"method::List"`
	Subnet              string          `` /* 139-byte string literal not displayed */
	NoBestPractices     bool            `long:"no-best-practices" description:"set to stop best practices from being executed in setup" simplemode:"false"`
	FirewallName        []string        `` /* 129-byte string literal not displayed */
	SpotInstance        bool            `long:"spot" description:"set to request a spot instance in place of on-demand"`
	Expires             TypeExpiry      `` /* 166-byte string literal not displayed */
	VolMount            string          `long:"vol-mount" description:"mount an extra volume; format: NAME:MountPath" simplemode:"false"`
	VolCreate           bool            `long:"vol-create" description:"set to create the volume if it doesn't exist" simplemode:"false"`
	VolFips             bool            `long:"vol-fips" description:"enable FIPS mode for the volume mount" simplemode:"false"`
	VolExpires          TypeExpiry      `` /* 139-byte string literal not displayed */
	VolDescription      string          `long:"vol-description" description:"set volume description field value" simplemode:"false"`
	VolLabels           []string        `` /* 151-byte string literal not displayed */
	VolSize             int             `long:"vol-size" description:"set volume size in GB" simplemode:"false"`
	TerminateOnPoweroff bool            `` /* 167-byte string literal not displayed */
	OnHostMaintenance   string          `` /* 194-byte string literal not displayed */
	MinCPUPlatform      string          `` /* 144-byte string literal not displayed */
	GVNIC               bool            `` /* 167-byte string literal not displayed */
	IAMInstanceProfile  string          `long:"instance-profile" description:"IAM instance profile to use for the instances"`
	InstanceDNS         InstanceDNS     `group:"Automated GCP DNS" namespace:"dns" description:"backend-gcp"`
}

type ClusterDestroyCmd

type ClusterDestroyCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Force       bool            `short:"f" long:"force" description:"Force destroy"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterDestroyCmd) DestroyCluster

func (c *ClusterDestroyCmd) DestroyCluster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

func (*ClusterDestroyCmd) Execute

func (c *ClusterDestroyCmd) Execute(args []string) error

type ClusterGrowCmd

type ClusterGrowCmd struct {
	ClusterCreateCmd
}

func (*ClusterGrowCmd) Execute

func (c *ClusterGrowCmd) Execute(args []string) error

type ClusterListCmd

type ClusterListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Owner      string   `short:"O" long:"owner" description:"Filter by owner of the cluster"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterListCmd) Execute

func (c *ClusterListCmd) Execute(args []string) error

func (*ClusterListCmd) ListClusters

func (c *ClusterListCmd) ListClusters(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

type ClusterLogging

type ClusterLogging struct {
	LogBucket       string   `json:"logBucket"`
	AuthorizedRoles []string `json:"authorizedRoles"`
}

ClusterLogging represents the logging configuration for a cluster

type ClusterPartitionCmd

type ClusterPartitionCmd struct {
	Create ClusterPartitionCreateCmd `` /* 138-byte string literal not displayed */
	Mkfs   ClusterPartitionMkfsCmd   `` /* 141-byte string literal not displayed */
	Conf   ClusterPartitionConfCmd   `` /* 150-byte string literal not displayed */
	List   ClusterPartitionListCmd   `command:"list" subcommands-optional:"true" description:"List disks and partitions" webicon:"fas fa-list"`
	Help   HelpCmd                   `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterPartitionCmd) Execute

func (c *ClusterPartitionCmd) Execute(args []string) error

type ClusterPartitionConfCmd

type ClusterPartitionConfCmd struct {
	ClusterName        TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes              TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	FilterDisks        TypeFilterRange `short:"d" long:"filter-disks" description:"Select disks by number, ex: 1,2,4-8" default:"ALL"`
	FilterPartitions   TypeFilterRange `` /* 142-byte string literal not displayed */
	FilterType         string          `short:"t" long:"filter-type" description:"what disk types to select, options: nvme/local or ebs/persistent" default:"ALL"`
	Namespace          string          `short:"m" long:"namespace" description:"namespace to modify the settings for" default:""`
	ConfDest           string          `` /* 136-byte string literal not displayed */
	MountsSizeLimitPct float64         `` /* 184-byte string literal not displayed */
	ConfigPath         string          `` /* 150-byte string literal not displayed */
	ParallelThreads    int             `long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries         int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep         time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help               HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterPartitionConfCmd) Execute

func (c *ClusterPartitionConfCmd) Execute(args []string) error

func (*ClusterPartitionConfCmd) PartitionConfCluster

func (c *ClusterPartitionConfCmd) PartitionConfCluster(system *System, inventory *backends.Inventory, args []string, stdin *io.ReadCloser, stdout *io.Writer, stderr *io.Writer, logger *logger.Logger) (output []*backends.ExecOutput, err error)

type ClusterPartitionCreateCmd

type ClusterPartitionCreateCmd struct {
	ClusterName     TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	FilterDisks     TypeFilterRange `short:"d" long:"filter-disks" description:"Select disks by number, ex: 1,2,4-8" default:"ALL"`
	FilterType      string          `short:"t" long:"filter-type" description:"what disk types to select, options: nvme/local or ebs/persistent" default:"ALL"`
	Partitions      string          `` /* 151-byte string literal not displayed */
	NoBlkdiscard    bool            `short:"b" long:"no-blkdiscard" description:"set to prevent aerolab from running blkdiscard on the disks and partitions"`
	ParallelThreads int             `long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries      int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterPartitionCreateCmd) Execute

func (c *ClusterPartitionCreateCmd) Execute(args []string) error

func (*ClusterPartitionCreateCmd) PartitionCreateCluster

func (c *ClusterPartitionCreateCmd) PartitionCreateCluster(system *System, inventory *backends.Inventory, args []string, stdin *io.ReadCloser, stdout *io.Writer, stderr *io.Writer, logger *logger.Logger) (output []*backends.ExecOutput, err error)

type ClusterPartitionListCmd

type ClusterPartitionListCmd struct {
	ClusterName      TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes            TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	FilterDisks      TypeFilterRange `short:"d" long:"filter-disks" description:"Select disks by number, ex: 1,2,4-8" default:"ALL"`
	FilterPartitions TypeFilterRange `` /* 152-byte string literal not displayed */
	FilterType       string          `short:"t" long:"filter-type" description:"what disk types to select, options: nvme/local or ebs/persistent" default:"ALL"`
	ParallelThreads  int             `long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	Output           string          `long:"output" description:"Output format (text, table, json, json-indent, jq, csv, tsv, html, markdown)" default:"table"`
	TableTheme       string          `long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy           []string        `long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager            bool            `long:"pager" description:"Use a pager to display the output"`
	Help             HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterPartitionListCmd) Execute

func (c *ClusterPartitionListCmd) Execute(args []string) error

func (*ClusterPartitionListCmd) PartitionListCluster

func (c *ClusterPartitionListCmd) PartitionListCluster(system *System, inventory *backends.Inventory, args []string, logger *logger.Logger) error

func (*ClusterPartitionListCmd) PartitionListClusterDo

func (c *ClusterPartitionListCmd) PartitionListClusterDo(system *System, inventory *backends.Inventory, args []string, logger *logger.Logger) (output PartitionList, err error)

type ClusterPartitionMkfsCmd

type ClusterPartitionMkfsCmd struct {
	ClusterName      TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes            TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	FilterDisks      TypeFilterRange `short:"d" long:"filter-disks" description:"Select disks by number, ex: 1,2,4-8" default:"ALL"`
	FilterPartitions TypeFilterRange `short:"p" long:"filter-partitions" description:"Select partitions on each disk by number, ex: 1,2,4-8" default:"ALL"`
	FilterType       string          `short:"t" long:"filter-type" description:"what disk types to select, options: nvme/local or ebs/persistent" default:"ALL"`
	FsType           string          `short:"f" long:"fs-type" description:"type of filesystem, ex: xfs" default:"xfs"`
	MkfsOpts         string          `short:"s" long:"fs-options" description:"filesystem mkfs options" default:""`
	MountRoot        string          `short:"r" long:"mount-root" description:"path to where all the mounts will be created" default:"/mnt/"`
	MountOpts        string          `short:"o" long:"mount-options" description:"additional mount options to pass, ex: noatime,noexec" default:""`
	ParallelThreads  int             `long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries       int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep       time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help             HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterPartitionMkfsCmd) Execute

func (c *ClusterPartitionMkfsCmd) Execute(args []string) error

func (*ClusterPartitionMkfsCmd) PartitionMkfsCluster

func (c *ClusterPartitionMkfsCmd) PartitionMkfsCluster(system *System, inventory *backends.Inventory, args []string, stdin *io.ReadCloser, stdout *io.Writer, stderr *io.Writer, logger *logger.Logger) (output []*backends.ExecOutput, err error)

type ClusterResponse

type ClusterResponse struct {
	Count    int       `json:"count"`
	Clusters []Cluster `json:"clusters"`
}

ClusterResponse represents the API response structure

type ClusterShareCmd

type ClusterShareCmd struct {
	ClusterName     TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes           TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	ParallelThreads int             `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	ConnectTimeout  time.Duration   `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	KeyFile         flags.Filename  `short:"f" long:"pubkey" description:"Path to a pubkey to import to cluster nodes"`
	MaxRetries      int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterShareCmd) Execute

func (c *ClusterShareCmd) Execute(args []string) error

func (*ClusterShareCmd) ShareCluster

func (c *ClusterShareCmd) ShareCluster(system *System, inventory *backends.Inventory, args []string) error

type ClusterStartCmd

type ClusterStartCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	NoFixMesh   bool            `short:"f" long:"no-fix-mesh" description:"Set to avoid running conf-fix-mesh" simplemode:"false"`
	NoStart     bool            `short:"s" long:"no-start" description:"Set to prevent Aerospike from starting on cluster-start"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"5" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterStartCmd) Execute

func (c *ClusterStartCmd) Execute(args []string) error

func (*ClusterStartCmd) FilterForCluster

func (c *ClusterStartCmd) FilterForCluster(cluster backends.Instances, logger *logger.Logger) (backends.Instances, error)

func (*ClusterStartCmd) StartCluster

func (c *ClusterStartCmd) StartCluster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type ClusterStopCmd

type ClusterStopCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Force       bool            `short:"f" long:"force" description:"Force stop the cluster"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ClusterStopCmd) Execute

func (c *ClusterStopCmd) Execute(args []string) error

func (*ClusterStopCmd) StopCluster

func (c *ClusterStopCmd) StopCluster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type ClusterWithVPCStatus

type ClusterWithVPCStatus struct {
	Cluster
	VPCPeering *VPCPeeringStatusResponse `json:"vpcPeering,omitempty"`
}

ClusterWithVPCStatus extends Cluster with VPC peering status

type CommandInfo

type CommandInfo struct {
	Name        string          `json:"name"`
	DisplayName string          `json:"displayName,omitempty"`
	Path        string          `json:"path"`
	Description string          `json:"description"`
	Icon        string          `json:"icon,omitempty"`
	Hidden      bool            `json:"hidden,omitempty"`
	WebHidden   bool            `json:"webHidden,omitempty"`
	SimpleMode  bool            `json:"simpleMode"`
	HasChildren bool            `json:"hasChildren"`
	InvWebForce bool            `json:"invWebForce,omitempty"`
	Children    []*CommandInfo  `json:"children,omitempty"`
	Parameters  []ParameterInfo `json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

CommandInfo holds metadata about a command for the REST API

func BuildCommandTree

func BuildCommandTree(opts *Commands) *CommandInfo

BuildCommandTree builds the command tree from the Commands struct using reflection

func (*CommandInfo) FindByPath

func (c *CommandInfo) FindByPath(path string) *CommandInfo

FindByPath finds a command by its path (e.g., "cluster/create")

type Commands

type Commands struct {
	Config       ConfigCmd       `command:"config" subcommands-optional:"true" description:"Show or change aerolab configuration" webicon:"fas fa-toolbox"`
	Cloud        CloudCmd        `command:"cloud" subcommands-optional:"true" description:"Aerospike Cloud" webicon:"fa-brands fa-warehouse"`
	Cluster      ClusterCmd      `` /* 132-byte string literal not displayed */
	Aerospike    AerospikeCmd    `command:"aerospike" subcommands-optional:"true" description:"Aerospike daemon controls" webicon:"fas fa-a"`
	Client       ClientCmd       `command:"client" subcommands-optional:"true" description:"Create and manage Client machine groups" webicon:"fas fa-tv"`
	Inventory    InventoryCmd    `` /* 140-byte string literal not displayed */
	Instances    InstancesCmd    `` /* 154-byte string literal not displayed */
	Attach       AttachCmd       `` /* 134-byte string literal not displayed */
	Net          NetCmd          `command:"net" subcommands-optional:"true" description:"Firewall and latency simulation" webicon:"fas fa-network-wired"`
	Conf         ConfCmd         `` /* 128-byte string literal not displayed */
	Tls          TlsCmd          `command:"tls" subcommands-optional:"true" description:"Create or copy TLS certificates" webicon:"fas fa-lock"`
	Data         DataCmd         `command:"data" subcommands-optional:"true" description:"Insert/delete Aerospike data" webicon:"fas fa-folder-open"`
	Xdr          XdrCmd          `command:"xdr" subcommands-optional:"true" description:"Manage clusters' xdr configuration" webicon:"fas fa-object-group"`
	Images       ImagesCmd       `command:"images" subcommands-optional:"true" description:"Manage or delete images" webicon:"fas fa-file-image"`
	Template     TemplateCmd     `` /* 132-byte string literal not displayed */
	Installer    InstallerCmd    `` /* 129-byte string literal not displayed */
	Logs         LogsCmd         `command:"logs" subcommands-optional:"true" description:"show or download logs" webicon:"fas fa-bars-progress"`
	Files        FilesCmd        `command:"files" subcommands-optional:"true" description:"Upload/Download files to/from instances" webicon:"fas fa-file"`
	Roster       RosterCmd       `command:"roster" subcommands-optional:"true" description:"Show or apply strong-consistency rosters" webicon:"fas fa-sliders"`
	Completion   CompletionCmd   `` /* 149-byte string literal not displayed */
	AGI          AgiCmd          `` /* 130-byte string literal not displayed */
	Volumes      VolumesCmd      `` /* 150-byte string literal not displayed */
	ShowCommands ShowcommandsCmd `` /* 156-byte string literal not displayed */
	WebUI        WebUICmd        `` /* 128-byte string literal not displayed */
	Version      VersionCmd      `command:"version" subcommands-optional:"true" description:"Print AeroLab version" webicon:"fas fa-code-branch"`
	Upgrade      UpgradeCmd      `command:"upgrade" subcommands-optional:"true" description:"Upgrade AeroLab binary" webicon:"fas fa-circle-up"`
	Mcp          McpCmd          `` /* 186-byte string literal not displayed */
	//WebRun       webRunCmd       `command:"webrun" subcommands-optional:"true" description:"Upgrade AeroLab binary" hidden:"true"`
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

type CompletionBashCmd

type CompletionBashCmd struct {
	NoInstall  bool           `short:"n" long:"no-install" description:"Print the completion script to screen instead of installing it in .bashrc"`
	CustomPath flags.Filename `short:"c" long:"custom-path" description:"Install the script in a custom location"`
	Simple     bool           `` /* 135-byte string literal not displayed */
	Help       HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CompletionBashCmd) Execute

func (c *CompletionBashCmd) Execute(args []string) error

type CompletionCmd

type CompletionCmd struct {
	Bash CompletionBashCmd `command:"bash" subcommands-optional:"true" description:"Install completion script for bash" webicon:"fas fa-tent"`
	Zsh  CompletionZshCmd  `command:"zsh" subcommands-optional:"true" description:"Install completion script for zsh" webicon:"fas fa-tents"`
	Help HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CompletionCmd) Execute

func (c *CompletionCmd) Execute(args []string) error

type CompletionZshCmd

type CompletionZshCmd struct {
	NoInstall  bool           `short:"n" long:"no-install" description:"Print the completion script to screen instead of installing it in .zshrc"`
	CustomPath flags.Filename `short:"c" long:"custom-path" description:"Install the script in a custom location"`
	Simple     bool           `` /* 135-byte string literal not displayed */
	Help       HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CompletionZshCmd) Execute

func (c *CompletionZshCmd) Execute(args []string) error

type ConfAdjustCmd

type ConfAdjustCmd struct {
	ClusterName     TypeClusterName   `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes         `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Path            string            `short:"p" long:"path" description:"Path to aerospike.conf on the remote nodes" default:"/etc/aerospike/aerospike.conf"`
	Command         string            `short:"c" long:"command" description:"command to run, get|set|create|delete" webchoice:"create,set,delete,get"`
	Key             string            `` /* 131-byte string literal not displayed */
	Values          []string          `short:"v" long:"value" description:"value to set a key to when using set option; can be specified multiple times"`
	ParallelThreads int               `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries      int               `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration     `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            ConfAdjustHelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfAdjustCmd) Adjust

func (c *ConfAdjustCmd) Adjust(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

func (*ConfAdjustCmd) Execute

func (c *ConfAdjustCmd) Execute(args []string) error

type ConfAdjustHelpCmd

type ConfAdjustHelpCmd struct{}

func (*ConfAdjustHelpCmd) Execute

func (c *ConfAdjustHelpCmd) Execute(args []string) error

type ConfCmd

type ConfCmd struct {
	Generator       ConfGeneratorCmd       `` /* 149-byte string literal not displayed */
	SC              ConfSCCmd              `` /* 162-byte string literal not displayed */
	FixMesh         ConfFixMeshCmd         `` /* 127-byte string literal not displayed */
	RackID          ConfRackIdCmd          `` /* 147-byte string literal not displayed */
	NamespaceMemory ConfNamespaceMemoryCmd `` /* 147-byte string literal not displayed */
	Adjust          ConfAdjustCmd          `` /* 133-byte string literal not displayed */
	Help            HelpCmd                `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfCmd) Execute

func (c *ConfCmd) Execute(args []string) error

type ConfFixMeshCmd

type ConfFixMeshCmd struct {
	ClusterName     TypeClusterName `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	ConfigPath      string          `` /* 150-byte string literal not displayed */
	ParallelThreads int             `short:"t" long:"threads" description:"number of threads to use for parallel execution" default:"10"`
	MaxRetries      int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help            HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfFixMeshCmd) Execute

func (c *ConfFixMeshCmd) Execute(args []string) error

func (*ConfFixMeshCmd) FixMesh

func (c *ConfFixMeshCmd) FixMesh(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

type ConfGeneratorCmd

type ConfGeneratorCmd struct {
	Path         flags.Filename `short:"f" long:"filename" description:"file name to read/write/generate" default:"aerospike.conf"`
	ConfVersion  string         `` /* 158-byte string literal not displayed */
	EnableColors bool           `short:"c" long:"colors" description:"set to operate in color mode"`
	Help         HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfGeneratorCmd) CreateConf

func (c *ConfGeneratorCmd) CreateConf(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

func (*ConfGeneratorCmd) Execute

func (c *ConfGeneratorCmd) Execute(args []string) error

type ConfNamespaceMemoryCmd

type ConfNamespaceMemoryCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Path        string          `short:"p" long:"path" description:"Path to aerospike.conf on the remote nodes" default:"/etc/aerospike/aerospike.conf"`
	Namespace   string          `short:"m" long:"namespace" description:"Name of the namespace to adjust" default:"test"`
	MemPct      int             `short:"r" long:"mem-pct" description:"The percentage of RAM to use for the namespace memory" default:"50"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfNamespaceMemoryCmd) AdjustNamespaceMemory

func (c *ConfNamespaceMemoryCmd) AdjustNamespaceMemory(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

AdjustNamespaceMemory adjusts the memory allocation for a namespace based on system RAM percentage. This function performs the following operations: 1. Gets system memory information from each node 2. Calculates the appropriate memory size based on the percentage 3. Detects Aerospike version to determine the correct configuration parameter 4. Modifies the aerospike.conf file with the new memory settings

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • backends.InstanceList: List of instances that were processed
  • error: nil on success, or an error describing what failed

func (*ConfNamespaceMemoryCmd) Execute

func (c *ConfNamespaceMemoryCmd) Execute(args []string) error

type ConfRackIdCmd

type ConfRackIdCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	RackId      string          `short:"i" long:"id" description:"Rack ID to use" default:"0"`
	Namespaces  string          `short:"m" long:"namespaces" description:"comma-separated list of namespaces to modify; empty=all" default:""`
	NoRoster    bool            `` /* 207-byte string literal not displayed */
	NoRestart   bool            `` /* 169-byte string literal not displayed */
	Path        string          `short:"p" long:"path" description:"Path to aerospike.conf" default:"/etc/aerospike/aerospike.conf"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfRackIdCmd) Execute

func (c *ConfRackIdCmd) Execute(args []string) error

func (*ConfRackIdCmd) SetRackId

func (c *ConfRackIdCmd) SetRackId(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

SetRackId sets the rack-id for specified namespaces in the cluster. This function performs the following operations: 1. Validates cluster exists and gets running instances 2. Processes each instance to set rack-id in specified namespaces 3. Identifies strong-consistency namespaces that need roster updates 4. Optionally restarts aerospike and applies roster for SC namespaces

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • backends.InstanceList: List of instances that were processed
  • error: nil on success, or an error describing what failed

type ConfSCCmd

type ConfSCCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Namespace   string          `short:"m" long:"namespace" description:"Namespace to change" default:"test"`
	Path        string          `short:"p" long:"path" description:"Path to aerospike.conf" default:"/etc/aerospike/aerospike.conf"`
	Force       bool            `short:"f" long:"force" description:"If set, will zero out the devices even if strong-consistency was already configured"`
	Racks       int             `` /* 139-byte string literal not displayed */
	WithDisks   bool            `` /* 144-byte string literal not displayed */
	Verbose     bool            `short:"v" long:"verbose" description:"Enable verbose logging"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfSCCmd) ConfigureStrongConsistency

func (c *ConfSCCmd) ConfigureStrongConsistency(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

ConfigureStrongConsistency configures the cluster to use strong-consistency with roster and optional RF changes. This function performs the following operations: 1. Stops aerospike on all nodes 2. Optionally partitions and configures disks if WithDisks is set 3. Patches aerospike.conf to enable strong consistency 4. Cold starts aerospike 5. Waits for cluster to be stable 6. Applies roster (if available)

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • backends.InstanceList: List of instances that were processed
  • error: nil on success, or an error describing what failed

func (*ConfSCCmd) Execute

func (c *ConfSCCmd) Execute(args []string) error

type ConfigAwsCmd

type ConfigAwsCmd struct {
	ListSecGroups    ListSecGroupsCmd    `` /* 139-byte string literal not displayed */
	CreateSecGroups  CreateSecGroupsCmd  `` /* 176-byte string literal not displayed */
	LockSecGroups    LockSecGroupsCmd    `` /* 198-byte string literal not displayed */
	DestroySecGroups DestroySecGroupsCmd `` /* 155-byte string literal not displayed */
	ListSubnets      ListSubnetsCmd      `` /* 133-byte string literal not displayed */
	ExpiryInstall    ExpiryInstallCmd    `` /* 182-byte string literal not displayed */
	ExpiryRemove     ExpiryRemoveCmd     `` /* 172-byte string literal not displayed */
	ExpiryCheckFreq  ExpiryCheckFreqCmd  `` /* 174-byte string literal not displayed */
	ExpiryList       ExpiryListCmd       `command:"expiry-list" subcommands-optional:"true" description:"list the expiry systems" webicon:"fas fa-list"`
	Help             HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigAwsCmd) Execute

func (c *ConfigAwsCmd) Execute(args []string) error

type ConfigBackendCmd

type ConfigBackendCmd struct {
	Type           string         `short:"t" long:"type" description:"Supported backends: aws|docker|gcp|none" default:"" webchoice:"aws,gcp,docker,none"`
	SshKeyPath     flags.Filename `` /* 131-byte string literal not displayed */
	Region         string         `short:"r" long:"region" description:"Specify a list of regions to enable, comma-separated" default:""`
	InventoryCache bool           `` /* 146-byte string literal not displayed */
	SkipPricing    bool           `` /* 315-byte string literal not displayed */

	SSHStrictHostKey bool `` /* 252-byte string literal not displayed */

	FirewallCidr       string `` /* 291-byte string literal not displayed */
	NoFirewallAutolock bool   `` /* 241-byte string literal not displayed */

	AWSProfile     string `long:"aws.profile" description:"AWS: provide a profile to use; setting this ignores the AWS_PROFILE env variable"`
	AWSNoPublicIps bool   `long:"aws.no-public-ip" description:"AWS: if set, aerolab will not request public IPs, and will operate on private IPs only"`

	Project               string `long:"gcp.project" description:"GCP: specify a GCP project to use" default:""`
	GCPAuthMethod         string `` /* 188-byte string literal not displayed */
	GCPNoBrowser          bool   `` /* 143-byte string literal not displayed */
	GCPClientID           string `long:"gcp.client-id" description:"GCP: specify a GCP client ID to use" hidden:"true"`
	GCPClientSecret       string `long:"gcp.client-secret" description:"GCP: specify a GCP client secret to use" hidden:"true" telemetry:"redact"`
	GCPNoPublicIps        bool   `long:"gcp.no-public-ip" description:"GCP: if set, aerolab will not request public IPs, and will operate on private IPs only"`
	GCPUseIAP             bool   `` /* 222-byte string literal not displayed */
	GCPAutoEnableServices bool   `` /* 271-byte string literal not displayed */

	Arch                 string         `` /* 142-byte string literal not displayed */
	DockerRegistryRegion string         `` /* 135-byte string literal not displayed */
	DockerRegistryURL    string         `` /* 197-byte string literal not displayed */
	TmpDir               flags.Filename `` /* 131-byte string literal not displayed */
	CheckAccess          bool           `long:"check-access" description:"check access to the backend"`

	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*ConfigBackendCmd) ExecTypeSet

func (c *ConfigBackendCmd) ExecTypeSet(system *System, args []string) error

func (*ConfigBackendCmd) Execute

func (c *ConfigBackendCmd) Execute(args []string) error

type ConfigCmd

type ConfigCmd struct {
	Backend  ConfigBackendCmd  `command:"backend" subcommands-optional:"true" description:"Show or change backend" webicon:"fas fa-vials"`
	Defaults ConfigDefaultsCmd `` /* 147-byte string literal not displayed */
	Aws      ConfigAwsCmd      `command:"aws" subcommands-optional:"true" description:"AWS-only related management commands" webicon:"fa-brands fa-aws"`
	Docker   ConfigDockerCmd   `` /* 128-byte string literal not displayed */
	Gcp      ConfigGcpCmd      `command:"gcp" subcommands-optional:"true" description:"GCP-only related management commands" webicon:"fa-brands fa-google"`
	EnvVars  ConfigEnvVarsCmd  `` /* 134-byte string literal not displayed */
	Migrate  ConfigMigrateCmd  `` /* 144-byte string literal not displayed */
	HostKeys ConfigHostKeysCmd `` /* 132-byte string literal not displayed */
	Help     HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigCmd) Execute

func (c *ConfigCmd) Execute(args []string) error

type ConfigDefaultsCmd

type ConfigDefaultsCmd struct {
	Key         string         `short:"k" long:"key" description:"Key to modify or show, character '*' expansion is supported" default:"" no-default:"true"`
	OnlyChanged bool           `short:"o" long:"only-changed" description:"Set to only display values different from application default" no-default:"true"`
	Value       flags.Filename `short:"v" long:"value" description:"Value to set" default:"" no-default:"true"`
	Reset       bool           `short:"r" long:"reset" description:"Reset to default value. Use instead of --value" no-default:"true"`
	Help        HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*ConfigDefaultsCmd) ConfigDefaults

func (c *ConfigDefaultsCmd) ConfigDefaults(system *System, args []string) error

func (*ConfigDefaultsCmd) Execute

func (c *ConfigDefaultsCmd) Execute(args []string) error

type ConfigDockerCmd

type ConfigDockerCmd struct {
	CreateNetwork CreateNetworkCmd `` /* 142-byte string literal not displayed */
	DeleteNetwork DeleteNetworkCmd `` /* 132-byte string literal not displayed */
	ListNetworks  ListNetworksCmd  `command:"list-networks" subcommands-optional:"true" description:"list docker networks" webicon:"fas fa-list"`
	PruneNetworks PruneNetworksCmd `` /* 141-byte string literal not displayed */
	Help          HelpCmd          `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigDockerCmd) Execute

func (c *ConfigDockerCmd) Execute(args []string) error

type ConfigEnvVarsCmd

type ConfigEnvVarsCmd struct {
	Output     string  `` /* 130-byte string literal not displayed */
	TableTheme string  `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	Pager      bool    `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigEnvVarsCmd) Execute

func (c *ConfigEnvVarsCmd) Execute(args []string) error

func (*ConfigEnvVarsCmd) PrintEnvVars

func (c *ConfigEnvVarsCmd) PrintEnvVars(system *System, out io.Writer, page *pager.Pager) error

type ConfigGcpCmd

type ConfigGcpCmd struct {
	Reauthenticate   ReauthenticateCmd  `command:"reauthenticate" subcommands-optional:"true" description:"reauthenticate with GCP" webicon:"fas fa-key"`
	EnableServices   EnableServicesCmd  `command:"enable-services" subcommands-optional:"true" hidden:"true" webhidden:"true" description:"not needed anymore"` // NOTE: obsolete, but kept for backwards compatibility
	ListSecGroups    ListFirewallCmd    ``                                                                                                                      /* 137-byte string literal not displayed */
	CreateSecGroups  CreateFirewallCmd  ``                                                                                                                      /* 159-byte string literal not displayed */
	LockSecGroups    LockFirewallCmd    ``                                                                                                                      /* 196-byte string literal not displayed */
	DestroySecGroups DestroyFirewallCmd ``                                                                                                                      /* 153-byte string literal not displayed */
	ExpiryInstall    ExpiryInstallCmd   ``                                                                                                                      /* 182-byte string literal not displayed */
	ExpiryRemove     ExpiryRemoveCmd    ``                                                                                                                      /* 172-byte string literal not displayed */
	ExpiryCheckFreq  ExpiryCheckFreqCmd ``                                                                                                                      /* 174-byte string literal not displayed */
	ExpiryList       ExpiryListCmd      `command:"expiry-list" subcommands-optional:"true" description:"list the expiry systems" webicon:"fas fa-list"`
	Help             HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigGcpCmd) Execute

func (c *ConfigGcpCmd) Execute(args []string) error

type ConfigHostKeysCmd

type ConfigHostKeysCmd struct {
	List   ConfigHostKeysListCmd   `command:"list" subcommands-optional:"true" description:"List remembered SSH host keys" webicon:"fas fa-list"`
	Forget ConfigHostKeysForgetCmd `` /* 139-byte string literal not displayed */
	Help   HelpCmd                 `command:"help" subcommands-optional:"true" description:"Print help"`
}

ConfigHostKeysCmd groups the commands that inspect and edit the local SSH host key store.

AeroLab learns each instance's SSH host key on first connect and verifies it on every later connection. A node rebuilt outside AeroLab presents a new key, which shows up as a warning (or, with 'config backend --ssh-strict-host-key', a refused connection) until the old entry is forgotten.

func (*ConfigHostKeysCmd) Execute

func (c *ConfigHostKeysCmd) Execute(args []string) error

type ConfigHostKeysForgetCmd

type ConfigHostKeysForgetCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated; forgets every node unless --nodes is given"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL"`
	All         bool            `long:"all" description:"Forget every remembered host key in this project"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigHostKeysForgetCmd) Execute

func (c *ConfigHostKeysForgetCmd) Execute(args []string) error

type ConfigHostKeysListCmd

type ConfigHostKeysListCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigHostKeysListCmd) Execute

func (c *ConfigHostKeysListCmd) Execute(args []string) error

type ConfigMigrateCmd

type ConfigMigrateCmd struct {
	OldDir           string  `short:"o" long:"old-dir" description:"Old AeroLab directory to migrate from"`
	NewDir           string  `short:"n" long:"new-dir" description:"New AeroLab directory to migrate to"`
	MigrateInventory bool    `short:"i" long:"migrate-inventory" description:"Migrate the inventory to the new AeroLab directory"`
	Force            bool    `short:"f" long:"force" description:"Do not ask for confirmation"`
	Help             HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ConfigMigrateCmd) Execute

func (c *ConfigMigrateCmd) Execute(args []string) error

func (*ConfigMigrateCmd) MigrateAerolabConfig

func (c *ConfigMigrateCmd) MigrateAerolabConfig(system *System, oldDir string, newDir string) error

type ConfigValueCmd

type ConfigValueCmd struct {
	Key   string
	Value string
}

type ConnectionDetails

type ConnectionDetails struct {
	Host string `json:"host"`
}

type CreateFirewallCmd

type CreateFirewallCmd struct {
	NamePrefix string   `short:"n" long:"name" description:"Name prefix to use for the firewall" default:"AeroLab"`
	IP         string   ``                                                                                                 /* 137-byte string literal not displayed */
	Ports      []string ``                                                                                                 /* 126-byte string literal not displayed */
	NoDefaults bool     `short:"d" long:"no-defaults" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
	VPC        string   `short:"v" long:"vpc" description:"vpc ID; default: use default VPC" default:""`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CreateFirewallCmd) Execute

func (c *CreateFirewallCmd) Execute(args []string) error

type CreateNetworkCmd

type CreateNetworkCmd struct {
	Name   string  `short:"n" long:"name" description:"network name to create" default:""`
	Driver string  `short:"d" long:"driver" description:"network driver" default:"bridge"`
	Subnet string  `short:"s" long:"subnet" description:"network subnet to create, ex. 172.18.0.0/24 or 172.18.1.0/24" default:"default"`
	MTU    string  `short:"m" long:"mtu" description:"MTU in the network" default:"default"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CreateNetworkCmd) CreateNetwork

func (c *CreateNetworkCmd) CreateNetwork(system *System, inventory *backends.Inventory, args []string) error

func (*CreateNetworkCmd) Execute

func (c *CreateNetworkCmd) Execute(args []string) error

type CreateSecGroupsCmd

type CreateSecGroupsCmd struct {
	NamePrefix string   `short:"n" long:"name" description:"Name prefix to use for the firewall" default:"AeroLab"`
	IP         string   ``                                                                                                 /* 137-byte string literal not displayed */
	Ports      []string ``                                                                                                 /* 126-byte string literal not displayed */
	NoDefaults bool     `short:"d" long:"no-defaults" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
	VPC        string   `short:"v" long:"vpc" description:"vpc ID; default: use default VPC" default:""`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*CreateSecGroupsCmd) Execute

func (c *CreateSecGroupsCmd) Execute(args []string) error

type CustomAMSDashboard

type CustomAMSDashboard struct {
	Destination string  `yaml:"destination"`
	FromFile    *string `yaml:"fromFile,omitempty"`
	FromUrl     *string `yaml:"fromUrl,omitempty"`
}

type DataCmd

type DataCmd struct {
	Insert DataInsertCmd `command:"insert" subcommands-optional:"true" description:"Insert data into an Aerospike cluster" webicon:"fas fa-circle-plus"`
	Delete DataDeleteCmd `command:"delete" subcommands-optional:"true" description:"Delete data inserted via AeroLab" webicon:"fas fa-circle-minus"`
	Help   HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*DataCmd) Execute

func (c *DataCmd) Execute(args []string) error

type DataDeleteCmd

type DataDeleteCmd struct {
	ClusterName      TypeClusterName   `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Node             TypeNode          `short:"l" long:"node" description:"Node to run on" default:"1"`
	SeedNode         string            `short:"g" long:"seed-node" description:"Seed node IP:PORT" default:"127.0.0.1:3000"`
	Namespace        string            `short:"m" long:"namespace" description:"Namespace name" default:"test"`
	Set              string            `short:"s" long:"set" description:"Set name" default:"myset"`
	PkPrefix         string            `short:"p" long:"pk-prefix" description:"Prefix to add to primary key" default:""`
	PkStartNumber    int               `short:"a" long:"pk-start-number" description:"The start ID of the unique PK names" default:"1"`
	PkEndNumber      int               `short:"z" long:"pk-end-number" description:"The end ID of the unique PK names" default:"1000"`
	Durable          bool              `short:"D" long:"durable-delete" description:"Use durable deletes"`
	RunDirect        bool              `short:"d" long:"run-direct" description:"If set, will run directly from current machine"`
	UseMultiThreaded int               `short:"u" long:"multi-thread" description:"Number of threads for processing" default:"0"`
	User             string            `short:"U" long:"username" description:"Aerospike username" default:""`
	Pass             string            `short:"P" long:"password" description:"Aerospike password" default:"" telemetry:"redact"`
	Version          TypeClientVersion `short:"v" long:"version" description:"Aerospike library version: 8" default:"8" webchoice:"8"`
	AuthExternal     bool              `short:"Q" long:"auth-external" description:"Use external auth method"`
	TlsCaCert        string            `short:"y" long:"tls-ca-cert" description:"TLS CA certificate path" default:""`
	TlsClientCert    string            `short:"w" long:"tls-client-cert" description:"TLS client certificate path" default:""`
	TlsServerName    string            `short:"i" long:"tls-server-name" description:"TLS ServerName" default:""`
	AerolabVersion   string            `long:"aerolab-version" description:"Aerolab version to install on remote node if not present" default:"latest"`
	Prerelease       bool              `long:"aerolab-prerelease" description:"Install prerelease version of aerolab"`
	RunJson          string            `long:"run-json" hidden:"true"`
	MaxRetries       int               `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep       time.Duration     `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help             HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*DataDeleteCmd) Execute

func (c *DataDeleteCmd) Execute(args []string) error

type DataInsertCmd

type DataInsertCmd struct {
	ClusterName           TypeClusterName   `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Node                  TypeNode          `short:"l" long:"node" description:"Node to run on to do inserts" default:"1"`
	SeedNode              string            `short:"g" long:"seed-node" description:"Seed node IP:PORT" default:"127.0.0.1:3000"`
	Namespace             string            `short:"m" long:"namespace" description:"Namespace name" default:"test"`
	Set                   string            `short:"s" long:"set" description:"Set name. Either 'name' or 'random:SIZE'" default:"myset"`
	PkPrefix              string            `short:"p" long:"pk-prefix" description:"Prefix to add to primary key" default:""`
	PkStartNumber         int               `short:"a" long:"pk-start-number" description:"The start ID of the unique PK names" default:"1"`
	PkEndNumber           int               `short:"z" long:"pk-end-number" description:"The end ID of the unique PK names" default:"1000"`
	Bin                   string            `` /* 126-byte string literal not displayed */
	BinContents           string            `` /* 138-byte string literal not displayed */
	ReadAfterWrite        bool              `short:"f" long:"read-after-write" description:"Should we read (get) after write"`
	TTL                   int               `short:"T" long:"ttl" description:"set ttl for records. Set to -1 to use server default, 0=don't expire" default:"-1"`
	InsertToNodes         string            `short:"N" long:"to-nodes" description:"insert to specific node(s); provide comma-separated node IDs" default:""`
	InsertToPartitions    int               `short:"C" long:"to-partitions" description:"insert to X number of partitions at most" default:"0"`
	InsertToPartitionList string            `short:"L" long:"to-partition-list" description:"comma-separated list of partition numbers" default:""`
	ExistsAction          TypeExistsAction  `` /* 130-byte string literal not displayed */
	RunDirect             bool              `short:"d" long:"run-direct" description:"If set, will run directly from current machine"`
	UseMultiThreaded      int               `short:"u" long:"multi-thread" description:"Number of threads for processing" default:"0"`
	User                  string            `short:"U" long:"username" description:"Aerospike username" default:""`
	Pass                  string            `short:"P" long:"password" description:"Aerospike password" default:"" telemetry:"redact"`
	Version               TypeClientVersion `short:"v" long:"version" description:"Aerospike library version: 8" default:"8" webchoice:"8"`
	AuthExternal          bool              `short:"Q" long:"auth-external" description:"Use external auth method"`
	TlsCaCert             string            `short:"y" long:"tls-ca-cert" description:"TLS CA certificate path" default:""`
	TlsClientCert         string            `short:"w" long:"tls-client-cert" description:"TLS client certificate path" default:""`
	TlsServerName         string            `short:"i" long:"tls-server-name" description:"TLS ServerName" default:""`
	AerolabVersion        string            `long:"aerolab-version" description:"Aerolab version to install on remote node if not present" default:"latest"`
	Prerelease            bool              `long:"aerolab-prerelease" description:"Install prerelease version of aerolab"`
	RunJson               string            `long:"run-json" hidden:"true"`
	MaxRetries            int               `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep            time.Duration     `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help                  HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*DataInsertCmd) Execute

func (c *DataInsertCmd) Execute(args []string) error

type DeleteNetworkCmd

type DeleteNetworkCmd struct {
	Name string  `short:"n" long:"name" description:"network name to delete" default:""`
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*DeleteNetworkCmd) DeleteNetwork

func (c *DeleteNetworkCmd) DeleteNetwork(system *System, inventory *backends.Inventory, args []string) error

func (*DeleteNetworkCmd) Execute

func (c *DeleteNetworkCmd) Execute(args []string) error

type DestroyFirewallCmd

type DestroyFirewallCmd struct {
	NamePrefix string  `short:"n" long:"name" description:"Name prefix to use for the firewall" default:"AeroLab"`
	All        bool    `short:"a" long:"all" description:"Remove all firewalls (ignores name parameter)"`
	VPC        string  `short:"v" long:"vpc" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
	Help       HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*DestroyFirewallCmd) Execute

func (c *DestroyFirewallCmd) Execute(args []string) error

type DestroySecGroupsCmd

type DestroySecGroupsCmd struct {
	NamePrefix string  `short:"n" long:"name" description:"Name prefix to use for the firewall" default:"AeroLab"`
	All        bool    `short:"a" long:"all" description:"Remove all firewalls (ignores name parameter)"`
	VPC        string  `short:"v" long:"vpc" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
	Help       HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*DestroySecGroupsCmd) Execute

func (c *DestroySecGroupsCmd) Execute(args []string) error

type EnableServicesCmd

type EnableServicesCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*EnableServicesCmd) Execute

func (c *EnableServicesCmd) Execute(args []string) error

type ExecuteError

type ExecuteError struct {
	Err    error
	Logger *logger.Logger
}

func (*ExecuteError) Error

func (e *ExecuteError) Error() string

func (*ExecuteError) Is

func (e *ExecuteError) Is(target error) bool

Is keeps errors.Is(err, ErrExecuteError) working as the marker for "this error has already been logged", independently of the wrapped error.

func (*ExecuteError) Unwrap

func (e *ExecuteError) Unwrap() error

Unwrap exposes the underlying failure so callers can inspect it with errors.As, which is how the exit code for things like cloud capacity failures is resolved.

type ExecuteResponse

type ExecuteResponse struct {
	Success          bool     `json:"success"`
	Path             string   `json:"path"`
	Error            string   `json:"error,omitempty"`
	Result           any      `json:"result,omitempty"`
	Logs             []string `json:"logs,omitempty"`
	RefreshInventory bool     `json:"refreshInventory,omitempty"`
}

ExecuteResponse is the JSON response for command execution

type ExecuteResult

type ExecuteResult struct {
	Result any
	Logs   []string
}

ExecuteResult holds the result of command execution

func ExecuteCommandByPath

func ExecuteCommandByPath(system *System, path string, params map[string]any) (*ExecuteResult, error)

ExecuteCommandByPath executes a command by its path with given parameters (synchronous)

type ExitCoder

type ExitCoder interface {
	error
	ExitCode() int
}

ExitCoder is implemented by errors that want the process to terminate with a specific exit code. Returning a plain error from a command is still fine and keeps the generic ExitCodeError; implementing this interface is how a command opts into a more specific one.

type ExpiryCheckFreqCmd

type ExpiryCheckFreqCmd struct {
	Frequency int     `short:"f" long:"frequency" description:"Scheduler frequency in minutes" default:"15"`
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ExpiryCheckFreqCmd) Execute

func (c *ExpiryCheckFreqCmd) Execute(args []string) error

func (*ExpiryCheckFreqCmd) ExpiryCheckFreq

func (c *ExpiryCheckFreqCmd) ExpiryCheckFreq(system *System, cmd []string, args []string, inventory *backends.Inventory) error

type ExpiryInstallCmd

type ExpiryInstallCmd struct {
	Frequency  int  `short:"f" long:"frequency" description:"Scheduler frequency in minutes" default:"15"`
	CleanupDNS bool `short:"c" long:"cleanup-dns" description:"Cleanup DNS records"`
	ExpireEks  bool `short:"e" long:"expire-eks" description:"Expire EKS clusters"`
	Force      bool `long:"force" description:"Force the installation even if latest expiry is already installed"`
	//Gcp        ExpiryInstallCmdGcp `group:"GCP Backend" description:"backend-gcp"`
	//Aws        ExpiryInstallCmdAws `group:"AWS Backend" description:"backend-aws"`
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ExpiryInstallCmd) Execute

func (c *ExpiryInstallCmd) Execute(args []string) error

func (*ExpiryInstallCmd) ExpiryInstall

func (c *ExpiryInstallCmd) ExpiryInstall(system *System, cmd []string, args []string, inventory *backends.Inventory) error

type ExpiryListCmd

type ExpiryListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ExpiryListCmd) Execute

func (c *ExpiryListCmd) Execute(args []string) error

func (*ExpiryListCmd) ExpiryList

func (c *ExpiryListCmd) ExpiryList(system *System, cmd []string, args []string, inventory *backends.Inventory, out io.Writer, page *pager.Pager) error

type ExpiryRemoveCmd

type ExpiryRemoveCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ExpiryRemoveCmd) Execute

func (c *ExpiryRemoveCmd) Execute(args []string) error

func (*ExpiryRemoveCmd) ExpiryRemove

func (c *ExpiryRemoveCmd) ExpiryRemove(system *System, cmd []string, args []string, inventory *backends.Inventory) error

type FilesCmd

type FilesCmd struct {
	Download FilesDownloadCmd `` /* 149-byte string literal not displayed */
	Upload   FilesUploadCmd   `command:"upload" alias:"u" subcommands-optional:"true" description:"Upload files to a node" webicon:"fas fa-upload"`
	Edit     FilesEditCmd     `` /* 140-byte string literal not displayed */
	Sync     FilesSyncCmd     `` /* 130-byte string literal not displayed */
	Help     HelpCmd          `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*FilesCmd) Execute

func (c *FilesCmd) Execute(args []string) error

type FilesDownloadCmd

type FilesDownloadCmd struct {
	ClusterName     TypeClusterName      `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes            `short:"l" long:"nodes" description:"Node number(s), comma-separated. Default=ALL" default:""`
	ParallelThreads int                  `short:"t" long:"threads" description:"Run on this many nodes in parallel" default:"10"`
	Progress        bool                 `short:"p" long:"progress" description:"Show download progress with TUI display"`
	MaxRetries      int                  `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration        `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Files           FilesRestDownloadCmd `positional-args:"true"`
	Help            HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*FilesDownloadCmd) Download

func (c *FilesDownloadCmd) Download(system *System, inventory *backends.Inventory, args []string) error

func (*FilesDownloadCmd) Execute

func (c *FilesDownloadCmd) Execute(args []string) error

type FilesEditCmd

type FilesEditCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Client group/Cluster name" default:"asd"`
	Node        TypeNode        `short:"l" long:"node" description:"Node number" default:"1"`
	Editor      string          `short:"e" long:"editor" description:"Editor command; must be present on the node" default:"vi"`
	Path        FilesSingleCmd  `positional-args:"true"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*FilesEditCmd) Edit

func (c *FilesEditCmd) Edit(system *System, inventory *backends.Inventory, args []string) error

func (*FilesEditCmd) Execute

func (c *FilesEditCmd) Execute(args []string) error

type FilesRestDownloadCmd

type FilesRestDownloadCmd struct {
	Source      string
	Destination flags.Filename `webtype:"download"`
}

type FilesRestUploadCmd

type FilesRestUploadCmd struct {
	Source      flags.Filename `webtype:"upload"`
	Destination string
}

type FilesSingleCmd

type FilesSingleCmd struct {
	Path flags.Filename
}

type FilesSyncCmd

type FilesSyncCmd struct {
	SourceCluster      TypeClusterName `short:"s" long:"source" description:"Source cluster name" default:"asd"`
	SourceNode         TypeNode        `short:"l" long:"source-node" description:"Source node number" default:"1"`
	DestinationCluster TypeClusterName `short:"d" long:"destination" description:"Destination cluster name" default:"asd"`
	DestinationNodes   TypeNodes       `short:"a" long:"destination-nodes" description:"Destination node numbers; default: all except source node" default:""`
	ParallelThreads    int             `short:"t" long:"threads" description:"Run on this many nodes in parallel" default:"10"`
	Path               FilesSingleCmd  `positional-args:"true"`
	Help               HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*FilesSyncCmd) Execute

func (c *FilesSyncCmd) Execute(args []string) error

func (*FilesSyncCmd) Sync

func (c *FilesSyncCmd) Sync(system *System, inventory *backends.Inventory, args []string) error

type FilesUploadCmd

type FilesUploadCmd struct {
	ClusterName     TypeClusterName    `short:"n" long:"name" description:"Cluster name" default:"asd"`
	Nodes           TypeNodes          `short:"l" long:"nodes" description:"Node number(s), comma-separated. Default=ALL" default:""`
	ParallelThreads int                `short:"t" long:"threads" description:"Run on this many nodes in parallel" default:"10"`
	Progress        bool               `short:"p" long:"progress" description:"Show upload progress with TUI display"`
	MaxRetries      int                `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep      time.Duration      `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Files           FilesRestUploadCmd `positional-args:"true"`
	Help            HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*FilesUploadCmd) Execute

func (c *FilesUploadCmd) Execute(args []string) error

func (*FilesUploadCmd) Upload

func (c *FilesUploadCmd) Upload(system *System, inventory *backends.Inventory, args []string) error

type FlattenedInstanceType

type FlattenedInstanceType struct {
	Region       string
	Type         string
	Arch         string
	Vcpus        int
	RAMGib       int
	Disks        int
	DiskSizeGib  int
	TotalSizeGib int
}

FlattenedInstanceType represents a flattened instance type entry for display

type GitHubDirEntry

type GitHubDirEntry struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	Size        int    `json:"size"`
	DownloadURL string `json:"download_url"`
	Type        string `json:"type"`
}

type GraphConfigParams

type GraphConfigParams struct {
	Seeds           []string
	Namespace       string
	ExtraProperties []string
	RAMMb           int
}

GraphConfigParams holds parameters for generating graph configuration

type GraphInstallParams

type GraphInstallParams struct {
	ConfigPath      string
	GraphImage      string
	GraphPrivileged bool
	DockerLoginUser string
	DockerLoginPass string
	DockerLoginURL  string
}

GraphInstallParams holds parameters for the graph installation script

type Health

type Health struct {
	State  string `json:"state"`
	Status string `json:"status"`
}

type HelpCmd

type HelpCmd struct {
	AllBackends bool `long:"all" description:"Show help for all backends, not just the selected one"`
}

func (*HelpCmd) Execute

func (c *HelpCmd) Execute(args []string) error

type ImagesCmd

type ImagesCmd struct {
	List   ImagesListCmd   `command:"list" subcommands-optional:"true" description:"List available images" webicon:"fas fa-list"`
	Create ImagesCreateCmd `command:"create" subcommands-optional:"true" description:"Create a new image" webicon:"fas fa-circle-plus" invwebforce:"true"`
	Delete ImagesDeleteCmd `command:"destroy" subcommands-optional:"true" description:"Delete an image" webicon:"fas fa-trash" invwebforce:"true"`
	Vacuum ImagesVacuumCmd `` /* 145-byte string literal not displayed */
	Help   HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ImagesCmd) Execute

func (c *ImagesCmd) Execute(args []string) error

type ImagesCreateCmd

type ImagesCreateCmd struct {
	Name         string   `short:"n" long:"name" description:"Set image name"`
	Description  string   `short:"d" long:"description" description:"Set image description"`
	InstanceName string   `short:"N" long:"instance-name" description:"Name of the instance to create the image from"`
	SizeGiB      int      `short:"s" long:"size" description:"Set image size in GiB; default is the size of the root volume of the instance"`
	Owner        string   `short:"o" long:"owner" description:"Set image owner"`
	Type         string   `short:"t" long:"type" description:"Set image type; sets aerolab.image.type tag"`
	Version      string   `short:"v" long:"version" description:"Set image version; sets aerolab.soft.version tag"`
	Tags         []string `short:"T" long:"tag" description:"Set extra image tags, as k=v"`
	Timeout      int      `long:"timeout" description:"Set timeout in minutes for the image creation" default:"10"`
	IsOfficial   bool     `short:"i" long:"official" description:"Instance was created using an official OS image (has systemd)"`
	Encrypted    bool     `short:"e" long:"encrypted" description:"Set to create an encrypted image"`
	DryRun       bool     `long:"dry-run" description:"Do not actually create the image, just run the basic checks"`
	Help         HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ImagesCreateCmd) CreateImage

func (c *ImagesCreateCmd) CreateImage(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (*backends.Image, error)

func (*ImagesCreateCmd) Execute

func (c *ImagesCreateCmd) Execute(args []string) error

type ImagesDeleteCmd

type ImagesDeleteCmd struct {
	Name         string   `short:"n" long:"name" description:"Name of the image to delete"`
	Region       string   `short:"r" long:"region" description:"Region of the image to delete"`
	Owner        string   `short:"o" long:"owner" description:"Owner of the image to delete"`
	Architecture string   `short:"a" long:"architecture" description:"Architecture of the image to delete"`
	OSName       string   `short:"d" long:"os-name" description:"OS name of the image to delete"`
	OSVersion    string   `short:"i" long:"os-version" description:"OS version of the image to delete"`
	Type         string   `short:"t" long:"type" description:"Type of the image to delete"`
	Version      string   `short:"v" long:"version" description:"Software version of the image to delete"`
	Tags         []string `short:"T" long:"tag" description:"Tag of the image to delete, as k=v"`
	DryRun       bool     `long:"dry-run" description:"Print what would be done, but do not actually delete"`
	Force        bool     `long:"force" description:"Do not ask for confirmation"`
	Help         HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ImagesDeleteCmd) DeleteImage

func (c *ImagesDeleteCmd) DeleteImage(system *System, inventory *backends.Inventory, args []string) error

func (*ImagesDeleteCmd) Execute

func (c *ImagesDeleteCmd) Execute(args []string) error

type ImagesListCmd

type ImagesListCmd struct {
	Output     string           `` /* 130-byte string literal not displayed */
	TableTheme string           `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string         `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool             `short:"p" long:"pager" description:"Use a pager to display the output"`
	Filters    ImagesListFilter `group:"Filters" namespace:"filter"`
	Help       HelpCmd          `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ImagesListCmd) Execute

func (c *ImagesListCmd) Execute(args []string) error

func (*ImagesListCmd) ListImages

func (c *ImagesListCmd) ListImages(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

type ImagesListFilter

type ImagesListFilter struct {
	Type         string `short:"T" long:"type" description:"Filter by type of image. Values: custom, public, all" default:"custom"`
	SoftwareType string `short:"S" long:"software-type" description:"Filter by software type of image. Values: aerospike, ams, etc"`
	Owner        string `short:"O" long:"owner" description:"Filter by owner of the image"`
}

type ImagesVacuumCmd

type ImagesVacuumCmd struct {
	DryRun bool    `long:"dry-run" description:"Do not actually delete the templates, just list them"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ImagesVacuumCmd) Execute

func (c *ImagesVacuumCmd) Execute(args []string) error

func (*ImagesVacuumCmd) VacuumImages

func (c *ImagesVacuumCmd) VacuumImages(system *System, inventory *backends.Inventory, args []string) error

type Infrastructure

type Infrastructure struct {
	AvailabilityZoneCount int    `json:"availabilityZoneCount"`
	InstanceType          string `json:"instanceType"`
	Region                string `json:"region"`
}

type Init

type Init struct {
	InitBackend        bool                // initialize backend as part of startup; if trying to pollInventoryHourly without filling InitBackend, set to false, and call GetBackend() later
	RunExecuteFunction bool                // only set to true if you are initializing the application for the first time
	UpgradeCheck       bool                // check for upgrades as part of startup, and print a message if a new version is available
	Backend            *InitBackend        // backend configuration; optional, if not specified, will be auto-filled
	ExistingInventory  *backends.Inventory // existing inventory, if requested to be set by the caller
	AllBackendsHelp    bool                // if true, show help for all backends, not just the selected one
	SkipArgsParsing    bool                // if true, skip CLI argument parsing - use this when using aerolab as a library
	BackendOverride    backends.Backend    // test-only: if non-nil, Initialize uses this backend instead of constructing a real one; nil in all production call sites
}

type InitBackend

type InitBackend struct {
	PollInventoryHourly   bool                 // whether the backend(s) should refresh inventory hourly - this is useful if running the project as a long-running service instead of CLI app
	PollInterval          time.Duration        // custom poll interval for inventory refresh; 0 means use the default (1 hour)
	UseCache              bool                 // whether to use local cache for the backend inventory - only use if not sharing the GCP/AWS project/account with other users
	LogMillisecond        bool                 // whether to log milliseconds - whether to enable millisecond logging
	ListAllProjects       bool                 // whether to list all projects - set to list all GCP projects in the backend inventory
	GCPAuthMethod         clouds.GCPAuthMethod // GCP authentication method to use - if not set, a default auth account will be used
	GCPBrowser            bool                 // whether to open a browser to authenticate with GCP - if false, the user will need to manually visit the auth URL with GCP
	GCPClientID           string               // GCP client ID used for authentication - if not set, a default auth account will be used
	GCPClientSecret       string               // GCP client secret used for authentication - if not set, a default auth account will be used
	GCPUseIAP             bool                 // whether to route SSH/SFTP through Google IAP TCP forwarding instead of dialing the routable instance IP
	GCPAutoEnableServices bool                 // whether to auto-enable required GCP services without prompting
	SkipPricing           bool                 // whether to skip all cost/pricing lookups (AWS Pricing API / GCP Cloud Billing catalog); catalogs are still returned without prices
}

type InstallerCmd

type InstallerCmd struct {
	ListVersions InstallerListVersionsCmd `command:"list-versions" subcommands-optional:"true" description:"List Aerospike versions" webicon:"fas fa-list"`
	Download     InstallerDownloadCmd     `command:"download" subcommands-optional:"true" description:"Download Aerospike installer" webicon:"fas fa-download"`
	Help         HelpCmd                  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstallerCmd) Execute

func (c *InstallerCmd) Execute(args []string) error

type InstallerDownloadCmd

type InstallerDownloadCmd struct {
	IsArm  bool    `long:"arm" description:"indicate installing on an arm instance"`
	DryRun bool    `long:"dry-run" description:"do not download the installer, just print the URL"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*InstallerDownloadCmd) DownloadAerospikeInstaller

func (c *InstallerDownloadCmd) DownloadAerospikeInstaller(log *logger.Logger, destDir string, destFileName string, installURL string, progressFunc func(p *wget.Progress)) error

func (*InstallerDownloadCmd) Execute

func (c *InstallerDownloadCmd) Execute(args []string) error

func (*InstallerDownloadCmd) FindAerospikeInstaller

func (c *InstallerDownloadCmd) FindAerospikeInstaller(log *logger.Logger) (fileName string, installURL string, err error)

func (*InstallerDownloadCmd) FindAndDownloadAerospikeServerInstaller

func (c *InstallerDownloadCmd) FindAndDownloadAerospikeServerInstaller(log *logger.Logger) (err error)

type InstallerListVersionsCmd

type InstallerListVersionsCmd struct {
	Prefix    string  `short:"v" long:"version" description:"Version Prefix to search for" default:""`
	Community bool    `short:"c" long:"community" description:"Set this switch to list community editions"`
	Federal   bool    `short:"f" long:"federal" description:"Set this switch to list federal editions; cancels --community"`
	Reverse   bool    `short:"r" long:"reverse" description:"Reverse-sort the results"`
	Url       bool    `short:"l" long:"show-url" description:"Show direct access url instead of version number"`
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstallerListVersionsCmd) Execute

func (c *InstallerListVersionsCmd) Execute(args []string) error

func (*InstallerListVersionsCmd) ListVersions

func (c *InstallerListVersionsCmd) ListVersions(log *logger.Logger, out io.Writer) error

type InstanceDNS

type InstanceDNS struct {
	DomainID   string `long:"domain-id" description:"The ID of the domain, as defined for DomainID"`
	DomainName string `long:"domain-name" description:"The name of the domain, as defined for DomainID"`
	Name       string `long:"name" description:"The name to assign the instance, if not set, the instance ID will be used"`
	Region     string `long:"region" description:"The region to use for the assignment"`
}

type InstanceType

type InstanceType struct {
	InstanceType           string       `json:"instanceType"`
	LocalStorage           LocalStorage `json:"localStorage"`
	MemoryGib              int          `json:"memoryGib"`
	SupportedArchitectures []string     `json:"supportedArchitectures"`
	Vcpus                  int          `json:"vcpus"`
	RegionName             string       `json:"-"` // Added during flattening
}

InstanceType represents a single instance type

type InstancesAddTagsCmd

type InstancesAddTagsCmd struct {
	Tags   []string            `short:"t" long:"tag" description:"Tags to add to the instances, format: k=v"`
	Filter InstancesListFilter `group:"Filters" namespace:"filter"`
	Help   HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesAddTagsCmd) AddTags

func (c *InstancesAddTagsCmd) AddTags(system *System, inventory *backends.Inventory, args []string) error

func (*InstancesAddTagsCmd) Execute

func (c *InstancesAddTagsCmd) Execute(args []string) error

type InstancesApplyCmd

type InstancesApplyCmd struct {
	ClusterName        string                   `short:"n" long:"cluster-name" description:"Name of the cluster to apply the state to" default:"asd"`
	Count              int                      `short:"c" long:"count" description:"Desired number of instances to have in the cluster" default:"1"`
	Owner              string                   `short:"o" long:"owner" description:"Owner of the instances"`
	Tags               []string                 `short:"t" long:"tag" description:"Tags to add to the instances, format: k=v"`
	Description        string                   `short:"d" long:"description" description:"Description of the instances"`
	TerminateOnStop    bool                     `short:"T" long:"terminate-on-stop" description:"Terminate the instances when they are stopped"`
	ParallelSSHThreads int                      `short:"p" long:"threads" description:"Number of parallel SSH threads to use for the instances" default:"10"`
	SSHKeyName         string                   `short:"k" long:"ssh-key-name" description:"Name of a custom SSH key to use for the instances"`
	Hooks              InstancesApplyCmdHooks   `group:"Hooks" description:"hooks" namespace:"hooks"`
	AWS                InstancesCreateCmdAws    `group:"AWS" description:"backend-aws" namespace:"aws"`
	GCP                InstancesCreateCmdGcp    `group:"GCP" description:"backend-gcp" namespace:"gcp"`
	Docker             InstancesCreateCmdDocker `group:"Docker" description:"backend-docker" namespace:"docker"`
	NoInstallExpiry    bool                     `long:"no-install-expiry" description:"Do not install the expiry system, even if instance expiry is set"`
	Force              bool                     `long:"force" description:"Do not ask for confirmation when destroying instances"`
	DryRun             bool                     `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	Help               InstancesApplyCmdHelp    `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesApplyCmd) Apply

func (c *InstancesApplyCmd) Apply(system *System, inventory *backends.Inventory, args []string) error

func (*InstancesApplyCmd) Execute

func (c *InstancesApplyCmd) Execute(args []string) error

type InstancesApplyCmdHelp

type InstancesApplyCmdHelp struct {
	AllBackends bool `long:"all" description:"Show help for all backends, not just the selected one"`
}

func (*InstancesApplyCmdHelp) Execute

func (c *InstancesApplyCmdHelp) Execute(args []string) error

type InstancesApplyCmdHooks

type InstancesApplyCmdHooks struct {
	BeforeAllCreate  []flags.Filename `` /* 132-byte string literal not displayed */
	AfterAllCreate   []flags.Filename `` /* 130-byte string literal not displayed */
	BeforeEachCreate []flags.Filename `` /* 132-byte string literal not displayed */
	AfterEachCreate  []flags.Filename `` /* 130-byte string literal not displayed */
	BeforeAllGrow    []flags.Filename `` /* 127-byte string literal not displayed */
	AfterAllGrow     []flags.Filename `long:"after-all-grow" description:"Path to a command or script to run after all instances are added when growing the cluster"`
	BeforeEachGrow   []flags.Filename `` /* 127-byte string literal not displayed */
	AfterEachGrow    []flags.Filename `long:"after-each-grow" description:"Path to a command or script to run after each instance is added when growing the cluster"`
	BeforeAllShrink  []flags.Filename `` /* 133-byte string literal not displayed */
	AfterAllShrink   []flags.Filename `` /* 131-byte string literal not displayed */
	BeforeEachShrink []flags.Filename `` /* 133-byte string literal not displayed */
	AfterEachShrink  []flags.Filename `` /* 131-byte string literal not displayed */
	Noop             []flags.Filename `long:"noop" description:"Path to a command or script to run if cluster is already at the desired size"`
	OutputToStdout   bool             `long:"output-to-stdout" description:"Output the output of the hooks to stdout"`
}

type InstancesAssignFirewallsCmd

type InstancesAssignFirewallsCmd struct {
	Firewalls []string            `short:"f" long:"firewall" description:"Firewall names to assign to the instances"`
	Filter    InstancesListFilter `group:"Filters" namespace:"filter"`
	Help      HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesAssignFirewallsCmd) AssignFirewalls

func (c *InstancesAssignFirewallsCmd) AssignFirewalls(system *System, inventory *backends.Inventory, args []string) error

func (*InstancesAssignFirewallsCmd) Execute

func (c *InstancesAssignFirewallsCmd) Execute(args []string) error

type InstancesAttachCmd

type InstancesAttachCmd struct {
	ParallelThreads int                 `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	ConnectTimeout  time.Duration       `short:"C" long:"connect-timeout" description:"Connect timeout" default:"10s"`
	SessionTimeout  time.Duration       `short:"S" long:"session-timeout" description:"Session timeout"`
	Env             []string            `short:"e" long:"env" description:"Environment variables to set, as k=v"`
	NoTerminal      bool                `long:"no-terminal" description:"Do not use a terminal"`
	Out             flags.Filename      `long:"stdout" description:"Path output file to redirect stdout to"`
	Err             flags.Filename      `` /* 146-byte string literal not displayed */
	Detach          bool                `` /* 174-byte string literal not displayed */
	Filters         InstancesListFilter `group:"Filters" namespace:"filter"`
	Help            AttachHelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesAttachCmd) AttachInstances

func (c *InstancesAttachCmd) AttachInstances(system *System, inventory *backends.Inventory, args []string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) (output []*backends.ExecOutput, err error)

if c.Out or c.Err is set, it will redirect stdout/stderr to the file, ignoring the stdout/stderr parameters if c.Detach is set, stdin will be nil and no PTY is allocated (implies --no-terminal)

func (*InstancesAttachCmd) Execute

func (c *InstancesAttachCmd) Execute(args []string) error

type InstancesChangeExpiryCmd

type InstancesChangeExpiryCmd struct {
	DryRun   bool                `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	ExpireIn time.Duration       `long:"expire-in" description:"Expire in this duration from now" default:"30h"`
	Filters  InstancesListFilter `group:"Filters" namespace:"filter"`
	Help     HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesChangeExpiryCmd) ChangeExpiryInstances

func (c *InstancesChangeExpiryCmd) ChangeExpiryInstances(system *System, inventory *backends.Inventory, args []string) (backends.InstanceList, error)

func (*InstancesChangeExpiryCmd) Execute

func (c *InstancesChangeExpiryCmd) Execute(args []string) error

type InstancesCmd

type InstancesCmd struct {
	Create          InstancesCreateCmd          `` /* 129-byte string literal not displayed */
	Grow            InstancesGrowCmd            `` /* 131-byte string literal not displayed */
	Apply           InstancesApplyCmd           `` /* 194-byte string literal not displayed */
	List            InstancesListCmd            `command:"list" subcommands-optional:"true" description:"List instances" webicon:"fas fa-list"`
	Attach          InstancesAttachCmd          `command:"attach" subcommands-optional:"true" description:"Attach to an instance or cluster" webicon:"fas fa-terminal"`
	Start           InstancesStartCmd           `` /* 127-byte string literal not displayed */
	Stop            InstancesStopCmd            `command:"stop" subcommands-optional:"true" description:"Stop an instance or cluster" webicon:"fas fa-stop" invwebforce:"true"`
	Restart         InstancesRestartCmd         `` /* 131-byte string literal not displayed */
	UpdateHostsFile InstancesUpdateHostsFileCmd `` /* 134-byte string literal not displayed */
	AddTags         InstancesAddTagsCmd         `command:"add-tags" subcommands-optional:"true" description:"Add tags to instances" webicon:"fas fa-tags"`
	RemoveTags      InstancesRemoveTagsCmd      `command:"remove-tags" subcommands-optional:"true" description:"Remove tags from instances" webicon:"fas fa-tags"`
	AssignFirewalls InstancesAssignFirewallsCmd `command:"assign-firewalls" subcommands-optional:"true" description:"Assign firewalls to instances" webicon:"fas fa-firewall"`
	RemoveFirewalls InstancesRemoveFirewallsCmd `` /* 126-byte string literal not displayed */
	ChangeExpiry    InstancesChangeExpiryCmd    `` /* 126-byte string literal not displayed */
	Destroy         InstancesDestroyCmd         `` /* 132-byte string literal not displayed */
	Help            HelpCmd                     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesCmd) Execute

func (c *InstancesCmd) Execute(args []string) error

type InstancesCreateCmd

type InstancesCreateCmd struct {
	ClusterName        string                   `short:"n" long:"cluster-name" description:"Name of the cluster to create" default:"asd"`
	Count              int                      `short:"c" long:"count" description:"Number of instances to create" default:"1"`
	Name               string                   `short:"N" long:"name" description:"Name of the instance to create (since count instances only)"`
	Owner              string                   `short:"o" long:"owner" description:"Owner of the instances"`
	Type               string                   `` /* 128-byte string literal not displayed */
	Tags               []string                 `short:"t" long:"tag" description:"Tags to add to the instances, format: k=v"`
	Description        string                   `short:"d" long:"description" description:"Description of the instances"`
	TerminateOnStop    bool                     `short:"T" long:"terminate-on-stop" description:"Terminate the instances when they are stopped"`
	ParallelSSHThreads int                      `short:"p" long:"threads" description:"Number of parallel SSH threads to use for the instances" default:"10"`
	SSHKeyName         string                   `short:"k" long:"ssh-key-name" description:"Name of a custom SSH key to use for the instances"`
	OS                 string                   `long:"os" description:"OS to use for the instances" default:"ubuntu"`
	Version            string                   `long:"version" description:"Version of the OS to use for the instances" default:"24.04"`
	Arch               string                   `long:"arch" description:"Architecture override to use for the instances (amd64, arm64)"`
	ImageType          string                   `long:"image-type" description:"Image software type to search for"`
	ImageVersion       string                   `long:"image-version" description:"Version of the image software to search for"`
	AWS                InstancesCreateCmdAws    `group:"AWS" description:"backend-aws" namespace:"aws"`
	GCP                InstancesCreateCmdGcp    `group:"GCP" description:"backend-gcp" namespace:"gcp"`
	Docker             InstancesCreateCmdDocker `group:"Docker" description:"backend-docker" namespace:"docker"`
	NoInstallExpiry    bool                     `long:"no-install-expiry" description:"Do not install the expiry system, even if instance expiry is set"`
	DryRun             bool                     `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	// Retry configuration
	MaxRetries         int           `` /* 134-byte string literal not displayed */
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between transient retries" default:"30s" simplemode:"false"`
	CapacityRetries    int           `long:"capacity-retries" description:"Maximum retries for capacity errors (AWS/GCP only)" default:"0" simplemode:"false"`
	CapacityRetrySleep time.Duration `long:"capacity-retry-sleep" description:"Sleep duration between capacity retries" default:"60s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

func (*InstancesCreateCmd) CreateInstances

func (c *InstancesCreateCmd) CreateInstances(system *System, inventory *backends.Inventory, args []string, action string) (backends.InstanceList, error)

func (*InstancesCreateCmd) Execute

func (c *InstancesCreateCmd) Execute(args []string) error

type InstancesCreateCmdAws

type InstancesCreateCmdAws struct {
	ImageID            string          `long:"image" description:"Custom image ID to use for the instances; ignores OS, Version, Arch"`
	Expire             TypeExpiry      `long:"expire" description:"Expire the instances in a given time; Y/M/W/D/h/m/s, ex 1D12h 2W 1Y6M" default:"30h"`
	NetworkPlacement   string          `` /* 145-byte string literal not displayed */
	InstanceType       guiInstanceType `long:"instance" description:"Instance type to use for the instances" webchoice:"method::List"`
	Disks              []string        `` /* 338-byte string literal not displayed */
	Firewalls          []string        `long:"firewall" description:"Extra security group names to assign to the instances"`
	SpotInstance       bool            `long:"spot" description:"Create spot instances"`
	DisablePublicIP    bool            `long:"no-public-ip" description:"Disable public IP assignment to the instances"`
	IAMInstanceProfile string          `long:"instance-profile" description:"IAM instance profile to use for the instances"`
	CustomDNS          InstanceDNS     `group:"Automated Custom Route53 DNS" namespace:"dns" description:"backend-aws"`
}

type InstancesCreateCmdDocker

type InstancesCreateCmdDocker struct {
	ImageName          string         `long:"image" description:"Custom image name to use for the instances; ignores OS, Version, Arch"`
	NetworkName        string         `long:"network" description:"Name of the network to use for the instances; default: default"` // convert to ",VALUE" for docker
	Disks              []string       ``                                                                                            /* 205-byte string literal not displayed */
	ExposePorts        []string       ``                                                                                            /* 274-byte string literal not displayed */
	StopTimeout        *int           `long:"stop-timeout" description:"Container default stop timeout in seconds before force-stop"`
	Privileged         bool           `long:"privileged" description:"Give extended privileges to container"`
	RestartPolicy      string         `long:"restart" description:"Container restart policy: Always, None, OnFailure, UnlessStopped"`
	MaxRestartRetries  int            `long:"max-restart-retries" description:"Maximum number of restart attempts"`
	ShmSize            int64          `long:"shm-size" description:"Size of /dev/shm in bytes"`
	CpuLimit           string         `long:"cpu-limit" description:"CPU limit (e.g., 1, 0.5, 2)"`
	RamLimit           string         `long:"ram-limit" description:"RAM limit (e.g., 500m, 1g, 2g)"`
	SwapLimit          string         `long:"swap-limit" description:"Total memory limit (RAM+swap) (e.g., 1g); if equal to ram-limit, swap is disabled"`
	AdvancedConfigPath flags.Filename `long:"advanced-config" description:"Path to JSON file containing advanced Docker container configuration"`
	RegistryUser       string         `long:"registry-user" description:"Username for docker registry authentication when pulling custom images"`
	RegistryPass       string         `` /* 143-byte string literal not displayed */
	RegistryURL        string         `long:"registry-url" description:"Registry URL (e.g., docker.io, ghcr.io); if empty, uses default registry"`
}

type InstancesCreateCmdGcp

type InstancesCreateCmdGcp struct {
	ImageName          string          `` /* 146-byte string literal not displayed */
	Expire             TypeExpiry      `long:"expire" description:"Expire the instances in a given time; Y/M/W/D/h/m/s, ex 1D12h 2W 1Y6M" default:"30h"`
	Zone               guiZone         `` /* 137-byte string literal not displayed */
	VPC                guiVpc          `long:"vpc" description:"VPC network name to use; empty=default VPC" webchoice:"method::List"`
	Subnet             string          `long:"subnet" description:"GCP subnet name within the selected VPC; empty=auto-select first subnet in the zone's region"`
	InstanceType       guiInstanceType `long:"instance" description:"Instance type to use for the instances" webchoice:"method::List"`
	Disks              []string        `` /* 350-byte string literal not displayed */
	Firewalls          []string        `long:"firewall" description:"Extra firewall names to assign to the instances"`
	SpotInstance       bool            `long:"spot" description:"Create spot instances"`
	DisablePublicIP    bool            `` /* 126-byte string literal not displayed */
	IAMInstanceProfile string          `long:"instance-profile" description:"IAM instance profile to use for the instances"`
	MinCPUPlatform     string          `long:"min-cpu-platform" description:"Minimum CPU platform to use for the instances"`
	GVNIC              bool            `` /* 167-byte string literal not displayed */
	OnHostMaintenance  string          `` /* 175-byte string literal not displayed */
	CustomDNS          InstanceDNS     `group:"Automated Custom GCP DNS" namespace:"dns" description:"backend-gcp"`
}

type InstancesDestroyCmd

type InstancesDestroyCmd struct {
	DryRun  bool                `long:"dry-run" description:"Print what would be done, but do not actually destroy"`
	Force   bool                `long:"force" description:"Do not ask for confirmation"`
	NoWait  bool                `long:"no-wait" description:"Do not wait for the instances to terminate"`
	Filters InstancesListFilter `group:"Filters" namespace:"filter"`
	Help    HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesDestroyCmd) DestroyInstances

func (c *InstancesDestroyCmd) DestroyInstances(system *System, inventory *backends.Inventory, args []string) (backends.InstanceList, error)

func (*InstancesDestroyCmd) Execute

func (c *InstancesDestroyCmd) Execute(args []string) error

type InstancesGrowCmd

type InstancesGrowCmd struct {
	InstancesCreateCmd
}

func (*InstancesGrowCmd) Execute

func (c *InstancesGrowCmd) Execute(args []string) error

type InstancesListCmd

type InstancesListCmd struct {
	Output     string              `` /* 130-byte string literal not displayed */
	TableTheme string              `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string            `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool                `short:"p" long:"pager" description:"Use a pager to display the output"`
	Filters    InstancesListFilter `group:"Filters" namespace:"filter"`
	Help       HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesListCmd) Execute

func (c *InstancesListCmd) Execute(args []string) error

func (*InstancesListCmd) ListInstances

func (c *InstancesListCmd) ListInstances(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

type InstancesListFilter

type InstancesListFilter struct {
	Backend      string   `short:"b" long:"backend" description:"Filter by backend type"`
	ClusterName  string   `short:"n" long:"cluster-name" description:"Filter by cluster name"`
	NodeNo       string   `short:"l" long:"node-no" description:"Filter by node number(s), ex: 1,2,3,10-15"`
	Name         string   `short:"N" long:"name" description:"Filter by name of the instance"`
	Owner        string   `short:"O" long:"owner" description:"Filter by owner of the instance"`
	Type         string   `short:"T" long:"type" description:"Filter by type of instance (aerolab.type tag)"`
	Version      string   `short:"v" long:"version" description:"Filter by software version on the instance (aerolab.soft.version tag)"`
	Architecture string   `short:"a" long:"architecture" description:"Filter by architecture of the instance"`
	OSName       string   `short:"d" long:"os-name" description:"Filter by OS name of the instance (OS name)"`
	OSVersion    string   `short:"i" long:"os-version" description:"Filter by OS version of the instance (OS version)"`
	Zone         string   `short:"z" long:"zone" description:"Filter by zone of the instance (zone name)"`
	Tags         []string `long:"tag" description:"Filter by tag of the instance, as k=v"`
}

type InstancesRemoveFirewallsCmd

type InstancesRemoveFirewallsCmd struct {
	Firewalls []string            `short:"f" long:"firewall" description:"Firewall names to remove from the instances"`
	Filter    InstancesListFilter `group:"Filters" namespace:"filter"`
	Help      HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesRemoveFirewallsCmd) Execute

func (c *InstancesRemoveFirewallsCmd) Execute(args []string) error

func (*InstancesRemoveFirewallsCmd) RemoveFirewalls

func (c *InstancesRemoveFirewallsCmd) RemoveFirewalls(system *System, inventory *backends.Inventory, args []string) error

type InstancesRemoveTagsCmd

type InstancesRemoveTagsCmd struct {
	Tags   []string            `short:"t" long:"tag" description:"Tag names to remove from the instances"`
	Filter InstancesListFilter `group:"Filters" namespace:"filter"`
	Help   HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesRemoveTagsCmd) Execute

func (c *InstancesRemoveTagsCmd) Execute(args []string) error

func (*InstancesRemoveTagsCmd) RemoveTags

func (c *InstancesRemoveTagsCmd) RemoveTags(system *System, inventory *backends.Inventory, args []string) error

type InstancesRestartCmd

type InstancesRestartCmd struct {
	DryRun  bool                `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	Filters InstancesListFilter `group:"Filters" namespace:"filter"`
	Help    HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesRestartCmd) Execute

func (c *InstancesRestartCmd) Execute(args []string) error

func (*InstancesRestartCmd) RestartInstances

func (c *InstancesRestartCmd) RestartInstances(system *System, inventory *backends.Inventory, args []string) (toStop backends.InstanceList, toStart backends.InstanceList, err error)

type InstancesStartCmd

type InstancesStartCmd struct {
	DryRun  bool                `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	NoWait  bool                `long:"no-wait" description:"Do not wait for the instances to start"`
	Filters InstancesListFilter `group:"Filters" namespace:"filter"`
	Help    HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesStartCmd) Execute

func (c *InstancesStartCmd) Execute(args []string) error

func (*InstancesStartCmd) StartInstances

func (c *InstancesStartCmd) StartInstances(system *System, inventory *backends.Inventory, args []string) (backends.InstanceList, error)

type InstancesStopCmd

type InstancesStopCmd struct {
	DryRun  bool                `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	Force   bool                `short:"f" long:"force" description:"Force stop the instances"`
	NoWait  bool                `long:"no-wait" description:"Do not wait for the instances to stop"`
	Filters InstancesListFilter `group:"Filters" namespace:"filter"`
	Help    HelpCmd             `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesStopCmd) Execute

func (c *InstancesStopCmd) Execute(args []string) error

func (*InstancesStopCmd) StopInstances

func (c *InstancesStopCmd) StopInstances(system *System, inventory *backends.Inventory, args []string) (backends.InstanceList, error)

type InstancesUpdateHostsFileCmd

type InstancesUpdateHostsFileCmd struct {
	On                 []string `short:"o" long:"on" description:"Update hosts file on these clusters only; default: all clusters"`
	With               []string `short:"w" long:"with" description:"Include only instances in these clusters; default: all clusters"`
	IgnoreNotRunning   bool     `short:"i" long:"ignore-not-running" description:"Ignore instances that are not running"`
	ParallelSSHThreads int      `short:"p" long:"threads" description:"Number of parallel SSH threads" default:"10"`
	Help               HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InstancesUpdateHostsFileCmd) Execute

func (c *InstancesUpdateHostsFileCmd) Execute(args []string) error

func (*InstancesUpdateHostsFileCmd) UpdateHostsFile

func (c *InstancesUpdateHostsFileCmd) UpdateHostsFile(system *System, inventory *backends.Inventory, args []string) error

type InventoryAnsibleCmd

type InventoryAnsibleCmd struct {
	IPType      string  `short:"i" long:"ip-type" description:"IP type to use (private, public)" default:"private"`
	OnlyRunning bool    `short:"r" long:"only-running" description:"Only include running instances"`
	Help        HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryAnsibleCmd) Execute

func (c *InventoryAnsibleCmd) Execute(args []string) error

func (*InventoryAnsibleCmd) InventoryAnsible

func (c *InventoryAnsibleCmd) InventoryAnsible(system *System, cmd []string, args []string, inventory *backends.Inventory, out io.Writer) error

type InventoryCmd

type InventoryCmd struct {
	List                   InventoryListCmd                   `command:"list" subcommands-optional:"true" description:"List clusters, clients and images" webicon:"fas fa-list"`
	RefreshDiskCache       InventoryRefreshDiskCacheCmd       `command:"refresh-disk-cache" subcommands-optional:"true" description:"Refresh the disk cache" webicon:"fas fa-sync"`
	Ansible                InventoryAnsibleCmd                `command:"ansible" subcommands-optional:"true" description:"Export inventory as ansible inventory" webicon:"fas fa-list"`
	Genders                InventoryGendersCmd                `command:"genders" subcommands-optional:"true" description:"Export inventory as genders file" webicon:"fas fa-list"`
	Hostfile               InventoryHostfileCmd               `command:"hostfile" subcommands-optional:"true" description:"Export inventory as hosts file" webicon:"fas fa-list"`
	InstanceTypes          InventoryInstanceTypesCmd          `` /* 134-byte string literal not displayed */
	Expire                 InventoryExpireCmd                 `` /* 129-byte string literal not displayed */
	DeleteProjectResources InventoryDeleteProjectResourcesCmd `` /* 151-byte string literal not displayed */
	InventoryMigrate       InventoryMigrateCmd                `` /* 147-byte string literal not displayed */
	Help                   HelpCmd                            `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryCmd) Execute

func (c *InventoryCmd) Execute(args []string) error

type InventoryDeleteProjectResourcesCmd

type InventoryDeleteProjectResourcesCmd struct {
	Expiry bool    `long:"with-expiry" description:"Also remove the expiry system; WARN: expiry system is NOT project-bound but global"`
	Force  bool    `short:"f" long:"force" description:"Force deletion without confirmation"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryDeleteProjectResourcesCmd) DeleteProjectResources

func (c *InventoryDeleteProjectResourcesCmd) DeleteProjectResources(system *System, inventory *backends.Inventory, args []string) error

func (*InventoryDeleteProjectResourcesCmd) Execute

func (c *InventoryDeleteProjectResourcesCmd) Execute(args []string) error

type InventoryExpireCmd

type InventoryExpireCmd struct {
	ExpireEksctl bool    `long:"expire-eks" description:"enable eksctl expiry; AWS only"`
	CleanupDNS   bool    `long:"cleanup-dns" description:"enable dns cleanup"`
	Help         HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryExpireCmd) Execute

func (c *InventoryExpireCmd) Execute(args []string) error

func (*InventoryExpireCmd) Expire

func (c *InventoryExpireCmd) Expire(system *System, inventory *backends.Inventory, args []string) error

type InventoryGendersCmd

type InventoryGendersCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryGendersCmd) Execute

func (c *InventoryGendersCmd) Execute(args []string) error

func (*InventoryGendersCmd) InventoryGenders

func (c *InventoryGendersCmd) InventoryGenders(system *System, cmd []string, args []string, inventory *backends.Inventory, out io.Writer) error

type InventoryHostfileCmd

type InventoryHostfileCmd struct {
	IPType string  `short:"i" long:"ip-type" description:"IP type to use (private, public, all)" default:"all"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryHostfileCmd) Execute

func (c *InventoryHostfileCmd) Execute(args []string) error

func (*InventoryHostfileCmd) InventoryHostfile

func (c *InventoryHostfileCmd) InventoryHostfile(system *System, cmd []string, args []string, inventory *backends.Inventory, out io.Writer) error

type InventoryInstanceTypesCmd

type InventoryInstanceTypesCmd struct {
	Output       string   `` /* 130-byte string literal not displayed */
	TableTheme   string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy       []string `` /* 209-byte string literal not displayed */
	Nodes        int      `short:"N" long:"node-count" description:"Number of nodes (essentially a price multiplier for the result)" default:"1"`
	Zone         []string `short:"z" long:"zone" description:"Filter by region/zone (can be specified multiple times)"`
	Arch         string   `short:"a" long:"arch" description:"Filter by architecture (amd64, arm64)"`
	FilterName   string   `short:"n" long:"name" description:"Filter by full or partial name"`
	FilterMinCPU int      `short:"c" long:"min-cpus" description:"Search for at least X CPUs"`
	FilterMaxCPU int      `short:"C" long:"max-cpus" description:"Search for max X CPUs"`
	FilterMinRAM float64  `short:"r" long:"min-ram" description:"Search for at least X RAM GB"`
	FilterMaxRAM float64  `short:"R" long:"max-ram" description:"Search for max X RAM GB"`
	EphemeralMin int      `short:"e" long:"min-ephemeral" description:"Search only for instances with at least X ephemeral devices"`
	EphemeralMax int      `short:"E" long:"max-ephemeral" description:"Search only for instances with max X ephemeral devices"`
	Pager        bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help         HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryInstanceTypesCmd) Execute

func (c *InventoryInstanceTypesCmd) Execute(args []string) error

func (*InventoryInstanceTypesCmd) InventoryInstanceTypes

func (c *InventoryInstanceTypesCmd) InventoryInstanceTypes(system *System, cmd []string, args []string, inventory *backends.Inventory, out io.Writer, page *pager.Pager) error

type InventoryListCmd

type InventoryListCmd struct {
	Output             string   `` /* 130-byte string literal not displayed */
	TableTheme         string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy             []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Owner              string   `short:"O" long:"owner" description:"Filter by owner"`
	WithExpiries       bool     `short:"e" long:"with-expiries" description:"Include expiries"`
	WithAerospikeCloud bool     `short:"c" long:"with-aerospike-cloud" description:"Include Aerospike Cloud clusters (slower operation)"`
	Pager              bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help               HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryListCmd) Execute

func (c *InventoryListCmd) Execute(args []string) error

func (*InventoryListCmd) InventoryList

func (c *InventoryListCmd) InventoryList(system *System, cmd []string, args []string, inventory *backends.Inventory, out io.Writer) error

type InventoryMigrateCmd

type InventoryMigrateCmd struct {
	DryRun     bool    `long:"dry-run" description:"Show what would be migrated without making changes"`
	Yes        bool    `short:"y" long:"yes" description:"Skip confirmation prompt and proceed with migration"`
	Force      bool    `long:"force" description:"Force re-migration of already migrated resources"`
	Verbose    bool    `short:"v" long:"verbose" description:"Show detailed migration information"`
	SSHKeyPath string  `long:"ssh-key-path" description:"Path to old v7 SSH keys directory (default: ~/aerolab-keys/)"`
	Help       HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryMigrateCmd) Execute

func (c *InventoryMigrateCmd) Execute(args []string) error

func (*InventoryMigrateCmd) InventoryMigrate

func (c *InventoryMigrateCmd) InventoryMigrate(system *System, cmd []string, args []string, inventory *backends.Inventory) error

type InventoryRefreshDiskCacheCmd

type InventoryRefreshDiskCacheCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*InventoryRefreshDiskCacheCmd) Execute

func (c *InventoryRefreshDiskCacheCmd) Execute(args []string) error

func (*InventoryRefreshDiskCacheCmd) RefreshDiskCache

func (c *InventoryRefreshDiskCacheCmd) RefreshDiskCache(system *System, inventory *backends.Inventory, args []string) error

type Job

type Job struct {
	ID               string         `json:"id"`
	User             string         `json:"user"`
	CommandPath      string         `json:"commandPath"`
	Parameters       map[string]any `json:"parameters"`
	CLICommand       string         `json:"cliCommand"`
	Status           JobStatus      `json:"status"`
	CreatedAt        time.Time      `json:"createdAt"`
	StartedAt        *time.Time     `json:"startedAt,omitempty"`
	CompletedAt      *time.Time     `json:"completedAt,omitempty"`
	Error            string         `json:"error,omitempty"`
	RefreshInventory bool           `json:"refreshInventory,omitempty"`

	// Subprocess execution fields
	PID       int  `json:"pid,omitempty"`
	ExitCode  *int `json:"exitCode,omitempty"`
	Cancelled bool `json:"cancelled,omitempty"`
	TimedOut  bool `json:"timedOut,omitempty"`

	// ReloadRequired is set when config/backend completes - frontend should reload the page
	ReloadRequired bool `json:"reloadRequired,omitempty"`

	// TempDir is the temp directory for uploaded files (cleaned after completion)
	TempDir string `json:"tempDir,omitempty"`
}

Job represents a submitted command job

type JobListResponse

type JobListResponse struct {
	Jobs  []*Job `json:"jobs"`
	Count int    `json:"count"`
}

JobListResponse is returned when listing jobs

type JobManager

type JobManager struct {
	// contains filtered or unexported fields
}

JobManager handles job lifecycle and storage

func NewJobManager

func NewJobManager() (*JobManager, error)

NewJobManager creates a new JobManager

func (*JobManager) CleanupOldJobs

func (jm *JobManager) CleanupOldJobs(maxAge time.Duration) (int, error)

CleanupOldJobs removes completed/failed jobs older than maxAge

func (*JobManager) CountRunningJobs

func (jm *JobManager) CountRunningJobs() int

CountRunningJobs returns the number of jobs with status "running"

func (*JobManager) CreateJob

func (jm *JobManager) CreateJob(user, commandPath string, params map[string]any, refreshInventory bool, cliCommand string) (*Job, error)

CreateJob creates a new job and saves it to disk. If cliCommand is non-empty it is used as the display command; otherwise one is generated from the params map (which includes all values, even defaults).

func (*JobManager) GetJob

func (jm *JobManager) GetJob(jobID string) (*Job, error)

GetJob retrieves a job by ID

func (*JobManager) GetJobForUser

func (jm *JobManager) GetJobForUser(jobID, user string, isAdmin bool) (*Job, error)

GetJobForUser retrieves a job by ID, ensuring it belongs to the user (or user is admin)

func (*JobManager) GetLogPath

func (jm *JobManager) GetLogPath(job *Job) string

GetLogPath returns the path to the job's log file

func (*JobManager) KillAllRunningJobs

func (jm *JobManager) KillAllRunningJobs()

KillAllRunningJobs sends SIGKILL to all running jobs that have a valid PID

func (*JobManager) ListJobs

func (jm *JobManager) ListJobs(user string, statusFilter string, allUsers bool, showMaxHistory int) ([]*Job, error)

ListJobs lists jobs for a user with optional status filter. showMaxHistory limits the number of completed/failed jobs returned (0 = no limit). Active (running/pending) jobs are always returned in full.

func (*JobManager) OpenLogFile

func (jm *JobManager) OpenLogFile(job *Job) (*os.File, error)

OpenLogFile opens/creates the log file for writing

func (*JobManager) ReadLogs

func (jm *JobManager) ReadLogs(job *Job) (string, error)

ReadLogs reads the current log content

func (*JobManager) ReadLogsFromOffset

func (jm *JobManager) ReadLogsFromOffset(job *Job, offset int64) (string, int64, error)

ReadLogsFromOffset reads log content from a specific offset

func (*JobManager) SaveJob

func (jm *JobManager) SaveJob(job *Job) error

SaveJob saves a job to disk atomically (write to temp file, then rename)

func (*JobManager) UpdateJobStatus

func (jm *JobManager) UpdateJobStatus(jobID string, status JobStatus, errorMsg string) error

UpdateJobStatus updates the job status and saves it

func (*JobManager) UpdateJobStatusWithMeta

func (jm *JobManager) UpdateJobStatusWithMeta(jobID string, status JobStatus, errorMsg string, meta *Job) error

UpdateJobStatusWithMeta updates the job status with additional metadata (PID, exit code, etc.)

type JobStatus

type JobStatus string

JobStatus represents the current state of a job

const (
	JobStatusPending   JobStatus = "pending"
	JobStatusRunning   JobStatus = "running"
	JobStatusCompleted JobStatus = "completed"
	JobStatusError     JobStatus = "error"
	JobStatusFailed    JobStatus = "failed"
)

type JobSubmitResponse

type JobSubmitResponse struct {
	JobID         string    `json:"jobId"`
	User          string    `json:"user"`
	CommandPath   string    `json:"commandPath"`
	CLICommand    string    `json:"cliCommand"`
	Status        JobStatus `json:"status"`
	CreatedAt     time.Time `json:"createdAt"`
	StatusURL     string    `json:"statusUrl"`
	LogsURL       string    `json:"logsUrl"`
	LogsStreamURL string    `json:"logsStreamUrl"`
}

JobSubmitResponse is returned when a job is submitted

type ListFirewallCmd

type ListFirewallCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Owner      string   `short:"O" long:"owner" description:"Filter by owner"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ListFirewallCmd) Execute

func (c *ListFirewallCmd) Execute(args []string) error

type ListNetworksCmd

type ListNetworksCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
	CSV        bool     `short:"c" long:"csv" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
}

func (*ListNetworksCmd) Execute

func (c *ListNetworksCmd) Execute(args []string) error

func (*ListNetworksCmd) ListNetworks

func (c *ListNetworksCmd) ListNetworks(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

type ListSecGroupsCmd

type ListSecGroupsCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Owner      string   `short:"O" long:"owner" description:"Filter by owner"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ListSecGroupsCmd) Execute

func (c *ListSecGroupsCmd) Execute(args []string) error

type ListSubnetsCmd

type ListSubnetsCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ListSubnetsCmd) Execute

func (c *ListSubnetsCmd) Execute(args []string) error

type LocalStorage

type LocalStorage struct {
	DiskSizeGib   int `json:"diskSizeGib"`
	NumberOfDisks int `json:"numberOfDisks"`
	TotalSizeGib  int `json:"totalSizeGib"`
}

LocalStorage represents local storage information

type LockFirewallCmd

type LockFirewallCmd struct {
	NamePrefix string   `` /* 153-byte string literal not displayed */
	IP         string   `` /* 137-byte string literal not displayed */
	VPC        string   `short:"v" long:"vpc" description:"VPC to handle sec groups for; default: default-VPC" default:""`
	Ports      []string ``                                                                                                 /* 167-byte string literal not displayed */
	NoDefaults bool     `short:"d" long:"no-defaults" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*LockFirewallCmd) Execute

func (c *LockFirewallCmd) Execute(args []string) error

type LockSecGroupsCmd

type LockSecGroupsCmd struct {
	NamePrefix string   `` /* 155-byte string literal not displayed */
	IP         string   `` /* 137-byte string literal not displayed */
	VPC        string   `short:"v" long:"vpc" description:"VPC to handle sec groups for; default: default-VPC" default:""`
	Ports      []string ``                                                                                                 /* 167-byte string literal not displayed */
	NoDefaults bool     `short:"d" long:"no-defaults" hidden:"true" webhidden:"true" description:"this no longer applies"` // NOTE: obsolete, but kept for backwards compatibility
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*LockSecGroupsCmd) Execute

func (c *LockSecGroupsCmd) Execute(args []string) error

type LogWriter

type LogWriter struct {
	// contains filtered or unexported fields
}

LogWriter is an io.Writer that writes to both a file and captures for the job

func NewLogWriter

func NewLogWriter(file *os.File) *LogWriter

NewLogWriter creates a new LogWriter

func (*LogWriter) Close

func (lw *LogWriter) Close() error

Close closes the underlying file

func (*LogWriter) Write

func (lw *LogWriter) Write(p []byte) (n int, err error)

Write implements io.Writer

type LogsCmd

type LogsCmd struct {
	Show LogsShowCmd `command:"show" subcommands-optional:"true" description:"Print logs from an Aerospike node" webicon:"fas fa-eye"`
	Get  LogsGetCmd  `` /* 144-byte string literal not displayed */
	Help HelpCmd     `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*LogsCmd) Execute

func (c *LogsCmd) Execute(args []string) error

type LogsGetCmd

type LogsGetCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Journal     bool            `short:"j" long:"journal" description:"Attempt to get logs from journald instead of log files"`
	LogLocation string          `short:"p" long:"path" description:"Aerospike log file path" default:"/var/log/aerospike.log"`
	Destination string          `` /* 136-byte string literal not displayed */
	Force       bool            `short:"f" long:"force" description:"set to not be asked whether to override existing files" webdisable:"true" webset:"true"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	Tail        []string        `description:"Optionally, specify the command to execute to get the logs instead of log files/journalctl"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*LogsGetCmd) Execute

func (c *LogsGetCmd) Execute(args []string) error

func (*LogsGetCmd) GetLogs

func (c *LogsGetCmd) GetLogs(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type LogsShowCmd

type LogsShowCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Node        TypeNode        `short:"l" long:"node" description:"Node number" default:"1"`
	Journal     bool            `short:"j" long:"journal" description:"Attempt to get logs from journald instead of log files"`
	LogLocation string          `short:"p" long:"path" description:"Aerospike log file path" default:"/var/log/aerospike.log"`
	Follow      bool            `short:"f" long:"follow" description:"Follow logs instead of displaying full log" webdisable:"true"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*LogsShowCmd) Execute

func (c *LogsShowCmd) Execute(args []string) error

func (*LogsShowCmd) ShowLogs

func (c *LogsShowCmd) ShowLogs(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string, out io.Writer) (backends.InstanceList, error)

type McpCmd

type McpCmd struct {
	Transport              string   `long:"transport" description:"MCP transport: stdio|http" default:"stdio" webchoice:"stdio,http"`
	Addr                   string   `long:"addr" description:"HTTP listen address (used when --transport=http)" default:"localhost:9190"`
	AuthToken              string   `` /* 218-byte string literal not displayed */
	Profile                string   `` /* 139-byte string literal not displayed */
	Binary                 string   `long:"binary" description:"Path to the aerolab binary invoked for tool execution (defaults to the current executable)"`
	InitBackend            bool     `` /* 143-byte string literal not displayed */
	TimeoutSec             int      `long:"timeout" description:"Default per-call subprocess timeout in seconds (0 = no timeout)" default:"600"`
	MaxOutputBytes         int      `long:"max-output-bytes" description:"Maximum captured bytes of stdout+stderr returned per call" default:"1048576"`
	SessionTimeout         string   `long:"session-timeout" description:"Idle timeout for HTTP streaming sessions (Go duration, e.g. 30m)" default:"30m"`
	MCPEnv                 []string `long:"mcp-env" description:"Extra KEY=VAL env vars passed to every tool subprocess (repeatable)" hidden:"true"`
	DisableForceJSONOutput bool     `` /* 295-byte string literal not displayed */
	ForceSimpleMode        bool     `` /* 143-byte string literal not displayed */
	SimpleModeConfig       string   `long:"simple-mode-config" description:"Path to a simple mode rules file (overrides AEROLAB_SIMPLE_MODE env var)"`
	Help                   HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

McpCmd runs the aerolab MCP (Model Context Protocol) server. It exposes every aerolab subcommand as an MCP tool via self-introspection of the command tree and executes each tool call as a subprocess of this binary.

Two transports are supported: stdio (default, for local agents like Claude Desktop and Cursor) and streamable HTTP (for remote agents). Bearer-token auth is mandatory on the HTTP transport: the server refuses to start unless --auth-token (or AEROLAB_MCP_AUTH_TOKEN) is set.

func (*McpCmd) Execute

func (c *McpCmd) Execute(args []string) error

type Namespace

type Namespace struct {
	Name string `json:"name"`
}

type NetBlockCmd

type NetBlockCmd struct {
	SourceClusterName      TypeClusterName      `short:"s" long:"source" description:"Source cluster name" default:"asd-source"`
	SourceNodeList         TypeNodes            `short:"l" long:"source-nodes" description:"List of source nodes. Empty=ALL." default:""`
	DestinationClusterName TypeClusterName      `short:"d" long:"destination" description:"Destination cluster name" default:"asd-dest"`
	DestinationNodeList    TypeNodes            `short:"i" long:"destination-nodes" description:"List of destination nodes. Empty=ALL." default:""`
	Type                   TypeNetType          `short:"t" long:"type" description:"Block type (reject|drop)." default:"reject" webchoice:"reject,drop"`
	Ports                  string               `short:"p" long:"ports" description:"Comma separated list of ports to block." default:"3000"`
	BlockOn                TypeNetBlockOn       `` /* 148-byte string literal not displayed */
	StatisticMode          TypeNetStatisticMode `` /* 137-byte string literal not displayed */
	StatisticProbability   string               `` /* 147-byte string literal not displayed */
	StatisticEvery         string               `` /* 132-byte string literal not displayed */
	MaxRetries             int                  `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep             time.Duration        `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help                   HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*NetBlockCmd) Execute

func (c *NetBlockCmd) Execute(args []string) error

type NetCmd

type NetCmd struct {
	Block     NetBlockCmd     `command:"block" subcommands-optional:"true" description:"Block a port" webicon:"fas fa-lock"`
	Unblock   NetUnblockCmd   `command:"unblock" subcommands-optional:"true" description:"Unblock a port" webicon:"fas fa-unlock"`
	List      NetListCmd      `command:"list" subcommands-optional:"true" description:"List blocked ports" webicon:"fas fa-list"`
	LossDelay NetLossDelayCmd `` /* 129-byte string literal not displayed */
	Help      HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*NetCmd) Execute

func (c *NetCmd) Execute(args []string) error

type NetListCmd

type NetListCmd struct {
	Output     string        `` /* 130-byte string literal not displayed */
	TableTheme string        `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string      `` /* 165-byte string literal not displayed */
	Pager      bool          `short:"p" long:"pager" description:"Use a pager to display the output"`
	MaxRetries int           `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep time.Duration `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help       HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*NetListCmd) Execute

func (c *NetListCmd) Execute(args []string) error

type NetLossDelayCmd

type NetLossDelayCmd struct {
	SourceClusterName      TypeClusterName   `short:"s" long:"source" description:"Source cluster name" default:"asd-source"`
	SourceNodeList         TypeNodes         `short:"l" long:"source-nodes" description:"List of source nodes. Empty=ALL." default:""`
	DestinationClusterName TypeClusterName   `short:"d" long:"destination" description:"Destination cluster name" default:"asd-dest"`
	DestinationNodeList    TypeNodes         `short:"i" long:"destination-nodes" description:"List of destination nodes. Empty=ALL." default:""`
	Action                 TypeNetLossAction `` /* 172-byte string literal not displayed */
	LatencyMs              string            `short:"D" long:"latency-ms" description:"optional: specify latency (number) of milliseconds"`
	PacketLossPct          string            `short:"L" long:"loss-pct" description:"optional: specify packet loss percentage"`
	LinkSpeedRateBytes     string            `short:"E" long:"rate-bytes" description:"optional: specify link speed rate, in bytes"`
	CorruptPct             string            `short:"O" long:"corrupt-pct" description:"optional: corrupt packets (percentage)"`
	RunOnDestination       bool              `` /* 141-byte string literal not displayed */
	DstPort                int               `short:"p" long:"dst-port" description:"only apply the rule to a specific destination port"`
	SrcPort                int               `short:"P" long:"src-port" description:"only apply the rule to a specific source port"`
	Verbose                bool              `short:"v" long:"verbose" description:"run easytc in verbose mode"`
	Threads                int               `short:"t" long:"threads" description:"Number of parallel threads" default:"10"`
	MaxRetries             int               `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep             time.Duration     `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help                   HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*NetLossDelayCmd) Execute

func (c *NetLossDelayCmd) Execute(args []string) error

type NetUnblockCmd

type NetUnblockCmd struct {
	NetBlockCmd
}

func (*NetUnblockCmd) Execute

func (c *NetUnblockCmd) Execute(args []string) error

type OpenAPIComponents

type OpenAPIComponents struct {
	Schemas         map[string]*OpenAPISchema         `json:"schemas,omitempty"`
	SecuritySchemes map[string]*OpenAPISecurityScheme `json:"securitySchemes,omitempty"`
}

OpenAPIComponents contains reusable components

type OpenAPIInfo

type OpenAPIInfo struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Version     string `json:"version"`
}

OpenAPIInfo contains API metadata

type OpenAPIMediaType

type OpenAPIMediaType struct {
	Schema *OpenAPISchema `json:"schema,omitempty"`
}

OpenAPIMediaType represents a media type

type OpenAPIOperation

type OpenAPIOperation struct {
	Tags        []string                   `json:"tags,omitempty"`
	Summary     string                     `json:"summary,omitempty"`
	Description string                     `json:"description,omitempty"`
	OperationID string                     `json:"operationId,omitempty"`
	Parameters  []OpenAPIParameter         `json:"parameters,omitempty"`
	RequestBody *OpenAPIRequestBody        `json:"requestBody,omitempty"`
	Responses   map[string]OpenAPIResponse `json:"responses"`
	Security    []map[string][]string      `json:"security,omitempty"`
}

OpenAPIOperation represents a single API operation

type OpenAPIParameter

type OpenAPIParameter struct {
	Name        string         `json:"name"`
	In          string         `json:"in"` // query, header, path, cookie
	Description string         `json:"description,omitempty"`
	Required    bool           `json:"required,omitempty"`
	Schema      *OpenAPISchema `json:"schema,omitempty"`
}

OpenAPIParameter represents an operation parameter

type OpenAPIPathItem

type OpenAPIPathItem struct {
	Get    *OpenAPIOperation `json:"get,omitempty"`
	Post   *OpenAPIOperation `json:"post,omitempty"`
	Put    *OpenAPIOperation `json:"put,omitempty"`
	Delete *OpenAPIOperation `json:"delete,omitempty"`
}

OpenAPIPathItem represents operations on a path

type OpenAPIRequestBody

type OpenAPIRequestBody struct {
	Description string                      `json:"description,omitempty"`
	Required    bool                        `json:"required,omitempty"`
	Content     map[string]OpenAPIMediaType `json:"content"`
}

OpenAPIRequestBody represents a request body

type OpenAPIResponse

type OpenAPIResponse struct {
	Description string                      `json:"description"`
	Content     map[string]OpenAPIMediaType `json:"content,omitempty"`
}

OpenAPIResponse represents an API response

type OpenAPISchema

type OpenAPISchema struct {
	Type        string                    `json:"type,omitempty"`
	Format      string                    `json:"format,omitempty"`
	Description string                    `json:"description,omitempty"`
	Default     any                       `json:"default,omitempty"`
	Enum        []string                  `json:"enum,omitempty"`
	Items       *OpenAPISchema            `json:"items,omitempty"`
	Properties  map[string]*OpenAPISchema `json:"properties,omitempty"`
	Required    []string                  `json:"required,omitempty"`
	Ref         string                    `json:"$ref,omitempty"`
	OneOf       []*OpenAPISchema          `json:"oneOf,omitempty"`
}

OpenAPISchema represents a JSON Schema

type OpenAPISecurityScheme

type OpenAPISecurityScheme struct {
	Type         string `json:"type"`
	Scheme       string `json:"scheme,omitempty"`
	BearerFormat string `json:"bearerFormat,omitempty"`
	Name         string `json:"name,omitempty"`
	In           string `json:"in,omitempty"`
	Description  string `json:"description,omitempty"`
}

OpenAPISecurityScheme represents a security scheme

type OpenAPIServer

type OpenAPIServer struct {
	URL         string `json:"url"`
	Description string `json:"description,omitempty"`
}

OpenAPIServer represents a server URL

type OpenAPISpec

type OpenAPISpec struct {
	OpenAPI    string                     `json:"openapi"`
	Info       OpenAPIInfo                `json:"info"`
	Servers    []OpenAPIServer            `json:"servers,omitempty"`
	Paths      map[string]OpenAPIPathItem `json:"paths"`
	Components OpenAPIComponents          `json:"components"`
	Tags       []OpenAPITag               `json:"tags,omitempty"`
}

OpenAPISpec represents the root OpenAPI document

type OpenAPITag

type OpenAPITag struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

OpenAPITag represents a tag for grouping operations

type ParameterInfo

type ParameterInfo struct {
	Name          string   `json:"name"`
	DisplayName   string   `json:"displayName,omitempty"`
	FieldName     string   `json:"fieldName"`
	Short         string   `json:"short,omitempty"`
	Long          string   `json:"long,omitempty"`
	Description   string   `json:"description,omitempty"`
	Type          string   `json:"type"`
	Default       string   `json:"default,omitempty"`
	Required      bool     `json:"required,omitempty"`
	WebType       string   `json:"webType,omitempty"`
	Choices       []string `json:"choices,omitempty"`
	ChoiceLabels  []string `json:"choiceLabels,omitempty"`
	ChoicesMethod string   `json:"choicesMethod,omitempty"`
	Hidden        bool     `json:"hidden,omitempty"`
	WebHidden     bool     `json:"webHidden,omitempty"`
	SimpleMode    bool     `json:"simpleMode"`
	Group         string   `json:"group,omitempty"`
	Namespace     string   `json:"namespace,omitempty"`
	NoDefault     bool     `json:"noDefault,omitempty"`
	IsSlice       bool     `json:"isSlice,omitempty"`
	IsPositional  bool     `json:"isPositional,omitempty"`
	IsFile        bool     `json:"isFile,omitempty"`
	Optional      bool     `json:"optional,omitempty"`
}

ParameterInfo holds metadata about a command parameter

type ParameterOverride

type ParameterOverride struct {
	Choices     []string `yaml:"choices,omitempty"`
	Default     *string  `yaml:"default,omitempty"`
	Hidden      *bool    `yaml:"hidden,omitempty"`
	Required    *bool    `yaml:"required,omitempty"`
	Description *string  `yaml:"description,omitempty"`
}

ParameterOverride defines the overridable properties for a single parameter. Pointer types are used so that unset fields can be distinguished from zero values.

type PartitionInformation

type PartitionInformation struct {
	ClusterName  string      `json:"cluster_name"`
	NodeNo       int         `json:"node_no"`
	Disk         int         `json:"disk"`
	Partition    int         `json:"partition"` // 0 = root disk, no partition
	BlockDevices BlockDevice `json:"block_devices"`
}

type PartitionList

type PartitionList []*PartitionInformation

func (*PartitionList) Sort

func (p *PartitionList) Sort()

type PruneNetworksCmd

type PruneNetworksCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*PruneNetworksCmd) Execute

func (c *PruneNetworksCmd) Execute(args []string) error

func (*PruneNetworksCmd) PruneNetworks

func (c *PruneNetworksCmd) PruneNetworks(system *System, inventory *backends.Inventory, args []string) error

type Reattach

type Reattach struct {
	// Override options for reattach (used by monitor for sizing/capacity)
	InstanceTypeOverride string `long:"instance" description:"Override instance type when reattaching"`
	NoDIMOverride        *bool  `long:"nodim" description:"Override data-in-memory setting when reattaching" no-default:"true"`
	SpotOverride         *bool  `long:"spot" description:"Override spot instance setting when reattaching" no-default:"true"`
	OwnerOverride        string `long:"owner" description:"Override owner tag when reattaching"`
	// RefreshEngineConfigs forces ingest.yaml/plugin.yaml to be
	// re-rendered from the new instance's memSize on reattach. Set by
	// the AGI monitor when it rotates to a different instance type so
	// that Pebble's block cache and the plugin's concurrency limits
	// scale with the new RAM footprint. Without this the YAMLs from
	// the original (smaller) instance persist on EFS and the bigger
	// instance runs with stale tuning. Not exposed on the CLI.
	RefreshEngineConfigs bool `long:"refresh-engine-configs" hidden:"true"`
}

type ReauthenticateCmd

type ReauthenticateCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ReauthenticateCmd) Execute

func (c *ReauthenticateCmd) Execute(args []string) error

func (*ReauthenticateCmd) Reauthenticate

func (c *ReauthenticateCmd) Reauthenticate(system *System, cmd []string, args []string) error

type Region

type Region struct {
	Name          string         `json:"name"`
	InstanceTypes []InstanceType `json:"instanceTypes"`
}

Region represents a region with instance types

type RegistryEntry

type RegistryEntry struct {
	AerospikeVersion string `json:"aerospikeVersion"`
	Flavor           string `json:"flavor"`
	OsName           string `json:"osName"`
	OsVersion        string `json:"osVersion"`
	Architecture     string `json:"architecture"`
	FileName         string `json:"fileName"`
	SHA256           string `json:"sha256"`
}

type RosterApplyCmd

type RosterApplyCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Namespace   string          `short:"m" long:"namespace" description:"Namespace name" default:"test"`
	Roster      string          `` /* 135-byte string literal not displayed */
	NoRecluster bool            `short:"c" long:"no-recluster" description:"if set, will not apply recluster command after roster-set"`
	Quiet       bool            `long:"quiet" description:"Do not print the roster after applying"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*RosterApplyCmd) ApplyRoster

func (c *RosterApplyCmd) ApplyRoster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) error

ApplyRoster applies a roster to the cluster namespace. This function performs the following operations: 1. Gets the list of nodes in the cluster 2. If no roster is specified, discovers observed nodes from all nodes 3. Applies the roster to all nodes using asinfo roster-set command 4. Optionally triggers recluster command 5. Optionally shows the roster after applying

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • error: nil on success, or an error describing what failed

func (*RosterApplyCmd) Execute

func (c *RosterApplyCmd) Execute(args []string) error

type RosterCheatCmd

type RosterCheatCmd struct {
	Namespace string  `short:"m" long:"namespace" description:"Namespace name" default:"test"`
	Help      HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*RosterCheatCmd) Execute

func (c *RosterCheatCmd) Execute(args []string) error

func (*RosterCheatCmd) ShowCheatSheet

func (c *RosterCheatCmd) ShowCheatSheet()

ShowCheatSheet displays a quick strong consistency cheat-sheet. This function provides helpful commands for managing strong consistency in Aerospike clusters, including enabling SC, removing nodes, and recovering from dead partitions.

type RosterCmd

type RosterCmd struct {
	Show  RosterShowCmd  `command:"show" subcommands-optional:"true" description:"Show roster in the cluster namespace" webicon:"fas fa-eye"`
	Apply RosterApplyCmd `` /* 131-byte string literal not displayed */
	Cheat RosterCheatCmd `command:"cheat" subcommands-optional:"true" description:"Quick strong consistency cheat-sheet" webicon:"fas fa-comment"`
	Help  HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*RosterCmd) Execute

func (c *RosterCmd) Execute(args []string) error

type RosterShowCmd

type RosterShowCmd struct {
	ClusterName TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes       TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	Namespace   string          `short:"m" long:"namespace" description:"Namespace name" default:"test"`
	Threads     int             `short:"t" long:"threads" description:"Threads to use" default:"10"`
	MaxRetries  int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep  time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help        HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*RosterShowCmd) Execute

func (c *RosterShowCmd) Execute(args []string) error

func (*RosterShowCmd) ShowRoster

func (c *RosterShowCmd) ShowRoster(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) error

ShowRoster displays the roster information for the specified cluster and namespace. This function performs the following operations: 1. Gets the list of nodes in the cluster 2. Runs roster command on all nodes to show current roster state 3. Displays the roster information for each node

Parameters:

  • system: The system instance for logging and backend operations
  • inventory: The backend inventory containing cluster information
  • logger: Logger instance for output
  • args: Command line arguments
  • action: The action being performed

Returns:

  • error: nil on success, or an error describing what failed

type ShowCommand

type ShowCommand string
const (
	ShowCommandSysinfo    ShowCommand = "showsysinfo"
	ShowCommandConf       ShowCommand = "showconf"
	ShowCommandInterrupts ShowCommand = "showinterrupts"
)

type ShowcommandsCmd

type ShowcommandsCmd struct {
	DestDir string  `short:"d" long:"destination" default:"/usr/local/bin/"`
	DryRun  bool    `long:"dry-run" description:"Do not run the command, just print it"`
	Help    HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*ShowcommandsCmd) Execute

func (c *ShowcommandsCmd) Execute(args []string) error

func (*ShowcommandsCmd) InstallShowcommands

func (c *ShowcommandsCmd) InstallShowcommands(log *logger.Logger) error

type SimpleModeAction

type SimpleModeAction int

SimpleModeAction indicates whether a rule shows or hides an item.

const (
	SimpleModeShow SimpleModeAction = iota
	SimpleModeHide
)

type SimpleModeConfig

type SimpleModeConfig struct {
	Rules        []SimpleModeRule
	ForceEnabled bool // from AEROLAB_FORCE_SIMPLE_MODE
}

SimpleModeConfig holds the parsed simple mode configuration.

func LoadSimpleModeConfig

func LoadSimpleModeConfig() (*SimpleModeConfig, error)

LoadSimpleModeConfig reads AEROLAB_SIMPLE_MODE and AEROLAB_FORCE_SIMPLE_MODE environment variables and returns a SimpleModeConfig. Returns nil if neither env var is set.

func (*SimpleModeConfig) ApplyToCommandTree

func (c *SimpleModeConfig) ApplyToCommandTree(root *CommandInfo)

ApplyToCommandTree walks the CommandInfo tree and overrides SimpleMode fields based on the config rules. This is used by the WebUI to customize the command tree before serving it to the frontend. The root node is the synthetic "aerolab" node; paths in the config file start from the first-level commands (e.g. "cluster", not "aerolab.cluster"), so we skip the root and start recursion from its children with an empty parent path.

func (*SimpleModeConfig) CheckCommandAllowed

func (c *SimpleModeConfig) CheckCommandAllowed(path string) error

CheckCommandAllowed returns an error if the given command path is not allowed in simple mode. Only enforced when ForceEnabled is true. The path should use dots as separators (e.g. "cluster.create").

func (*SimpleModeConfig) CheckParameterAllowed

func (c *SimpleModeConfig) CheckParameterAllowed(cmdPath string, paramLong string, structTagSimpleMode bool) error

CheckParameterAllowed checks if a specific parameter was changed from its default when it is hidden in simple mode. Returns an error if a hidden parameter was explicitly set. Only enforced when ForceEnabled is true.

func (*SimpleModeConfig) HideBlockedCommands

func (c *SimpleModeConfig) HideBlockedCommands(parser *flags.Parser)

HideBlockedCommands walks the go-flags parser's command tree and sets Hidden=true on commands that are blocked by simple mode rules. This ensures the CLI help output only shows allowed commands. It also hides blocked options from help. The go-flags library still allows hidden commands to be invoked (they are just omitted from help); actual enforcement happens via CheckCommandAllowed after parsing.

func (*SimpleModeConfig) IsAllowed

func (c *SimpleModeConfig) IsAllowed(path string) *bool

IsAllowed checks the rules to determine if the given path should be shown or hidden in simple mode. Returns nil if no rule matches (caller should use the struct tag default), a pointer to true if shown, or a pointer to false if hidden. The path should use dots as separators and be lowercase (e.g. "cluster.create.name").

type SimpleModeRule

type SimpleModeRule struct {
	Action  SimpleModeAction
	Pattern string // normalized to lowercase, e.g. "cluster.create.name" or "all" or "agi.*"
}

SimpleModeRule represents a single rule from the simple mode config file.

type System

type System struct {
	// Logger is set as part of the Initialize function call, after-init functions can use it to log messages
	Logger *logger.Logger
	// all available commands
	Opts *Commands
	// flag parser
	Parser *flags.Parser
	// config file parser
	IniParser *flags.IniParser
	// tail arguments
	Tail []string
	// backend
	Backend backends.Backend

	// init options are saved here
	InitOptions *Init
	// init time
	InitTime time.Time
	// log buffer
	LogBuffer chan string
	// log buffer truncated
	LogBufferTruncated bool
	// simple mode configuration (loaded from AEROLAB_SIMPLE_MODE env var)
	SimpleModeConfig *SimpleModeConfig
	// contains filtered or unexported fields
}

func Initialize

func Initialize(i *Init, command []string, params any, args ...string) (*System, error)

func (*System) ApplyDefaults

func (s *System) ApplyDefaults()

ApplyDefaults applies struct-tag default values to all command options. This is called automatically during Initialize when SkipArgsParsing is true, ensuring that system.Opts fields like Cluster.Create.DistroName have their declared defaults (e.g. "ubuntu") rather than Go zero values.

func (*System) GetBackend

func (s *System) GetBackend(pollInventoryHourly bool) error

force (re)initialize the backend

func (*System) WriteConfigFile

func (s *System) WriteConfigFile() error

type TemplateCmd

type TemplateCmd struct {
	Create  TemplateCreateCmd  `command:"create" subcommands-optional:"true" description:"Create a template" webicon:"fas fa-plus" invwebforce:"true"`
	List    TemplateListCmd    `command:"list" subcommands-optional:"true" description:"List templates" webicon:"fas fa-list"`
	Destroy TemplateDestroyCmd `command:"destroy" subcommands-optional:"true" description:"Destroy a template" webicon:"fas fa-trash" invwebforce:"true"`
	Vacuum  TemplateVacuumCmd  `command:"vacuum" subcommands-optional:"true" description:"Vacuum a template" webicon:"fas fa-broom"`
	Help    HelpCmd            `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TemplateCmd) Execute

func (c *TemplateCmd) Execute(args []string) error

type TemplateCreateCmd

type TemplateCreateCmd struct {
	Distro             string        `short:"d" long:"distro" description:"Distro to create the template for" default:"ubuntu"`
	DistroVersion      string        `short:"v" long:"distro-version" description:"Version of the distro to create the template for" default:"latest"`
	Arch               string        `short:"a" long:"arch" description:"Architecture to create the template for; empty=auto-detect from host/backend" default:""`
	AerospikeVersion   string        `short:"A" long:"aerospike-version" description:"Aerospike version to create the template for" default:"latest"`
	Owner              string        `short:"o" long:"owner" description:"Owner of the template"`
	DisablePublicIP    bool          `long:"aws.no-public-ip" description:"Disable public IP assignment to the instances in AWS"`
	GCPDisablePublicIP bool          `long:"gcp.no-public-ip" description:"Disable public IP assignment to the instances in GCP"`
	GCPVPC             string        `long:"gcp.vpc" description:"GCP VPC network name to use; empty=default VPC"`
	GCPSubnet          string        `long:"gcp.subnet" description:"GCP subnet name within the selected VPC; empty=auto-select first subnet in the zone's region"`
	Timeout            int           `short:"t" long:"timeout" description:"Set timeout in minutes for the template creation" default:"10"`
	DryRun             bool          `long:"dry-run" description:"Do not actually create the template, just run the basic checks"`
	NoVacuum           bool          `short:"V" long:"no-vacuum" description:"Do not vacuum an existing template creation instance on failure"`
	MaxRetries         int           `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep         time.Duration `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help               HelpCmd       `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TemplateCreateCmd) CreateTemplate

func (c *TemplateCreateCmd) CreateTemplate(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) (name string, err error)

func (*TemplateCreateCmd) Execute

func (c *TemplateCreateCmd) Execute(args []string) error

type TemplateDestroyCmd

type TemplateDestroyCmd struct {
	Distro           string  `short:"d" long:"distro" description:"Distro to destroy the template for"`
	DistroVersion    string  `short:"v" long:"distro-version" description:"Version of the distro to destroy the template for"`
	Arch             string  `short:"a" long:"arch" description:"Architecture to destroy the template for"`
	AerospikeVersion string  `short:"A" long:"aerospike-version" description:"Aerospike version to destroy the template for"`
	Force            bool    `short:"f" long:"force" description:"Force the destruction of the template - do not ask for confirmation"`
	DryRun           bool    `long:"dry-run" description:"Do not actually destroy the template, just run the basic checks"`
	Help             HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TemplateDestroyCmd) DestroyTemplate

func (c *TemplateDestroyCmd) DestroyTemplate(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string) error

func (*TemplateDestroyCmd) Execute

func (c *TemplateDestroyCmd) Execute(args []string) error

type TemplateListCmd

type TemplateListCmd struct {
	Output     string   `` /* 130-byte string literal not displayed */
	TableTheme string   `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool     `short:"p" long:"pager" description:"Use a pager to display the output"`
	Help       HelpCmd  `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TemplateListCmd) Execute

func (c *TemplateListCmd) Execute(args []string) error

func (*TemplateListCmd) ListTemplate

func (c *TemplateListCmd) ListTemplate(system *System, inventory *backends.Inventory, args []string) error

type TemplateVacuumCmd

type TemplateVacuumCmd struct {
	DryRun bool    `long:"dry-run" description:"Do not actually run the vacuum, just run the basic checks"`
	Help   HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TemplateVacuumCmd) Execute

func (c *TemplateVacuumCmd) Execute(args []string) error

func (*TemplateVacuumCmd) VacuumTemplate

func (c *TemplateVacuumCmd) VacuumTemplate(system *System, inventory *backends.Inventory, args []string) error

type TlsCmd

type TlsCmd struct {
	Generate TlsGenerateCmd `command:"generate" subcommands-optional:"true" description:"Generate TLS certificates" webicon:"fas fa-passport"`
	Copy     TlsCopyCmd     `command:"copy" subcommands-optional:"true" description:"Copy certificates to other nodes or clusters" webicon:"fas fa-copy"`
	Help     HelpCmd        `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TlsCmd) Execute

func (c *TlsCmd) Execute(args []string) error

type TlsCopyCmd

type TlsCopyCmd struct {
	SourceClusterName      TypeClusterName `short:"s" long:"source" description:"Source cluster name" default:"asd"`
	SourceNode             TypeNode        `short:"l" long:"source-node" description:"Source node from which to copy the TLS certificates" default:"1"`
	DestinationClusterName TypeClusterName `short:"d" long:"destination" description:"Destination cluster name" default:"client"`
	DestinationNodeList    TypeNodes       `` /* 139-byte string literal not displayed */
	TlsName                string          `short:"t" long:"tls-name" description:"Common Name (tlsname)" default:"tls1"`
	Threads                int             `long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries             int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep             time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help                   HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TlsCopyCmd) CopyTLS

func (c *TlsCopyCmd) CopyTLS(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

func (*TlsCopyCmd) Execute

func (c *TlsCopyCmd) Execute(args []string) error

type TlsGenerateCmd

type TlsGenerateCmd struct {
	ClusterName    TypeClusterName `short:"n" long:"name" description:"Cluster names, comma separated" default:"asd"`
	Nodes          TypeNodes       `short:"l" long:"nodes" description:"Nodes list, comma separated. Empty=ALL" default:""`
	TlsName        string          `short:"t" long:"tls-name" description:"Common Name (tlsname)" default:"tls1"`
	CaName         string          `short:"c" long:"ca-name" description:"Name of the CA certificate (file)" default:"cacert"`
	Bits           int             `short:"b" long:"cert-bits" description:"Bits size for the CA and certs" default:"2048"`
	CaExpiryDays   int             `short:"e" long:"ca-expiry-days" description:"Number of days the CA certificate should be valid for" default:"3650"`
	CertExpiryDays int             `short:"E" long:"cert-expiry-days" description:"Number of days the certificate should be valid for" default:"365"`
	NoUpload       bool            `` /* 135-byte string literal not displayed */
	NoMesh         bool            `short:"m" long:"no-mesh" description:"If set, will not configure mesh-seed-address-port to use TLS"`
	ChDir          string          `` /* 162-byte string literal not displayed */
	Threads        int             `long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries     int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep     time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help           HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*TlsGenerateCmd) Execute

func (c *TlsGenerateCmd) Execute(args []string) error

func (*TlsGenerateCmd) GenerateTLS

func (c *TlsGenerateCmd) GenerateTLS(system *System, inventory *backends.Inventory, logger *logger.Logger, args []string, action string) (backends.InstanceList, error)

type TypeAerospikeVersion

type TypeAerospikeVersion string

func (*TypeAerospikeVersion) Complete

func (t *TypeAerospikeVersion) Complete(match string) []flags.Completion

func (*TypeAerospikeVersion) String

func (t *TypeAerospikeVersion) String() string

type TypeAgiClusterName

type TypeAgiClusterName string

func (*TypeAgiClusterName) Complete

func (t *TypeAgiClusterName) Complete(match string) []flags.Completion

func (*TypeAgiClusterName) GetInstanceList

func (t *TypeAgiClusterName) GetInstanceList(inventory *backends.Inventory, interactiveStates ...backends.LifeCycleState) (backends.Instances, error)

func (*TypeAgiClusterName) Require

func (t *TypeAgiClusterName) Require(inventory *backends.Inventory, states ...backends.LifeCycleState) error

Require ensures an AGI name was given, offering the existing AGI instances to pick from when running interactively.

func (*TypeAgiClusterName) String

func (t *TypeAgiClusterName) String() string

type TypeClientName

type TypeClientName string

func (*TypeClientName) Complete

func (t *TypeClientName) Complete(match string) []flags.Completion

func (*TypeClientName) GetInstanceList

func (t *TypeClientName) GetInstanceList(inventory *backends.Inventory, interactiveStates ...backends.LifeCycleState) (backends.Instances, error)

func (*TypeClientName) Require

func (t *TypeClientName) Require(inventory *backends.Inventory, states ...backends.LifeCycleState) error

Require ensures a client group name was given, offering the existing client groups to pick from when running interactively.

func (*TypeClientName) String

func (t *TypeClientName) String() string

type TypeClientVersion

type TypeClientVersion string

func (*TypeClientVersion) Complete

func (t *TypeClientVersion) Complete(match string) []flags.Completion

func (*TypeClientVersion) String

func (t *TypeClientVersion) String() string

type TypeClusterName

type TypeClusterName string

func (*TypeClusterName) Complete

func (t *TypeClusterName) Complete(match string) []flags.Completion

func (*TypeClusterName) GetInstanceList

func (t *TypeClusterName) GetInstanceList(inventory *backends.Inventory, interactiveStates ...backends.LifeCycleState) (backends.Instances, error)

func (*TypeClusterName) Require

func (t *TypeClusterName) Require(inventory *backends.Inventory, states ...backends.LifeCycleState) error

Require ensures a cluster name was given. When it is missing and we are running interactively, the user picks one of the clusters that exist in the inventory; otherwise the usual required-option error is returned.

func (*TypeClusterName) String

func (t *TypeClusterName) String() string

type TypeDistro

type TypeDistro string

func (*TypeDistro) Complete

func (t *TypeDistro) Complete(match string) []flags.Completion

func (*TypeDistro) String

func (t *TypeDistro) String() string

type TypeDistroVersion

type TypeDistroVersion string

func (*TypeDistroVersion) Complete

func (t *TypeDistroVersion) Complete(match string) []flags.Completion

func (*TypeDistroVersion) String

func (t *TypeDistroVersion) String() string

type TypeExistsAction

type TypeExistsAction string

func (*TypeExistsAction) Complete

func (t *TypeExistsAction) Complete(match string) []flags.Completion

func (*TypeExistsAction) String

func (t *TypeExistsAction) String() string

type TypeExpiry

type TypeExpiry time.Duration

TypeExpiry is a time.Duration that supports calendar-aware Y (years), M (months) and fixed W (weeks), D (days) units in addition to standard Go duration units.

func (TypeExpiry) Duration

func (t TypeExpiry) Duration() time.Duration

func (TypeExpiry) MarshalFlag

func (t TypeExpiry) MarshalFlag() (string, error)

func (TypeExpiry) String

func (t TypeExpiry) String() string

func (*TypeExpiry) UnmarshalFlag

func (t *TypeExpiry) UnmarshalFlag(value string) error

type TypeFilterRange

type TypeFilterRange string

func (TypeFilterRange) Expand

func (f TypeFilterRange) Expand() ([]int, error)

type TypeHBMode

type TypeHBMode string

func (*TypeHBMode) Complete

func (t *TypeHBMode) Complete(match string) []flags.Completion

func (*TypeHBMode) String

func (t *TypeHBMode) String() string

type TypeMachines

type TypeMachines string

func (*TypeMachines) String

func (t *TypeMachines) String() string

type TypeNetBlockOn

type TypeNetBlockOn string

func (*TypeNetBlockOn) Complete

func (t *TypeNetBlockOn) Complete(match string) []flags.Completion

func (*TypeNetBlockOn) String

func (t *TypeNetBlockOn) String() string

type TypeNetLossAction

type TypeNetLossAction string

func (*TypeNetLossAction) Complete

func (t *TypeNetLossAction) Complete(match string) []flags.Completion

func (*TypeNetLossAction) String

func (t *TypeNetLossAction) String() string

type TypeNetStatisticMode

type TypeNetStatisticMode string

func (*TypeNetStatisticMode) Complete

func (t *TypeNetStatisticMode) Complete(match string) []flags.Completion

func (*TypeNetStatisticMode) String

func (t *TypeNetStatisticMode) String() string

type TypeNetType

type TypeNetType string

func (*TypeNetType) Complete

func (t *TypeNetType) Complete(match string) []flags.Completion

func (*TypeNetType) String

func (t *TypeNetType) String() string

type TypeNode

type TypeNode int // depends on cluster name, will not autocomplete

func (*TypeNode) Int

func (t *TypeNode) Int() int

type TypeNodes

type TypeNodes string // depends on cluster name, will not autocomplete

func (*TypeNodes) String

func (t *TypeNodes) String() string

type TypeNodesPlusAllOption

type TypeNodesPlusAllOption string // depends on cluster name, will not autocomplete

func (*TypeNodesPlusAllOption) String

func (t *TypeNodesPlusAllOption) String() string

type TypeXDRVersion

type TypeXDRVersion string

func (*TypeXDRVersion) Complete

func (t *TypeXDRVersion) Complete(match string) []flags.Completion

func (*TypeXDRVersion) String

func (t *TypeXDRVersion) String() string

type TypeYesNo

type TypeYesNo string

func (*TypeYesNo) Complete

func (t *TypeYesNo) Complete(match string) []flags.Completion

func (*TypeYesNo) String

func (t *TypeYesNo) String() string

type UpgradeCmd

type UpgradeCmd struct {
	Edge    bool    `long:"edge" description:"Include pre-releases when discovering versions"`
	Major   bool    `long:"major" description:"Upgrade to the next major version prerelease if available (v8); WARN: this may break things"`
	DryRun  bool    `long:"dry-run" description:"Set to show the upgrade source URL and destination path, do not upgrade"`
	Force   bool    `` /* 130-byte string literal not displayed */
	Version string  `short:"v" long:"version" description:"Version to upgrade to" hidden:"true"`
	Help    HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*UpgradeCmd) CheckForUpgrade

func (c *UpgradeCmd) CheckForUpgrade() (install bool, latestVersionString string, latest *github.Release, err error)

func (*UpgradeCmd) Execute

func (c *UpgradeCmd) Execute(args []string) error

func (*UpgradeCmd) UpgradeAerolab

func (c *UpgradeCmd) UpgradeAerolab(log *logger.Logger) error

type VPCPeeringStatusEntry

type VPCPeeringStatusEntry struct {
	VpcId          string           `json:"vpcId"`
	PeeringId      string           `json:"peeringId,omitempty"`
	CloudStatus    string           `json:"cloudStatus,omitempty"`
	Status         string           `json:"status"` // "OK", "INCOMPLETE", "FAILED"
	CompletedSteps int              `json:"completedSteps"`
	TotalSteps     int              `json:"totalSteps"`
	Steps          []VPCPeeringStep `json:"steps"`
}

VPCPeeringStatusEntry represents the status of a single VPC peering

type VPCPeeringStatusResponse

type VPCPeeringStatusResponse struct {
	ClusterID string                  `json:"clusterId"`
	Peerings  []VPCPeeringStatusEntry `json:"peerings"`
}

VPCPeeringStatusResponse represents the full status response

type VPCPeeringStep

type VPCPeeringStep struct {
	Name   string `json:"name"`
	Status string `json:"status"` // "OK", "PENDING", "NOT_STARTED", "FAILED", "UNKNOWN"
	Error  string `json:"error,omitempty"`
}

VPCPeeringStep represents a single step in the VPC peering process

type VersionCmd

type VersionCmd struct {
	NoUpgradeCheck bool    `short:"n" long:"no-upgrade-check" description:"Do not check for upgrades"`
	Help           HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VersionCmd) Execute

func (c *VersionCmd) Execute(args []string) error

func (*VersionCmd) GetVersion

func (c *VersionCmd) GetVersion() error

type VolumeInstanceFilter

type VolumeInstanceFilter struct {
	InstanceName string `long:"instance-name" description:"Instance name"`
	ClusterName  string `long:"cluster-name" description:"Cluster name"`
	NodeNo       int    `long:"node-no" description:"Node number"`
}

type VolumesAddTagsCmd

type VolumesAddTagsCmd struct {
	Filter VolumesListFilter `group:"Filters" namespace:"filter"`
	Tags   []string          `short:"t" long:"tag" description:"Tags to add to the volumes, format: k=v"`
	Help   HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesAddTagsCmd) AddTags

func (c *VolumesAddTagsCmd) AddTags(system *System, inventory *backends.Inventory, args []string) error

func (*VolumesAddTagsCmd) Execute

func (c *VolumesAddTagsCmd) Execute(args []string) error

type VolumesAttachCmd

type VolumesAttachCmd struct {
	Filter                           VolumesListFilter    `group:"Filters" namespace:"filter"`
	Instance                         VolumeInstanceFilter `group:"Instance" namespace:"instance"`
	SharedVolumeFIPS                 bool                 `long:"shared-fips" description:"Enable FIPS mode for the shared volume"`
	SharedVolumeMountTargetDirectory string               `long:"shared-target" description:"Mount target directory for the shared volume"`
	Help                             HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesAttachCmd) AttachVolumes

func (c *VolumesAttachCmd) AttachVolumes(system *System, inventory *backends.Inventory, args []string) error

func (*VolumesAttachCmd) Execute

func (c *VolumesAttachCmd) Execute(args []string) error

type VolumesCmd

type VolumesCmd struct {
	Create     VolumesCreateCmd     `` /* 141-byte string literal not displayed */
	List       VolumesListCmd       `command:"list" subcommands-optional:"true" description:"List volumes" webicon:"fas fa-list" simplemode:"false"`
	Attach     VolumesAttachCmd     `` /* 130-byte string literal not displayed */
	Resize     VolumesResizeCmd     `` /* 204-byte string literal not displayed */
	Detach     VolumesDetachCmd     `` /* 149-byte string literal not displayed */
	AddTags    VolumesAddTagsCmd    `command:"add-tags" subcommands-optional:"true" description:"Add tags to volumes" webicon:"fas fa-tags" simplemode:"false"`
	RemoveTags VolumesRemoveTagsCmd `` /* 129-byte string literal not displayed */
	Delete     VolumesDeleteCmd     `` /* 135-byte string literal not displayed */
	Help       HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesCmd) Execute

func (c *VolumesCmd) Execute(args []string) error

type VolumesCreateCmd

type VolumesCreateCmd struct {
	Name            string                 `short:"n" long:"name" description:"Name of the volume"`
	Description     string                 `short:"d" long:"description" description:"Description of the volume"`
	Owner           string                 `short:"o" long:"owner" description:"Owner of the volume"`
	Tags            []string               `short:"t" long:"tag" description:"Tags to add to the volume, format: k=v"`
	VolumeType      string                 `long:"type" description:"Type of volume to create: attached or shared"`
	NoInstallExpiry bool                   `long:"no-install-expiry" description:"Do not install the expiry system, even if volume expiry is set"`
	AWS             VolumesCreateCmdAws    `group:"AWS" description:"backend-aws" namespace:"aws"`
	GCP             VolumesCreateCmdGcp    `group:"GCP" description:"backend-gcp" namespace:"gcp"`
	Docker          VolumesCreateCmdDocker `group:"Docker" description:"backend-docker" namespace:"docker"`
	DryRun          bool                   `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	Help            HelpCmd                `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesCreateCmd) CreateVolumes

func (c *VolumesCreateCmd) CreateVolumes(system *System, inventory *backends.Inventory, args []string) (*backends.Volume, error)

func (*VolumesCreateCmd) Execute

func (c *VolumesCreateCmd) Execute(args []string) error

type VolumesCreateCmdAws

type VolumesCreateCmdAws struct {
	SizeGiB           int        `long:"size" description:"Size of the volume in GB"`
	Placement         string     `long:"placement" description:"Placement of the volume"`
	DiskType          string     `long:"disk-type" description:"Type of disk to use"`
	Iops              int        `long:"iops" description:"Iops of the volume"`
	Throughput        int        `long:"throughput" description:"Throughput of the volume"`
	Encrypted         bool       `long:"encrypted" description:"Whether the volume is encrypted"`
	SharedDiskOneZone bool       `long:"shared-disk-one-zone" description:"Whether the volume is shared in one zone"`
	Expire            TypeExpiry `long:"expire" description:"Expire the volume in a given time; Y/M/W/D/h/m/s, ex 1D12h 2W 1Y6M" default:"30h"`
}

type VolumesCreateCmdDocker

type VolumesCreateCmdDocker struct {
	Driver string `long:"driver" description:"Driver to use for the volume"`
}

type VolumesCreateCmdGcp

type VolumesCreateCmdGcp struct {
	SizeGiB    int        `long:"size" description:"Size of the volume in GB"`
	Zone       guiZone    `long:"zone" description:"Zone of the volume" webchoice:"method::List"`
	DiskType   string     `long:"disk-type" description:"Type of disk to use"`
	Iops       int        `long:"iops" description:"Iops of the volume"`
	Throughput int        `long:"throughput" description:"Throughput of the volume"`
	Expire     TypeExpiry `long:"expire" description:"Expire the volume in a given time; Y/M/W/D/h/m/s, ex 1D12h 2W 1Y6M" default:"30h"`
}

type VolumesDeleteCmd

type VolumesDeleteCmd struct {
	Filter VolumesListFilter `group:"Filters" namespace:"filter"`
	Force  bool              `long:"force" description:"Force delete, even if the volume is in use"`
	DryRun bool              `long:"dry-run" description:"Dry run, print what would be done but don't do it"`
	Help   HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesDeleteCmd) DeleteVolumes

func (c *VolumesDeleteCmd) DeleteVolumes(system *System, inventory *backends.Inventory, args []string) error

func (*VolumesDeleteCmd) Execute

func (c *VolumesDeleteCmd) Execute(args []string) error

type VolumesDetachCmd

type VolumesDetachCmd struct {
	Filter   VolumesListFilter    `group:"Filters" namespace:"filter"`
	Instance VolumeInstanceFilter `group:"Instance" namespace:"instance"`
	Help     HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesDetachCmd) DetachVolumes

func (c *VolumesDetachCmd) DetachVolumes(system *System, inventory *backends.Inventory, args []string) error

func (*VolumesDetachCmd) Execute

func (c *VolumesDetachCmd) Execute(args []string) error

type VolumesListCmd

type VolumesListCmd struct {
	Output     string            `` /* 130-byte string literal not displayed */
	TableTheme string            `short:"t" long:"table-theme" description:"Table theme (default, frame, box)" default:"default"`
	SortBy     []string          `short:"s" long:"sort-by" description:"Can be specified multiple times. Sort by format: FIELDNAME:asc|dsc|ascnum|dscnum"`
	Pager      bool              `short:"p" long:"pager" description:"Use a pager to display the output"`
	Filters    VolumesListFilter `group:"Filters" namespace:"filter"`
	Help       HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesListCmd) Execute

func (c *VolumesListCmd) Execute(args []string) error

func (*VolumesListCmd) ListVolumes

func (c *VolumesListCmd) ListVolumes(system *System, inventory *backends.Inventory, args []string, out io.Writer, page *pager.Pager) error

type VolumesListFilter

type VolumesListFilter struct {
	Backend string   `short:"b" long:"backend" description:"Filter by backend type"`
	Name    string   `short:"N" long:"name" description:"Filter by name of the volume"`
	Owner   string   `short:"O" long:"owner" description:"Filter by owner of the volume"`
	Type    string   `short:"T" long:"type" description:"Filter by type of volume (shared/attached)"`
	Zone    string   `short:"z" long:"zone" description:"Filter by zone of the volume (zone name)"`
	State   string   `short:"S" long:"state" description:"Filter by state of the volume (attached/detached); default: all"`
	Tags    []string `long:"tag" description:"Filter by tag of the volume, as k=v"`
}

type VolumesRemoveTagsCmd

type VolumesRemoveTagsCmd struct {
	Filter VolumesListFilter `group:"Filters" namespace:"filter"`
	Tags   []string          `short:"t" long:"tag" description:"Tag name to remove from the volumes"`
	Help   HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesRemoveTagsCmd) Execute

func (c *VolumesRemoveTagsCmd) Execute(args []string) error

func (*VolumesRemoveTagsCmd) RemoveTags

func (c *VolumesRemoveTagsCmd) RemoveTags(system *System, inventory *backends.Inventory, args []string) error

type VolumesResizeCmd

type VolumesResizeCmd struct {
	Filter    VolumesListFilter `group:"Filters" namespace:"filter"`
	NewSizeGB int               `long:"new-size-gb" description:"New size of the volume in GiB"`
	Help      HelpCmd           `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*VolumesResizeCmd) Execute

func (c *VolumesResizeCmd) Execute(args []string) error

func (*VolumesResizeCmd) ResizeVolumes

func (c *VolumesResizeCmd) ResizeVolumes(system *System, inventory *backends.Inventory, args []string) error

type WebUICmd

type WebUICmd struct {
	ListenAddr    string `short:"l" long:"listen" default:"127.0.0.1:3333" description:"Address to listen on (host:port)"`
	HTTPS         bool   `long:"https" description:"Enable HTTPS listener"`
	CertFile      string `long:"cert" description:"Path to TLS certificate file (required if --https)"`
	KeyFile       string `long:"key" description:"Path to TLS key file (required if --https)"`
	AuthType      string `long:"auth" default:"none" description:"Authentication type: none|basic|token"`
	BasicAuthUser string `long:"basic-user" default:"admin" description:"Basic auth username"`
	BasicAuthPass string `long:"basic-pass" default:"" description:"Basic auth password" telemetry:"redact"`
	TokenAuthPath string `long:"token-path" default:"" description:"Path to file containing valid tokens (one per line)"`

	InsecureAllowRemoteNoAuth bool `` /* 193-byte string literal not displayed */

	CORSOrigins  string `long:"cors-origins" default:"*" description:"Comma-separated list of allowed CORS origins"`
	ReadTimeout  int    `long:"read-timeout" default:"300" description:"HTTP read timeout in seconds"`
	WriteTimeout int    `long:"write-timeout" default:"300" description:"HTTP write timeout in seconds"`
	UserHeader   string `` /* 158-byte string literal not displayed */
	WebRoot      string `` /* 131-byte string literal not displayed */

	// File browser / upload settings
	BlockServerLs      bool   `long:"block-server-ls" description:"Block file exploration on the server altogether"`
	AllowLsEverywhere  bool   `long:"always-server-ls" description:"By default server file browser only works on localhost; enable to allow from everywhere"`
	MaxUploadSizeBytes int    `` /* 144-byte string literal not displayed */
	UploadTempDir      string `long:"upload-temp-dir" description:"Temporary directory for file uploads (default: {aerolabRoot}/web.tmp)"`

	// Inventory refresh
	MinimumInterval string `long:"minimum-interval" default:"10s" description:"minimum interval between inventory refreshes (avoid API limit exhaustion)"`

	// Job limits
	MaxConcurrentJob int `long:"max-concurrent-job" default:"5" description:"Max number of jobs to run concurrently"`
	MaxQueuedJob     int `long:"max-queued-job" default:"10" description:"Max number of jobs to queue for execution"`
	ShowMaxHistory   int `long:"show-max-history" default:"100" description:"show only this amount of completed historical items max"`

	// Firewall
	UniqueFirewalls bool `long:"unique-firewalls" hidden:"true" webhidden:"true" description:"deprecated: per-username firewalls are always used"`

	// AGI
	AgiStrictTls bool `long:"agi-strict-tls" description:"when performing inventory lookup, expect valid AGI certificates"`

	// WebSocket proxy
	WsProxyOrigin string `` /* 139-byte string literal not displayed */

	// Simple mode
	ForceSimpleMode bool `long:"force-simple-mode" description:"force use of simple mode, limiting the number of features and switches that show up"`

	// Page title
	PageTitle string `long:"page-title" default:"AeroLab Web UI" description:"change the title of the webpages"`

	// Inventory polling
	RefreshInterval string `long:"refresh-interval" default:"30s" description:"change interval at which the inventory is refreshed in the background"`

	// Browser options
	NoBrowser bool `long:"nobrowser" description:"Do not automatically open the browser on startup"`

	// Config file for parameter overrides
	ConfigFile string `long:"config" description:"Path to YAML config file for WebUI parameter overrides (choices, defaults, visibility)"`

	// Job lifecycle options
	HistoryExpires  string `long:"history-expires" default:"72h" description:"time to keep job from their start in history"`
	MaxJobRuntime   string `` /* 137-byte string literal not displayed */
	CleanupInterval string `long:"cleanup-interval" default:"1h" description:"How often to run cleanup of old jobs"`

	// AGI Monitor (embedded)
	AgiMonitorEnable bool                `long:"agi-monitor-enable" description:"Enable built-in AGI monitor for auto-sizing and spot rotation"`
	AgiMonitor       AgiMonitorConfigCmd `group:"AGI Monitor" namespace:"agi-monitor" description:"AGI Monitor configuration (requires --agi-monitor-enable)"`

	// Subcommands
	Exec WebUIExecCmd `command:"exec" subcommands-optional:"true" description:"Execute command (internal use)" hidden:"true"`
	Help HelpCmd      `command:"help" subcommands-optional:"true" description:"Print help"`
	// contains filtered or unexported fields
}

WebUICmd runs the AeroLab REST API server. This provides a REST interface to all aerolab commands, enabling: - Command exploration (list commands, parameters, metadata) - Asynchronous command execution via JSON payloads with job tracking - File upload/download streaming - Job status monitoring and log streaming

func (*WebUICmd) Execute

func (c *WebUICmd) Execute(args []string) error

type WebUIConfig

type WebUIConfig struct {
	Overrides map[string]map[string]ParameterOverride `yaml:"overrides"`
}

WebUIConfig holds the external configuration file structure for WebUI parameter overrides.

type WebUIExecCmd

type WebUIExecCmd struct {
	Help HelpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

WebUIExecCmd is a hidden command that executes commands in subprocess mode. It reads command path and parameters from stdin as JSON, executes the command, and outputs all logs to stdout/stderr for the parent process to capture. This command should never be called directly by users.

func (*WebUIExecCmd) Execute

func (c *WebUIExecCmd) Execute(args []string) error

type XdrCmd

type XdrCmd struct {
	Connect        XdrConnectCmd        `command:"connect" subcommands-optional:"true" description:"Connect clusters and namespaces via XDR" webicon:"fas fa-link"`
	CreateClusters XdrCreateClustersCmd `` /* 130-byte string literal not displayed */
	Help           HelpCmd              `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*XdrCmd) Execute

func (c *XdrCmd) Execute(args []string) error

type XdrConnectCmd

type XdrConnectCmd struct {
	SourceClusterName       TypeClusterName `short:"s" long:"source" description:"Source Cluster name" default:"asd-source"`
	DestinationClusterNames TypeClusterName `short:"D" long:"destinations" description:"Destination Cluster names, comma separated" default:"asd-dest"`
	IsConnector             bool            `short:"c" long:"connector" description:"Set to indicate that the destination is a client connector, not a cluster"`
	Version                 TypeXDRVersion  `` /* 133-byte string literal not displayed */
	Restart                 TypeYesNo       `short:"T" long:"restart-source" description:"Restart source nodes after connecting (y/n)" default:"y" webchoice:"y,n"`
	Namespaces              string          `short:"M" long:"namespaces" description:"Comma-separated list of namespaces to connect" default:"test"`
	CustomDestinationPort   int             `short:"P" long:"destination-port" description:"Optionally specify a custom destination port for the xdr connection"`
	ParallelThreads         int             `short:"t" long:"threads" description:"Number of parallel threads to use for the execution" default:"10"`
	MaxRetries              int             `long:"max-retries" description:"Maximum number of retries for transient SSH/SFTP failures" default:"1" simplemode:"false"`
	RetrySleep              time.Duration   `long:"retry-sleep" description:"Sleep duration between retries" default:"5s" simplemode:"false"`
	Help                    HelpCmd         `command:"help" subcommands-optional:"true" description:"Print help"`
}

func (*XdrConnectCmd) Execute

func (c *XdrConnectCmd) Execute(args []string) error

type XdrCreateClustersCmd

type XdrCreateClustersCmd struct {
	ClusterCreateCmd
	DestinationClusterNames TypeClusterName `short:"D" long:"destinations" description:"Comma-separated list of destination cluster names" default:"asd-dest"`
	DestinationNodeCount    int             `short:"C" long:"destination-count" description:"Number of nodes per destination cluster" default:"1"`
	XdrVersion              TypeXDRVersion  `` /* 133-byte string literal not displayed */
	XdrRestart              TypeYesNo       `short:"T" long:"restart-source" description:"Restart source nodes after connecting (y/n)" default:"y" webchoice:"y,n"`
	XdrNamespaces           string          `short:"M" long:"namespaces" description:"Comma-separated list of namespaces to connect" default:"test"`
	CustomDestinationPort   int             `short:"P" long:"destination-port" description:"Optionally specify a custom destination port for the xdr connection"`
}

func (*XdrCreateClustersCmd) Execute

func (c *XdrCreateClustersCmd) Execute(args []string) error

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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