cloudinit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cloudinit renders the first-boot cloud-config for the box: a hardened, Tailscale-only host that installs the chosen agent CLIs and an on-box `pocketdev` helper. The YAML is built from typed values and marshalled, so there is no fragile string templating.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(p Params) (string, error)

Render returns the complete "#cloud-config" document.

func RenderBootstrap

func RenderBootstrap(p Params) string

RenderBootstrap produces a root shell script for ADOPTING an existing server over SSH: it joins the tailnet, drops the same on-box files a created box gets (/usr/local/bin/pocketdev, /etc/pocketdev/agents, sys-setup.sh), installs the system deps and the agents. It reuses the create-path generators byte-for-byte. It deliberately omits the ufw lockdown (don't risk locking yourself out of a public-IP SSH session before the tailnet path is confirmed).

Types

type Params

type Params struct {
	Hostname   string
	Tag        string
	TSAuthKey  string
	RebootTime string
	SSHKeys    []string
	Agents     []agents.Agent
	GitHub     bool   // install gh and offer `gh auth login` in `pocketdev setup`
	RepoURL    string // optional repo to clone on the box
	AdoptUser  string // for RenderBootstrap: the login user that runs `pocketdev install`
}

Params are the inputs deploy-time values come from.

Jump to

Keyboard shortcuts

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