cloudinit

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package cloudinit is a minimal cloud-init for GoNIX: at boot it discovers the instance's SSH keys, hostname and user-data from the platform and applies them, so a fresh image becomes a configured server with no baked-in secrets.

Two data sources are probed, in order:

  • NoCloud — a local volume (CD-ROM or disk) with the filesystem label "cidata" containing `meta-data` and `user-data`. This is what the QEMU test harness attaches (clouddrive.iso) and the generic cloud-init seed format.
  • The metadata service at http://169.254.169.254 — used by Vultr (and most clouds). Vultr serves a combined document at /v1.json plus user-data at /latest/user-data.

What it applies: the hostname, any number of authorized SSH keys (merged into /root/.ssh/authorized_keys, de-duplicated), and a user-data script (run if it begins with a #! shebang). It is deliberately tolerant — a missing source or a single failed step is logged, never fatal, since it runs as a boot oneshot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(stdout io.Writer, args []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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