cmdprovision

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:  "provision",
	Usage: "Provision infrastructure",
	Action: func(ctx context.Context, _ *cli.Command) error {
		return run(ctx)
	},
}

Functions

func DeleteState

func DeleteState() error

func EnsureStateDir

func EnsureStateDir() error

EnsureStateDir creates the state directory if needed and verifies it is writable. Call this before any state operations to surface permission errors early (e.g. when running inside Docker with a mismatched UID).

func SaveState

func SaveState(state *ProvisionState) error

func StateExists

func StateExists() bool

Types

type CompletedSteps

type CompletedSteps struct {
	ConnectivityChecked bool `json:"connectivity_checked"`
	SetupCompleted      bool `json:"setup_completed"`
	DatabaseCreated     bool `json:"database_created"`
	ImagePushed         bool `json:"image_pushed"`
	Deployed            bool `json:"deployed"`
}

type ProvisionState

type ProvisionState struct {
	Provider  string    `json:"provider"`
	StartedAt time.Time `json:"started_at"`

	VPS     *infra.VPSConfig     `json:"vps,omitempty"`
	DO      *infra.DOConfig      `json:"do,omitempty"`
	Hetzner *infra.HetznerConfig `json:"hetzner,omitempty"`

	Steps CompletedSteps `json:"steps"`

	DatabaseURL string `json:"database_url,omitempty"`

	Registry *infra.RegistryConfig `json:"registry,omitempty"`

	EncryptionKey string        `json:"encryption_key,omitempty"`
	HashSalt      string        `json:"hash_salt,omitempty"`
	SSHKey        *infra.SSHKey `json:"ssh_key,omitempty"`

	AdminUsername string `json:"admin_username,omitempty"`
	AdminPassword string `json:"admin_password,omitempty"`
}

func LoadState

func LoadState() (*ProvisionState, error)

Jump to

Keyboard shortcuts

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