4 Commits

Author SHA1 Message Date
Philipp Sauter
2deff6b6e1
feat: add support for variable substitution in talos.config kernel parameter
The URL to fetch the configuration for a talos node is given by the
talos.config kernel parameter. We add support for 4 variables ${uuid},
${serial}, ${mac} and ${hostname} which substitute the device UUID,
DMI-sourced serial number, MAC address of the first network interface to
be up and the hostname respectively.

Fixes #3272

Signed-off-by: Philipp Sauter <philipp.sauter@siderolabs.com>
2022-06-24 12:38:08 +02:00
Andrey Smirnov
9ad5a67d21
feat: inject platform network configuration as network resources
Instead of patching in the machine config, provide a new interface in
the platforms to supply platform-specific network configuration.

Configuration will be cached in the `/state` across reboots, and
configuration might be even updated in real time (e.g. on GCP).

Network configuration on platform level can be overridden with
user-supplied machine configuration.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-01-20 16:26:49 +03:00
Artem Chernyshev
b53fc45e08 chore: add Context as param to some methods of Platform interface
Context is passed there for proper cancellation and timeouts.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2020-10-07 14:40:10 -07:00
Andrew Rynhard
49307d554d refactor: improve machined
This is a rewrite of machined. It addresses some of the limitations and
complexity in the implementation. This introduces the idea of a
controller. A controller is responsible for managing the runtime, the
sequencer, and a new state type introduced in this PR.

A few highlights are:

- no more event bus
- functional approach to tasks (no more types defined for each task)
  - the task function definition now offers a lot more context, like
    access to raw API requests, the current sequence, a logger, the new
    state interface, and the runtime interface.
- no more panics to handle reboots
- additional initialize and reboot sequences
- graceful gRPC server shutdown on critical errors
- config is now stored at install time to avoid having to download it at
  install time and at boot time
- upgrades now use the local config instead of downloading it
- the upgrade API's preserve option takes precedence over the config's
  install force option

Additionally, this pulls various packes in under machined to make the
code easier to navigate.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2020-04-28 08:20:55 -07:00