metropolis: use new OS image format for updates

This switches the node update implementation to the new OS image format
based on OCI artifacts. Updates are now fetched from an OCI registry.

To update existing clusters, build //metropolis/node:bundle in the new
version, then run the update command of the old version of metroctl with
this bundle. Once a node is updated, it only accepts updates in the
new format. It is possible to rollback if needed by building
//metropolis/node:oci_image in the old version and using the new version
of metroctl.

The node bundle target is no longer referenced anywhere, and will be
removed soon.

Change-Id: I00ac6d0d88e379259cea52c8a106204c5eb73fe7
Reviewed-on: https://review.monogon.dev/c/monogon/+/4123
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/osbase/oci/registry/client.go b/osbase/oci/registry/client.go
index c414108..4e60b7b 100644
--- a/osbase/oci/registry/client.go
+++ b/osbase/oci/registry/client.go
@@ -38,9 +38,9 @@
 )
 
 var (
-	repositoryRegexp = regexp.MustCompile(`^` + repositoryExpr + `$`)
-	tagRegexp        = regexp.MustCompile(`^` + tagExpr + `$`)
-	digestRegexp     = regexp.MustCompile(`^` + digestExpr + `$`)
+	RepositoryRegexp = regexp.MustCompile(`^` + repositoryExpr + `$`)
+	TagRegexp        = regexp.MustCompile(`^` + tagExpr + `$`)
+	DigestRegexp     = regexp.MustCompile(`^` + digestExpr + `$`)
 )
 
 // Client is an OCI registry client.
@@ -81,10 +81,10 @@
 // advantage of fetching by tag is that it allows a pull through cache to
 // display tags to a user inspecting the cache contents.
 func (c *Client) Read(ctx context.Context, tag, digest string) (*oci.Image, error) {
-	if !repositoryRegexp.MatchString(c.Repository) {
+	if !RepositoryRegexp.MatchString(c.Repository) {
 		return nil, fmt.Errorf("invalid repository %q", c.Repository)
 	}
-	if tag != "" && !tagRegexp.MatchString(tag) {
+	if tag != "" && !TagRegexp.MatchString(tag) {
 		return nil, fmt.Errorf("invalid tag %q", tag)
 	}
 	if digest != "" {
@@ -137,7 +137,7 @@
 }
 
 func (r *clientBlobs) Blob(descriptor *ocispecv1.Descriptor) (io.ReadCloser, error) {
-	if !digestRegexp.MatchString(string(descriptor.Digest)) {
+	if !DigestRegexp.MatchString(string(descriptor.Digest)) {
 		return nil, fmt.Errorf("invalid blob digest %q", descriptor.Digest)
 	}
 	blobPath := fmt.Sprintf("/v2/%s/blobs/%s", r.client.Repository, descriptor.Digest)