Documentation
¶
Index ¶
- func FirewallAllowedPorts(meshListenPort int) []string
- func PublishTakodUpgrade(contract *nodeidentity.UpgradeContract, leaseToken string) error
- type ApkManager
- type AptManager
- type DnfManager
- type DockerRuntimeInfo
- type OSFamily
- type OSInfo
- type PackageManager
- type Provisioner
- func (p *Provisioner) AcquireTakodUpgradeCoordinatorLock(ttl time.Duration) error
- func (p *Provisioner) ActivateTakodUpgrade() error
- func (p *Provisioner) BeginTakodUpgrade(version string, localPath string, ...) error
- func (p *Provisioner) CheckRequirements() error
- func (p *Provisioner) CommitTakodUpgrade() error
- func (p *Provisioner) ConfigureFirewall(meshListenPort int) error
- func (p *Provisioner) HardenSecurity() error
- func (p *Provisioner) InstallDocker() error
- func (p *Provisioner) InstallMonitoringAgent() error
- func (p *Provisioner) InstallTakodBinary(version string) error
- func (p *Provisioner) InstallTakodBinaryFromFile(localPath string) error
- func (p *Provisioner) InstallTakodService(socket string, dataDir string, nodeName string) error
- func (p *Provisioner) InstallWireGuard() error
- func (p *Provisioner) RefreshTakodUpgradeCoordinatorLock(ttl time.Duration) error
- func (p *Provisioner) ReleaseTakodUpgradeCoordinatorLock() error
- func (p *Provisioner) RollbackTakodUpgrade() error
- func (p *Provisioner) SetOutput(w io.Writer)
- func (p *Provisioner) SetupDeployUser(username string) error
- func (p *Provisioner) UpdateSystem() error
- func (p *Provisioner) VerifyAutoRecovery() error
- func (p *Provisioner) VerifySupportedDockerRuntime() error
- func (p *Provisioner) VerifyTakodUpgradeServices(requirePlatformWorker bool) error
- type YumManager
- type ZypperManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirewallAllowedPorts ¶ added in v0.8.0
FirewallAllowedPorts lists the port/protocol pairs setup allows through UFW, in the order the rules are applied.
func PublishTakodUpgrade ¶ added in v0.10.0
func PublishTakodUpgrade(contract *nodeidentity.UpgradeContract, leaseToken string) error
PublishTakodUpgrade is executed by the checksum-verified candidate while its parent root shell holds the upgrade guard flock. It additionally holds the controller lifecycle barrier and the exact inventory publication lock across contract verification, rollback publication, and both binary renames.
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) 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) 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) Update ¶
func (d *DnfManager) Update() error
type DockerRuntimeInfo ¶ added in v0.4.36
type DockerRuntimeInfo struct {
ServerVersion string
RootDir string
SecurityOptions []string
Rootless bool
}
func DetectDockerRuntime ¶ added in v0.4.36
func DetectDockerRuntime(client commandExecutor) (*DockerRuntimeInfo, error)
type OSInfo ¶
OSInfo contains detected operating system information
func (*OSInfo) IsSupported ¶
IsSupported returns true if the OS is supported
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 ¶
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) AcquireTakodUpgradeCoordinatorLock ¶ added in v0.10.0
func (p *Provisioner) AcquireTakodUpgradeCoordinatorLock(ttl time.Duration) error
AcquireTakodUpgradeCoordinatorLock serializes staged upgrade coordinators on the authoritative controller. The token-bound lease rejects overlap while still allowing recovery after a dead CLI.
func (*Provisioner) ActivateTakodUpgrade ¶ added in v0.10.0
func (p *Provisioner) ActivateTakodUpgrade() error
ActivateTakodUpgrade restarts both services after their binary handoff.
func (*Provisioner) BeginTakodUpgrade ¶ added in v0.10.0
func (p *Provisioner) BeginTakodUpgrade(version string, localPath string, revalidate func() (*nodeidentity.UpgradeContract, error)) error
BeginTakodUpgrade publishes a verified candidate with a durable rollback copy. When the protected platform-worker binary exists it is included in the same transaction, so the deployment worker never remains permanently pinned to an older executable. An interrupted prior transaction is rolled back before a new one begins.
func (*Provisioner) CheckRequirements ¶
func (p *Provisioner) CheckRequirements() error
CheckRequirements checks if the server meets basic requirements
func (*Provisioner) CommitTakodUpgrade ¶ added in v0.10.0
func (p *Provisioner) CommitTakodUpgrade() error
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) RefreshTakodUpgradeCoordinatorLock ¶ added in v0.10.0
func (p *Provisioner) RefreshTakodUpgradeCoordinatorLock(ttl time.Duration) error
func (*Provisioner) ReleaseTakodUpgradeCoordinatorLock ¶ added in v0.10.0
func (p *Provisioner) ReleaseTakodUpgradeCoordinatorLock() error
func (*Provisioner) RollbackTakodUpgrade ¶ added in v0.10.0
func (p *Provisioner) RollbackTakodUpgrade() error
func (*Provisioner) SetOutput ¶ added in v0.8.0
func (p *Provisioner) SetOutput(w io.Writer)
SetOutput redirects provisioning progress output. Passing nil resets output to os.Stdout.
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
func (*Provisioner) VerifySupportedDockerRuntime ¶ added in v0.4.36
func (p *Provisioner) VerifySupportedDockerRuntime() error
func (*Provisioner) VerifyTakodUpgradeServices ¶ added in v0.10.0
func (p *Provisioner) VerifyTakodUpgradeServices(requirePlatformWorker bool) error
VerifyTakodUpgradeServices checks the protected handoff before rollback evidence is discarded. systemd starts both units from the newly published inode; a worker that immediately crashes therefore fails the transaction.
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) 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) Update ¶
func (z *ZypperManager) Update() error