provision

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provision

func Provision(server, email string) error

Provision sets up a server with Docker, Traefik, and required infrastructure. All operations are idempotent and safe to run multiple times.

Steps performed: 1. Install Docker if not present 2. Install docker-rollout plugin if not present 3. Create traefik_web network 4. Create /stacks/traefik directory 5. Create acme.json with mode 600 6. Write Traefik compose.yaml with atomic write 7. Start Traefik with docker compose up -d

server: SSH host from ~/.ssh/config email: email for Let's Encrypt certificate registration

func ProvisionK3s added in v0.11.0

func ProvisionK3s(server, email string) error

ProvisionK3s sets up a server with K3s, nerdctl, buildkit, and Traefik ACME. All operations are idempotent and safe to run multiple times.

Steps performed: 1. Install K3s if not present 2. Wait for K3s to be ready 3. Install nerdctl if not present 4. Install buildkit if not active 5. Write nerdctl config for K3s containerd socket 6. Configure Traefik ACME via HelmChartConfig CRD

server: SSH host from ~/.ssh/config email: email for Let's Encrypt certificate registration

Types

type CheckResult added in v0.10.0

type CheckResult struct {
	Name    string
	Status  CheckStatus
	Message string
}

CheckResult represents the result of a single readiness check

func Check added in v0.10.0

func Check(server string) ([]CheckResult, error)

Check verifies that a server is ready for ssd deployments. Returns a slice of check results (one per check) and an error only for invalid inputs. Individual check failures are reported via CheckResult.OK, not as errors.

func CheckK3s added in v0.11.0

func CheckK3s(server string) ([]CheckResult, error)

CheckK3s verifies that a server is ready for K3s-based ssd deployments.

type CheckStatus added in v0.10.0

type CheckStatus int

CheckStatus represents the severity of a check result

const (
	StatusOK   CheckStatus = iota
	StatusWarn             // optional component missing (e.g., Traefik)
	StatusFail             // required component missing
)

type RemoteClient

type RemoteClient interface {
	SSH(ctx context.Context, command string) (string, error)
	SSHInteractive(ctx context.Context, command string) error
}

RemoteClient defines the interface for remote operations needed by provision

Jump to

Keyboard shortcuts

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