provisioner

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApkManager

type ApkManager struct {
	// contains filtered or unexported fields
}

ApkManager manages packages using apk

func (*ApkManager) Install

func (ap *ApkManager) Install(packages ...string) error

func (*ApkManager) Remove

func (ap *ApkManager) Remove(packages ...string) error

func (*ApkManager) Search

func (ap *ApkManager) Search(packageName string) (bool, error)

func (*ApkManager) Update

func (ap *ApkManager) Update() error

type AptManager

type AptManager struct {
	// contains filtered or unexported fields
}

AptManager manages packages using apt/apt-get

func (*AptManager) Install

func (a *AptManager) Install(packages ...string) error

func (*AptManager) Remove

func (a *AptManager) Remove(packages ...string) error

func (*AptManager) Search

func (a *AptManager) Search(packageName string) (bool, error)

func (*AptManager) Update

func (a *AptManager) Update() error

type DnfManager

type DnfManager struct {
	// contains filtered or unexported fields
}

DnfManager manages packages using dnf

func (*DnfManager) Install

func (d *DnfManager) Install(packages ...string) error

func (*DnfManager) Remove

func (d *DnfManager) Remove(packages ...string) error

func (*DnfManager) Search

func (d *DnfManager) Search(packageName string) (bool, error)

func (*DnfManager) Update

func (d *DnfManager) Update() error

type OSFamily

type OSFamily string

OSFamily represents different Linux distribution families

const (
	OSFamilyDebian  OSFamily = "debian"
	OSFamilyRHEL    OSFamily = "rhel"
	OSFamilySUSE    OSFamily = "suse"
	OSFamilyAlpine  OSFamily = "alpine"
	OSFamilyUnknown OSFamily = "unknown"
)

type OSInfo

type OSInfo struct {
	Family         OSFamily
	Name           string
	Version        string
	PackageManager string
}

OSInfo contains detected operating system information

func DetectOS

func DetectOS(client *ssh.Client) (*OSInfo, error)

DetectOS detects the operating system of the remote server

func (*OSInfo) IsSupported

func (info *OSInfo) IsSupported() bool

IsSupported returns true if the OS is supported

func (*OSInfo) String

func (info *OSInfo) String() string

String returns a human-readable representation of the OS

type PackageManager

type PackageManager interface {
	Update() error
	Install(packages ...string) error
	Remove(packages ...string) error
	Search(packageName string) (bool, error)
}

PackageManager defines interface for OS package management

func NewPackageManager

func NewPackageManager(client *ssh.Client, osInfo *OSInfo, verbose bool) (PackageManager, error)

NewPackageManager creates a package manager for the detected OS

type Provisioner

type Provisioner struct {
	// contains filtered or unexported fields
}

Provisioner handles server provisioning

func NewProvisioner

func NewProvisioner(client *ssh.Client, verbose bool) *Provisioner

NewProvisioner creates a new provisioner

func (*Provisioner) CheckRequirements

func (p *Provisioner) CheckRequirements() error

CheckRequirements checks if the server meets basic requirements

func (*Provisioner) ConfigureFirewall

func (p *Provisioner) ConfigureFirewall(meshListenPort int) error

ConfigureFirewall configures UFW when available. Non-Debian cloud images commonly rely on provider firewalls instead of UFW; setup should not fail on those hosts merely because the ufw package is unavailable.

func (*Provisioner) HardenSecurity

func (p *Provisioner) HardenSecurity() error

HardenSecurity applies comprehensive security hardening

func (*Provisioner) InstallDocker

func (p *Provisioner) InstallDocker() error

InstallDocker installs and enables the container runtime used by takod.

func (*Provisioner) InstallMonitoringAgent

func (p *Provisioner) InstallMonitoringAgent() error

InstallMonitoringAgent installs the lightweight monitoring agent

func (*Provisioner) InstallTakodBinary added in v0.3.0

func (p *Provisioner) InstallTakodBinary(version string) error

func (*Provisioner) InstallTakodBinaryFromFile added in v0.3.0

func (p *Provisioner) InstallTakodBinaryFromFile(localPath string) error

func (*Provisioner) InstallTakodService added in v0.3.0

func (p *Provisioner) InstallTakodService(socket string, dataDir string, nodeName string) error

func (*Provisioner) InstallWireGuard added in v0.3.0

func (p *Provisioner) InstallWireGuard() error

func (*Provisioner) SetupDeployUser

func (p *Provisioner) SetupDeployUser(username string) error

SetupDeployUser ensures deploy user exists and has proper permissions

func (*Provisioner) UpdateSystem

func (p *Provisioner) UpdateSystem() error

UpdateSystem updates system packages

func (*Provisioner) VerifyAutoRecovery

func (p *Provisioner) VerifyAutoRecovery() error

VerifyAutoRecovery verifies that critical services are enabled for auto-recovery

type YumManager

type YumManager struct {
	// contains filtered or unexported fields
}

YumManager manages packages using yum

func (*YumManager) Install

func (y *YumManager) Install(packages ...string) error

func (*YumManager) Remove

func (y *YumManager) Remove(packages ...string) error

func (*YumManager) Search

func (y *YumManager) Search(packageName string) (bool, error)

func (*YumManager) Update

func (y *YumManager) Update() error

type ZypperManager

type ZypperManager struct {
	// contains filtered or unexported fields
}

ZypperManager manages packages using zypper

func (*ZypperManager) Install

func (z *ZypperManager) Install(packages ...string) error

func (*ZypperManager) Remove

func (z *ZypperManager) Remove(packages ...string) error

func (*ZypperManager) Search

func (z *ZypperManager) Search(packageName string) (bool, error)

func (*ZypperManager) Update

func (z *ZypperManager) Update() error

Jump to

Keyboard shortcuts

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