mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2026-06-21 00:07:16 +03:00
160 lines
4.0 KiB
Markdown
160 lines
4.0 KiB
Markdown
TINY-CLOUD(8)
|
|
|
|
# NAME
|
|
|
|
tiny-cloud - perform first-boot initialization for cloud instances
|
|
|
|
# SYNOPSIS
|
|
|
|
*tiny-cloud* [*-h*|*--help*] { *boot* | *early* | *main* | *final* | *autodetect* | *-b*|*--bootstrap* { *complete* | *incomplete* | *status* } | *-E*|*--enable* | *-D*|*--disable* }
|
|
|
|
# DESCRIPTION
|
|
|
|
*tiny-cloud* performs the initialization steps needed to prepare a cloud
|
|
instance during first boot.
|
|
|
|
The command operates in phases. Each phase runs a configured list of init
|
|
actions from tiny-cloud's provider and user-data libraries. After bootstrap has
|
|
been marked complete, later phase invocations exit without doing further work.
|
|
|
|
# OPTIONS
|
|
|
|
*-h*, *--help*
|
|
Show a short usage summary and exit.
|
|
|
|
*-b*, *--bootstrap* { *complete* | *incomplete* | *status* }
|
|
Manage bootstrap state.
|
|
|
|
*complete*
|
|
Mark bootstrap as complete.
|
|
|
|
*incomplete*
|
|
Clear the bootstrap-complete marker.
|
|
|
|
*status*
|
|
Print *complete* or *incomplete*.
|
|
|
|
*-E*, *--enable*
|
|
Enable tiny-cloud OpenRC services by recreating the runlevel symlinks for
|
|
*tiny-cloud-boot*, *tiny-cloud-early*, *tiny-cloud-main*, and
|
|
*tiny-cloud-final*.
|
|
|
|
*-D*, *--disable*
|
|
Disable tiny-cloud OpenRC services by removing existing *tiny-cloud* runlevel
|
|
symlinks.
|
|
|
|
# PHASES
|
|
|
|
*boot*
|
|
Run default early boot actions. By default this includes expanding the root
|
|
filesystem, bringing up an ephemeral network when needed, writing a default
|
|
network interface configuration, and enabling *sshd*.
|
|
|
|
*early*
|
|
Run early metadata actions. By default this saves instance user data locally.
|
|
|
|
*main*
|
|
Run the main configuration actions. By default this creates the default user,
|
|
sets the hostname, and installs SSH keys.
|
|
|
|
*final*
|
|
Run finalization actions. By default this marks bootstrap complete after any
|
|
additional configured final actions have succeeded.
|
|
|
|
*autodetect*
|
|
Run provider autodetection probes and print the detected provider name.
|
|
This does not use the configured provider, kernel command line hints, or the
|
|
cached autodetection result.
|
|
|
|
# OPERATION
|
|
|
|
When invoked with a phase argument, *tiny-cloud* first checks whether
|
|
_/etc/tiny-cloud.disabled_ exists. If it does, the command logs that
|
|
tiny-cloud is disabled and exits successfully.
|
|
|
|
If bootstrap has already completed, the command logs that the system is already
|
|
bootstrapped and exits successfully.
|
|
|
|
Otherwise, the selected phase action list is loaded from the tiny-cloud init
|
|
library. Each action is run in order. If an action fails, *tiny-cloud* exits
|
|
with a non-zero status.
|
|
|
|
# NOCLOUD NETWORKING
|
|
|
|
For the *nocloud* provider, *tiny-cloud* supports the legacy
|
|
*meta-data* *network-interfaces* and a subset of NoCloud
|
|
*network-config* version 2.
|
|
|
|
Supported *network-config* keys are:
|
|
|
|
- *version: 2*
|
|
- *ethernets*
|
|
- *dhcp4*
|
|
- *dhcp6*
|
|
- *accept-ra*
|
|
- *match.macaddress*
|
|
- *set-name*
|
|
- *addresses*
|
|
- *gateway4*
|
|
- *gateway6*
|
|
- *nameservers.addresses*
|
|
- *dhcp4-overrides.route-metric*
|
|
- *dhcp6-overrides.route-metric*
|
|
|
|
When `match.macaddress` and `set-name` are used, *tiny-cloud* writes
|
|
_/etc/iftab_, configures _/etc/conf.d/macifrename_ to use it, and enables
|
|
and starts the `macifrename` OpenRC service if available.
|
|
|
|
Unsupported `network-config` versions or unsupported v2 layouts are ignored
|
|
with a warning, and normal network fallback behavior applies.
|
|
|
|
# FILES
|
|
|
|
_/etc/tiny-cloud.conf_
|
|
Main tiny-cloud configuration file.
|
|
|
|
_/etc/tiny-cloud.disabled_
|
|
When present, suppresses phase execution.
|
|
|
|
_/etc/network/interfaces_
|
|
Generated network interface configuration.
|
|
|
|
_/etc/iftab_
|
|
MAC-based interface rename rules generated from NoCloud *network-config*
|
|
version 2.
|
|
|
|
_/etc/conf.d/macifrename_
|
|
OpenRC service configuration used when _/etc/iftab_ is generated.
|
|
|
|
_/var/lib/cloud/.bootstrap-complete_
|
|
Bootstrap completion marker.
|
|
|
|
_/usr/lib/tiny-cloud/init_
|
|
Init library defining the default phase actions.
|
|
|
|
# EXIT STATUS
|
|
|
|
*0*
|
|
Success.
|
|
|
|
*1*
|
|
Usage error or action failure.
|
|
|
|
# EXAMPLES
|
|
|
|
Run the main configuration phase:
|
|
|
|
# tiny-cloud main
|
|
|
|
Show bootstrap status:
|
|
|
|
$ tiny-cloud --bootstrap status
|
|
|
|
Disable tiny-cloud OpenRC services:
|
|
|
|
# tiny-cloud --disable
|
|
|
|
# SEE ALSO
|
|
|
|
*imds*(1)
|