4 Commits

Author SHA1 Message Date
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
Spencer Smith
fa82454be4 chore: fix formatting of imports
This PR cleans up the formatting for various package imports as they
were causing the linter to throw errors.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-03-19 15:06:05 -04:00
Andrew Rynhard
e1ac4c4151 feat: allow configurable SANs for API
This adds the ability to supply additional SANs for apid and trustd.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-12-08 16:15:56 -08:00
Andrey Smirnov
daef87b9c2 refactor: extract TLS bits from apid main.go
No functional changes, just moving code around.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-12-05 10:27:44 -08:00