Documentation
¶
Overview ¶
Package initcmd implements the `coolify init` alpha WireGuard mesh bootstrap command tree (Coolify v5).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBootstrapCommand ¶
NewBootstrapCommand creates the `coolify init bootstrap` subcommand — the first-time mesh install. Runs every applicable action on every host and keeps the interactive alpha gate (unless --yes / non-TTY / env override).
func NewExtendCommand ¶
NewExtendCommand creates the `coolify init extend` subcommand. It adds the hosts listed in --new-hosts to an existing mesh: new hosts get the full first-time install; existing hosts get only peer-refresh actions (WG AllowedIPs update, corrosion config refresh, firewall unit reinstall if namespace list changed). Destructive actions on existing hosts are blocked unless --allow-replace is set.
func NewInitCommand ¶
NewInitCommand creates the parent `coolify init` command. The command tree is kept for tests and future v5 work but is not registered on the public root CLI. On bare invocation (no subcommand) it prints the alpha banner and help.
func NewPlanCommand ¶
NewPlanCommand creates the `coolify init plan` subcommand.
func NewUpgradeCommand ¶
NewUpgradeCommand creates the `coolify init upgrade` subcommand: bumps coold/corrosion/scheduler/builder binaries across every host. Does not touch WG config, podman networks, firewall rules, or the corrosion schema. Rejects "nightly" version tags unless --allow-nightly is set.
Types ¶
type InitFlags ¶
type InitFlags struct {
common.SSHMeshFlags
common.MeshNetFlags
WGMgmtPool string
WGInterface string
WGListenPort int
SkipDefaultDeny bool
CooldVersion string
CorrosionVersion string
CorrosionGossipPort int
CorrosionAPIPort int
Yes bool
// CentralHost is the SSH address of the central VM (from --central flag).
// When non-empty, phases 4+5 install the scheduler on that host and push
// per-host JWTs to all other hosts. Default empty = no scheduler setup.
CentralHost string
SchedulerVersion string
// EnableBuilder is a cluster-wide shorthand: when true (and BuilderHosts
// is empty), every host in Servers is enrolled as builder-capable. When
// BuilderHosts is non-empty, EnableBuilder is ignored and only the
// listed subset gets the capability.
EnableBuilder bool
// BuilderHosts is an explicit list of SSH addresses (subset of Servers)
// to enroll with the builder capability. Empty = fall back to
// EnableBuilder semantics. Mutually exclusive in practice with
// EnableBuilder=false (leaves builder fully disabled).
BuilderHosts []string
BuilderCapacity int
BuilderCPUQuota string
BuilderMemoryMax string
BuilderTimeoutSecs int
// NewHosts is the extend-subcommand-only list of brand-new hosts. Must
// be a subset of Servers. Existing hosts in Servers get only peer-refresh
// actions; new hosts get the full first-time install.
NewHosts []string
// AllowReplace unlocks destructive-replace actions on existing hosts in
// extend mode (e.g. recreating a podman bridge whose dns_enabled=true
// pre-alpha drift would otherwise be blocked).
AllowReplace bool
// AllowNightly permits the upgrade subcommand to accept "nightly" as a
// version tag. Rejected by default because nightly forces a re-install on
// every run instead of only when the pinned version changes.
AllowNightly bool
// Intent selects the plan filter (bootstrap/extend/upgrade). Set by each
// subcommand before calling runPlan/runApply; not bound to a flag.
Intent string
}
InitFlags holds all flags shared between `plan` and `apply`.