cloud/agent: use new OS image format for install
This switches the Agent installation method to the new OS image format
based on OCI artifacts. OS images are now fetched from an OCI registry.
Change-Id: Icd59a2c808fd607b95d8aaa8e60022a27fd2d091
Reviewed-on: https://review.monogon.dev/c/monogon/+/4091
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/installer/test/testos/BUILD.bazel b/metropolis/installer/test/testos/BUILD.bazel
index e8d8700..34f346b 100644
--- a/metropolis/installer/test/testos/BUILD.bazel
+++ b/metropolis/installer/test/testos/BUILD.bazel
@@ -1,5 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
-load("@rules_pkg//:pkg.bzl", "pkg_zip")
load("//osbase/build/mkerofs:def.bzl", "erofs_image")
load("//osbase/build/mkoci:def.bzl", "oci_os_image")
load("//osbase/build/mkpayload:def.bzl", "efi_unified_kernel_image")
@@ -24,18 +23,6 @@
verity = ":verity_rootfs",
)
-# An intermediary "bundle" format until we finalize the actual bundle format. This is NOT stable until migrated
-# to the actual bundle format.
-# TODO(lorenz): Replace this
-pkg_zip(
- name = "testos_bundle",
- srcs = [
- ":kernel_efi",
- ":verity_rootfs",
- ],
- visibility = ["//visibility:public"],
-)
-
oci_os_image(
name = "testos_image",
srcs = {
diff --git a/metropolis/proto/api/management.proto b/metropolis/proto/api/management.proto
index 9a81082..81d4ca0 100644
--- a/metropolis/proto/api/management.proto
+++ b/metropolis/proto/api/management.proto
@@ -481,6 +481,21 @@
ActivationMode activation_mode = 3;
}
+// OSImageRef contains the parameters for fetching an OS image from an OCI
+// registry.
+message OSImageRef {
+ // Scheme must be either http or https.
+ string scheme = 1;
+ // Host with optional port.
+ string host = 2;
+ // Repository containing the image.
+ string repository = 3;
+ // Tag is optional. If not set, the manifest is fetched by digest instead.
+ string tag = 4;
+ // Digest is required. It is used to verify the manifest.
+ string digest = 5;
+}
+
message UpdateNodeResponse {}
message UpdateNodeLabelsRequest {
@@ -538,4 +553,4 @@
message ConfigureClusterResponse {
// Resulting config as set on the server, merged from the users new_config.
common.ClusterConfiguration resulting_config = 1;
-}
\ No newline at end of file
+}