c/agent: implement
Implement the currently-required agent functionality, i.e. running with
both autoconfigured as well as static network configuration, interacting
with the BMaaS API and installing Monogon OS.
The early-stage setup is similar to Monogon OS itself, but after setting
up the root supervisor this instead calls into the agent runnable which
then performs the rest of the work.
In the process I made both logtree as well as supervisor public as they
are very generic and I see no reason to keep them scoped so tightly.
Maybe we should move them to go/ at some point.
This currently calls into osimage without the optimization the
regular installer performs, this is intentional as I have code which
will replace osimage with a high-performance version, obviating the
need to manually make this fast here.
This also comes with an end-to-end test
which exercises the whole flow, installing TestOS and checking if it
launches.
Change-Id: Iab3f89598a30072ea565ec2db3b198c8df7999ef
Reviewed-on: https://review.monogon.dev/c/monogon/+/1405
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/agent/api/takeover.proto b/cloud/agent/api/takeover.proto
index 788c5a3..a983a73 100644
--- a/cloud/agent/api/takeover.proto
+++ b/cloud/agent/api/takeover.proto
@@ -11,6 +11,9 @@
// bmaas_endpoint is an address of the BMaaS service the agent should call
// back to.
string bmaas_endpoint = 2;
+ // Optional CA certificate to be used instead of a public CA root store.
+ // Formatted as raw ASN.1 DER.
+ bytes ca_certificate = 3;
}
message TakeoverSuccess {