From 0889bd1e9f6dbfe193f4d0a80a8d06f7a634fee6 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 19 Jan 2021 18:44:05 +0000 Subject: [PATCH] Use stream metadata for RHCOS, bump x86_64 to 48.83.202102230316-0 This implements part of the plan from: https://github.com/openshift/os/issues/477 When we originally added the pinned RHCOS metadata `rhcos.json` to the installer, we also changed the coreos-assembler `meta.json` format into an arbitrary new format in the name of some cleanups. In retrospect, this was a big mistake because we now have two formats. Then Fedora CoreOS appeared and added streams JSON as a public API. We decided to unify on streams metadata; there's now a published Go library for it: https://github.com/coreos/stream-metadata-go Among other benefits, it is a single file that supports multiple architectures. UPI installs should now use stream metadata, particularly to find public cloud images. This is an important preparatory step for exposing this via `oc` as well as having something in the cluster update to it. --- data/data/rhcos-4.8.json | 394 ++++++++++++++++++ data/data/rhcos-amd64.json | 163 -------- data/data/rhcos-ppc64le.json | 61 --- data/data/rhcos-s390x.json | 68 --- data/data/rhcos.json | 163 -------- docs/user/aws/install_upi.md | 4 +- go.mod | 1 + go.sum | 11 + hack/update-rhcos-bootimage | 17 + hack/update-rhcos-bootimage.py | 48 --- images/baremetal/Dockerfile.ci | 2 +- images/installer/Dockerfile.upi.ci | 2 +- pkg/asset/cluster/tfvars.go | 20 +- pkg/asset/rhcos/bootstrap_image.go | 45 +- pkg/asset/rhcos/image.go | 91 ++-- pkg/rhcos/ami.go | 26 -- pkg/rhcos/azure.go | 24 -- pkg/rhcos/builds.go | 88 ++-- pkg/rhcos/gcp.go | 30 -- pkg/rhcos/openstack.go | 39 -- pkg/rhcos/qemu.go | 43 -- pkg/rhcos/vmware.go | 43 -- .../coreos/stream-metadata-go/LICENSE | 201 +++++++++ .../coreos/stream-metadata-go/arch/arch.go | 48 +++ .../stream-metadata-go/stream/rhcos/rhcos.go | 18 + .../stream-metadata-go/stream/stream.go | 74 ++++ .../stream-metadata-go/stream/stream_utils.go | 47 +++ vendor/modules.txt | 5 + 28 files changed, 968 insertions(+), 808 deletions(-) create mode 100644 data/data/rhcos-4.8.json delete mode 100644 data/data/rhcos-amd64.json delete mode 100644 data/data/rhcos-ppc64le.json delete mode 100644 data/data/rhcos-s390x.json delete mode 100644 data/data/rhcos.json create mode 100755 hack/update-rhcos-bootimage delete mode 100755 hack/update-rhcos-bootimage.py delete mode 100644 pkg/rhcos/ami.go delete mode 100644 pkg/rhcos/azure.go delete mode 100644 pkg/rhcos/gcp.go delete mode 100644 pkg/rhcos/qemu.go delete mode 100644 pkg/rhcos/vmware.go create mode 100644 vendor/github.com/coreos/stream-metadata-go/LICENSE create mode 100644 vendor/github.com/coreos/stream-metadata-go/arch/arch.go create mode 100644 vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go create mode 100644 vendor/github.com/coreos/stream-metadata-go/stream/stream.go create mode 100644 vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go diff --git a/data/data/rhcos-4.8.json b/data/data/rhcos-4.8.json new file mode 100644 index 00000000000..840b90dd463 --- /dev/null +++ b/data/data/rhcos-4.8.json @@ -0,0 +1,394 @@ +{ + "stream": "rhcos-4.8", + "metadata": { + "last-modified": "2021-02-23T21:27:14Z" + }, + "architectures": { + "ppc64le": { + "artifacts": { + "metal": { + "release": "47.83.202102091015-0", + "formats": { + "4k.raw.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-metal4k.ppc64le.raw.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-metal4k.ppc64le.raw.gz.sig", + "sha256": "f6e4458958f38a7bccae4a89a73134d431b86b183ebcf76542446c959fa2d520", + "uncompressed-sha256": "142ce5a0cb3984611a74d5d9d99ee6e320029802d2bee7c31d6b6b9455f3d293" + } + }, + "iso": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live.ppc64le.iso", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live.ppc64le.iso.sig", + "sha256": "d6fb6f949569461e3f9eb67883fa00b611275bb7d7bd3d9f11beaf1c0b33d389" + } + }, + "pxe": { + "kernel": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live-kernel-ppc64le", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live-kernel-ppc64le.sig", + "sha256": "e310166a16592a5cd1bc152b07fda84278b251dc385cf000c65ed7bb31d254ea" + }, + "initramfs": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live-initramfs.ppc64le.img", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live-initramfs.ppc64le.img.sig", + "sha256": "a15c4eaaf5aa0176fc475e4ec41df4ca0e83595f7a5e561e2de0a26f8a485b60" + }, + "rootfs": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live-rootfs.ppc64le.img", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-live-rootfs.ppc64le.img.sig", + "sha256": "621ed54c0cb5180e7e798778c5c365f04b328aa983bc5a752ecea3a17ffd5bce" + } + }, + "raw.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-metal.ppc64le.raw.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-metal.ppc64le.raw.gz.sig", + "sha256": "d0fa64d744dd731ad3185b39ada8d6eb886c8dbba3e683a30176838bdf20ef9a", + "uncompressed-sha256": "1880a77eed6741e45346102b85b5cceb071d7da5479b1075efd810767a33693c" + } + } + } + }, + "openstack": { + "release": "47.83.202102091015-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-openstack.ppc64le.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-openstack.ppc64le.qcow2.gz.sig", + "sha256": "47865a06d1ca6ae06481ab6f1d52ed6c9fca02ae539a06639c8bea65173a1550", + "uncompressed-sha256": "443ed7133f49e36138ac7c452bedcca2d8fde02f818a43fce1d905d41d0a8cea" + } + } + } + }, + "qemu": { + "release": "47.83.202102091015-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-qemu.ppc64le.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/rhcos-47.83.202102091015-0-qemu.ppc64le.qcow2.gz.sig", + "sha256": "dce14413bb0347ffcb793a529ed2b4e39efa2b523a3e63faf552e574752a5aac", + "uncompressed-sha256": "2044dd7198fd1f730c3fe1d68c422be7e06ed57b4ad28bfe402f4836b84be869" + } + } + } + } + }, + "images": {} + }, + "s390x": { + "artifacts": { + "metal": { + "release": "47.83.202102090311-0", + "formats": { + "4k.raw.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-metal4k.s390x.raw.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-metal4k.s390x.raw.gz.sig", + "sha256": "566bca2f1462b4d70f1d7da7a1c7d477252f2e2db6251ee61f6e810c3a450982", + "uncompressed-sha256": "3478e62963f4b0bba45cc41a92cae33e9907cc3e4ed1206ef94a05db4e70b9fe" + } + }, + "iso": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live.s390x.iso", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live.s390x.iso.sig", + "sha256": "e64d8d66bd69e6ea7ebdd9be74abce43e10e0731527ee6662780f20863ffc71c" + } + }, + "pxe": { + "kernel": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live-kernel-s390x", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live-kernel-s390x.sig", + "sha256": "a0f17299369b9ce9e42c874a8cc3658a00e58144fc0f54849ef96d9414d811d0" + }, + "initramfs": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live-initramfs.s390x.img", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live-initramfs.s390x.img.sig", + "sha256": "07e5642b818ee9582f59050657dceecad4683c6c54c2f92b071549c8a4826e05" + }, + "rootfs": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live-rootfs.s390x.img", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-live-rootfs.s390x.img.sig", + "sha256": "79de4fb97a151b051201eb04f291a1b36f54d3968d2c3f31571066da8231945a" + } + }, + "raw.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-metal.s390x.raw.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-metal.s390x.raw.gz.sig", + "sha256": "299bcb3de103f701866904f41e316e7c375fd1e0c4434b068e578a35d11084e1", + "uncompressed-sha256": "ab0b1f6080c472f88dc418610cb6af2dd9e8aff835c9a7b417716f67c3e2e25d" + } + } + } + }, + "openstack": { + "release": "47.83.202102090311-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-openstack.s390x.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-openstack.s390x.qcow2.gz.sig", + "sha256": "4ebac56f35e48ff66b18ed21785f722272bc5b24573c2410f3d63a374eeab6db", + "uncompressed-sha256": "2920cfe9a35e24302127507ab39e54d619c839d910361fe45c0c46dbd9813e7a" + } + } + } + }, + "qemu": { + "release": "47.83.202102090311-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-qemu.s390x.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/rhcos-47.83.202102090311-0-qemu.s390x.qcow2.gz.sig", + "sha256": "80d61716f6ca97e9b5256b2202132dcac169700937b40545ce9cd8ad9e6bbcee", + "uncompressed-sha256": "cc3b8294320a6635bfdf05a380fb931875a57fe6b18118940b1ce2f23ca069a1" + } + } + } + } + }, + "images": {} + }, + "x86_64": { + "artifacts": { + "aws": { + "release": "48.83.202102230316-0", + "formats": { + "vmdk.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-aws.x86_64.vmdk.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-aws.x86_64.vmdk.gz.sig", + "sha256": "19a8ebccb96db35e7d072a189403f3bc702d562bfe7ac23dc0fa86bb66a8bbd1", + "uncompressed-sha256": "654df2c248f511534b56d87559bf20a102885c868d0294fbb54989ba451be9c0" + } + } + } + }, + "azure": { + "release": "48.83.202102230316-0", + "formats": { + "vhd.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-azure.x86_64.vhd.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-azure.x86_64.vhd.gz.sig", + "sha256": "ff778846596fe69f9f916240cec39b5382c0bfb1bb5d0c7d7d4a94ef18c657ff", + "uncompressed-sha256": "c9d7bb3d13cc9352514631d7a73d2960dbbb5d6cc6bcdc0506b09258cfee3123" + } + } + } + }, + "gcp": { + "release": "48.83.202102230316-0", + "formats": { + "tar.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-gcp.x86_64.tar.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-gcp.x86_64.tar.gz.sig", + "sha256": "e94c5a30c30b9ab1a7c29014e07ad27943ece4a90e486699d423f0bdb9ecf730" + } + } + } + }, + "ibmcloud": { + "release": "48.83.202102230316-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-ibmcloud.x86_64.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-ibmcloud.x86_64.qcow2.gz.sig", + "sha256": "7d37fde683cc8cd94b3b6c9abb598ba80bc9a6b3ee49ccce87d697ca654e2d31", + "uncompressed-sha256": "481f6b1398bf38968bd0b9641390adde813762060a383fe38ca43c7d8076d146" + } + } + } + }, + "metal": { + "release": "48.83.202102230316-0", + "formats": { + "4k.raw.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-metal4k.x86_64.raw.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-metal4k.x86_64.raw.gz.sig", + "sha256": "b26b8ae89d2283395703e86cb10f9320fd917bf86d9c858b342fb3f4b3a3c4e8", + "uncompressed-sha256": "95e33871092da5f50458d9d2d866db59ae52542fd00286e37cb2bca85163c435" + } + }, + "iso": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live.x86_64.iso", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live.x86_64.iso.sig", + "sha256": "e06bdece79c3eac45514d272c38bf5aca55a756e6e2f9aa99bbffe0d534501bd" + } + }, + "pxe": { + "kernel": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live-kernel-x86_64", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live-kernel-x86_64.sig", + "sha256": "806623984883fee24f94bb2f5944d87bbc380c43bbf8ca1f40d5b0f1981af8f5" + }, + "initramfs": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live-initramfs.x86_64.img", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live-initramfs.x86_64.img.sig", + "sha256": "8c3cefede4a29a05cc52033827728ffddad7fe63475a2a932ab07eb2ccc4a5d3" + }, + "rootfs": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live-rootfs.x86_64.img", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-live-rootfs.x86_64.img.sig", + "sha256": "f253cd6559418ace05ef90632bf2d760ea9044c0af5c34acbd495dc2823cd83d" + } + }, + "raw.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-metal.x86_64.raw.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-metal.x86_64.raw.gz.sig", + "sha256": "103bb455f22607d9728ae166140c5d4afe43a1adb842912a5d33623d3df182f9", + "uncompressed-sha256": "f03c75edf6d415f29cf7f1b9dab931bf4b695b28fbaea4fe0b04ecc0588b4ed5" + } + } + } + }, + "openstack": { + "release": "48.83.202102230316-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-openstack.x86_64.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-openstack.x86_64.qcow2.gz.sig", + "sha256": "abc2add9746eb7be82e6919ec13aad8e9eae8cf073d8da6126d7c95ea0dee962", + "uncompressed-sha256": "9ed73a4e415ac670535c2188221e5a4a5f3e945bc2e03a65b1ed4fc76e5db6f2" + } + } + } + }, + "qemu": { + "release": "48.83.202102230316-0", + "formats": { + "qcow2.gz": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-qemu.x86_64.qcow2.gz", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-qemu.x86_64.qcow2.gz.sig", + "sha256": "fa92d674f73ed6ffae1178bd7f311e0e11a18f2d8bfb3cba8d25c9798f1e7cac", + "uncompressed-sha256": "fcc902d4aed0ecb0e3f5f0ba02cfc39646d32f4c75c1e94fc1ed7c3baa526377" + } + } + } + }, + "vmware": { + "release": "48.83.202102230316-0", + "formats": { + "ova": { + "disk": { + "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-vmware.x86_64.ova", + "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-vmware.x86_64.ova.sig", + "sha256": "7f648fb87d29408b2273c998f2b51e26519ca3a664b613e8c6684932b0e644d6" + } + } + } + } + }, + "images": { + "aws": { + "regions": { + "af-south-1": { + "release": "48.83.202102230316-0", + "image": "ami-0d0b066652e7b2b6b" + }, + "ap-east-1": { + "release": "48.83.202102230316-0", + "image": "ami-0af11ac48bb289725" + }, + "ap-northeast-1": { + "release": "48.83.202102230316-0", + "image": "ami-0630c57d9304ac014" + }, + "ap-northeast-2": { + "release": "48.83.202102230316-0", + "image": "ami-0845d373ef74d96d2" + }, + "ap-south-1": { + "release": "48.83.202102230316-0", + "image": "ami-0265e31ba3349e741" + }, + "ap-southeast-1": { + "release": "48.83.202102230316-0", + "image": "ami-0f5c814382a24e0ee" + }, + "ap-southeast-2": { + "release": "48.83.202102230316-0", + "image": "ami-0b4a7ca38872b47fe" + }, + "ca-central-1": { + "release": "48.83.202102230316-0", + "image": "ami-02cdcf3a5eecb715d" + }, + "eu-central-1": { + "release": "48.83.202102230316-0", + "image": "ami-0416dc0707afccd4f" + }, + "eu-north-1": { + "release": "48.83.202102230316-0", + "image": "ami-01eecb0a825ec4742" + }, + "eu-south-1": { + "release": "48.83.202102230316-0", + "image": "ami-0ee83369622acc3f1" + }, + "eu-west-1": { + "release": "48.83.202102230316-0", + "image": "ami-0fb7dba75d65d4155" + }, + "eu-west-2": { + "release": "48.83.202102230316-0", + "image": "ami-058c7ac61333223aa" + }, + "eu-west-3": { + "release": "48.83.202102230316-0", + "image": "ami-0659ca7763ea177a9" + }, + "me-south-1": { + "release": "48.83.202102230316-0", + "image": "ami-01fd244c585409d77" + }, + "sa-east-1": { + "release": "48.83.202102230316-0", + "image": "ami-0c010b0cba5089fa5" + }, + "us-east-1": { + "release": "48.83.202102230316-0", + "image": "ami-00434fdc5b33448cc" + }, + "us-east-2": { + "release": "48.83.202102230316-0", + "image": "ami-065724ff75d9eec9c" + }, + "us-west-1": { + "release": "48.83.202102230316-0", + "image": "ami-0c548bdf93b74cd59" + }, + "us-west-2": { + "release": "48.83.202102230316-0", + "image": "ami-06b386b428d7fa2f1" + } + } + }, + "gcp": { + "project": "rhcos-cloud", + "name": "rhcos-48-83-202102230316-0-gcp-x86-64" + } + }, + "rhel-coreos-extensions": { + "azure-disk": { + "release": "48.83.202102230316-0", + "url": "https://rhcos.blob.core.windows.net/imagebucket/rhcos-48.83.202102230316-0-azure.x86_64.vhd" + } + } + } + } +} diff --git a/data/data/rhcos-amd64.json b/data/data/rhcos-amd64.json deleted file mode 100644 index a7c191006a4..00000000000 --- a/data/data/rhcos-amd64.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "amis": { - "af-south-1": { - "hvm": "ami-057e5df70c52dc128" - }, - "ap-east-1": { - "hvm": "ami-006ab68917f52bb13" - }, - "ap-northeast-1": { - "hvm": "ami-0d236f6289c700771" - }, - "ap-northeast-2": { - "hvm": "ami-040394572427a293a" - }, - "ap-south-1": { - "hvm": "ami-0838c978c0390dd75" - }, - "ap-southeast-1": { - "hvm": "ami-07af688c8b65de56f" - }, - "ap-southeast-2": { - "hvm": "ami-0a36faab6aa0a0dea" - }, - "ca-central-1": { - "hvm": "ami-01284e5815ce66a95" - }, - "eu-central-1": { - "hvm": "ami-0361c06cf3e935cfe" - }, - "eu-north-1": { - "hvm": "ami-0080eb90a48d9655e" - }, - "eu-south-1": { - "hvm": "ami-0a3bc89f7aadf0343" - }, - "eu-west-1": { - "hvm": "ami-0b4024fa5cb2588bd" - }, - "eu-west-2": { - "hvm": "ami-07376355104ab4106" - }, - "eu-west-3": { - "hvm": "ami-038f4ce9ea7ac7191" - }, - "me-south-1": { - "hvm": "ami-025899013a24bb708" - }, - "sa-east-1": { - "hvm": "ami-089e1a3dcc5a5fe08" - }, - "us-east-1": { - "hvm": "ami-0d5f9982f029fbc14" - }, - "us-east-2": { - "hvm": "ami-0c84b5c5255ec4777" - }, - "us-west-1": { - "hvm": "ami-0b421328859954025" - }, - "us-west-2": { - "hvm": "ami-010de485a2ee23e5e" - } - }, - "azure": { - "image": "rhcos-47.83.202102090044-0-azure.x86_64.vhd", - "url": "https://rhcos.blob.core.windows.net/imagebucket/rhcos-47.83.202102090044-0-azure.x86_64.vhd" - }, - "baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7/47.83.202102090044-0/x86_64/", - "buildid": "47.83.202102090044-0", - "gcp": { - "image": "rhcos-47-83-202102090044-0-gcp-x86-64", - "project": "rhcos-cloud", - "url": "https://storage.googleapis.com/rhcos/rhcos/rhcos-47-83-202102090044-0-gcp-x86-64.tar.gz" - }, - "images": { - "aws": { - "path": "rhcos-47.83.202102090044-0-aws.x86_64.vmdk.gz", - "sha256": "ad54945302d9aaf0c5d6a5d1ee457325a3dcd88a68067d18a4d614acef5390d4", - "size": 951239242, - "uncompressed-sha256": "fbb7fbbc6cc6161ffa5c571f1b9022fe80038eea0a7f099c5b18ceba3b82f5eb", - "uncompressed-size": 970902016 - }, - "azure": { - "path": "rhcos-47.83.202102090044-0-azure.x86_64.vhd.gz", - "sha256": "32aa9be04b7f06bfe028fc7c93443f0c742afb006e73b6076016fa897ae5f716", - "size": 951756228, - "uncompressed-sha256": "7e60c02aeebd129a99d65da48beddb99bd29ac7b31f3bb9395fb1d87e6311448", - "uncompressed-size": 17179869696 - }, - "gcp": { - "path": "rhcos-47.83.202102090044-0-gcp.x86_64.tar.gz", - "sha256": "07275bf2844f0dba6296d984d293959f614cc60af9f1be4070142a8cdcc650aa", - "size": 937047583 - }, - "ibmcloud": { - "path": "rhcos-47.83.202102090044-0-ibmcloud.x86_64.qcow2.gz", - "sha256": "b81b26a61d11a9c2c6fb33a94ff124f461907bff550338cfecf173cdd93c09be", - "size": 937381841, - "uncompressed-sha256": "5b6fdfb53e3ede4d264d13862bda6801d932f12e1a17309ac62ac32836bca8ff", - "uncompressed-size": 2360082432 - }, - "live-initramfs": { - "path": "rhcos-47.83.202102090044-0-live-initramfs.x86_64.img", - "sha256": "29ba7e12b16f143a3f036226568ce91b3f7c8bd6feab719a73b0bed1817e4444" - }, - "live-iso": { - "path": "rhcos-47.83.202102090044-0-live.x86_64.iso", - "sha256": "b765a9e99edfa0a91778a4787070c6afcaa198ba8806c8c1533c34a23d63136f" - }, - "live-kernel": { - "path": "rhcos-47.83.202102090044-0-live-kernel-x86_64", - "sha256": "7da6617f6bb7b29c0a8cba002642f2fa23d954874e0d3641e61dd59573563381" - }, - "live-rootfs": { - "path": "rhcos-47.83.202102090044-0-live-rootfs.x86_64.img", - "sha256": "6da4ae110fc2bcea8ac0e6c40fa9d701bbde5b936a1410f75735386c8ea805bf" - }, - "metal": { - "path": "rhcos-47.83.202102090044-0-metal.x86_64.raw.gz", - "sha256": "0a456b02960eeb40a102ef14f5556843c2c504358f3db21f3fe667d8346c9bdf", - "size": 939085053, - "uncompressed-sha256": "36379d083adccccb3de266d2802cfcf5079429865fa010d9b499e87042d46526", - "uncompressed-size": 3717201920 - }, - "metal4k": { - "path": "rhcos-47.83.202102090044-0-metal4k.x86_64.raw.gz", - "sha256": "ff10909c5d4ffbb3a829d070dcf3ce9a8b2d2aebff2924ee464d517eb948bfba", - "size": 936609970, - "uncompressed-sha256": "d5821d7fbd20f86bab29d028855200221f316fa041e86374c5f693da9b5d7b83", - "uncompressed-size": 3717201920 - }, - "openstack": { - "path": "rhcos-47.83.202102090044-0-openstack.x86_64.qcow2.gz", - "sha256": "e5ebb8bcf6d081e52e1e7db0e93ff960ff472e25803a5671170959212e88cad9", - "size": 937380970, - "uncompressed-sha256": "c1b93a426d0f74f0059193439e306f3356b788302a825cfadd870460e543028e", - "uncompressed-size": 2360082432 - }, - "ostree": { - "path": "rhcos-47.83.202102090044-0-ostree.x86_64.tar", - "sha256": "3b5fc040f7493ff7dc5aef4da22077ad74eb2e12a01a9e820d5c116e58716c4f", - "size": 863467520 - }, - "qemu": { - "path": "rhcos-47.83.202102090044-0-qemu.x86_64.qcow2.gz", - "sha256": "2ca82f1d762bba1cb2e5ac1386be0a1ab0264cf88b0594c9cd1e53d285833c6d", - "size": 938521497, - "uncompressed-sha256": "5d31652c7856a87450dce1bbbb561b578ee75443c190096cb977a814e5f35935", - "uncompressed-size": 2394030080 - }, - "vmware": { - "path": "rhcos-47.83.202102090044-0-vmware.x86_64.ova", - "sha256": "13d92692b8eed717ff8d0d113a24add339a65ef1f12eceeb99dabcd922cc86d1", - "size": 970915840 - } - }, - "oscontainer": { - "digest": "sha256:a32077727aa2ef96a1e2371dbcc53ba06f3d9727e836b72be0f0dd4513937e1e", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev" - }, - "ostree-commit": "646a9832dd0dc9fe174a2fc005863a9582186518a5476522a0e9bdccc0e5252a", - "ostree-version": "47.83.202102090044-0" -} \ No newline at end of file diff --git a/data/data/rhcos-ppc64le.json b/data/data/rhcos-ppc64le.json deleted file mode 100644 index a70d81862bd..00000000000 --- a/data/data/rhcos-ppc64le.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-ppc64le/47.83.202102091015-0/ppc64le/", - "buildid": "47.83.202102091015-0", - "images": { - "live-initramfs": { - "path": "rhcos-47.83.202102091015-0-live-initramfs.ppc64le.img", - "sha256": "a15c4eaaf5aa0176fc475e4ec41df4ca0e83595f7a5e561e2de0a26f8a485b60" - }, - "live-iso": { - "path": "rhcos-47.83.202102091015-0-live.ppc64le.iso", - "sha256": "d6fb6f949569461e3f9eb67883fa00b611275bb7d7bd3d9f11beaf1c0b33d389" - }, - "live-kernel": { - "path": "rhcos-47.83.202102091015-0-live-kernel-ppc64le", - "sha256": "e310166a16592a5cd1bc152b07fda84278b251dc385cf000c65ed7bb31d254ea" - }, - "live-rootfs": { - "path": "rhcos-47.83.202102091015-0-live-rootfs.ppc64le.img", - "sha256": "621ed54c0cb5180e7e798778c5c365f04b328aa983bc5a752ecea3a17ffd5bce" - }, - "metal": { - "path": "rhcos-47.83.202102091015-0-metal.ppc64le.raw.gz", - "sha256": "d0fa64d744dd731ad3185b39ada8d6eb886c8dbba3e683a30176838bdf20ef9a", - "size": 918231587, - "uncompressed-sha256": "1880a77eed6741e45346102b85b5cceb071d7da5479b1075efd810767a33693c", - "uncompressed-size": 3888119808 - }, - "metal4k": { - "path": "rhcos-47.83.202102091015-0-metal4k.ppc64le.raw.gz", - "sha256": "f6e4458958f38a7bccae4a89a73134d431b86b183ebcf76542446c959fa2d520", - "size": 918369582, - "uncompressed-sha256": "142ce5a0cb3984611a74d5d9d99ee6e320029802d2bee7c31d6b6b9455f3d293", - "uncompressed-size": 3888119808 - }, - "openstack": { - "path": "rhcos-47.83.202102091015-0-openstack.ppc64le.qcow2.gz", - "sha256": "47865a06d1ca6ae06481ab6f1d52ed6c9fca02ae539a06639c8bea65173a1550", - "size": 916498365, - "uncompressed-sha256": "443ed7133f49e36138ac7c452bedcca2d8fde02f818a43fce1d905d41d0a8cea", - "uncompressed-size": 2494431232 - }, - "ostree": { - "path": "rhcos-47.83.202102091015-0-ostree.ppc64le.tar", - "sha256": "118d9f3842d60e2f21e84b4561a9faea3e1ac72948a76a2e59969ff54f288f0a", - "size": 840714240 - }, - "qemu": { - "path": "rhcos-47.83.202102091015-0-qemu.ppc64le.qcow2.gz", - "sha256": "dce14413bb0347ffcb793a529ed2b4e39efa2b523a3e63faf552e574752a5aac", - "size": 917571073, - "uncompressed-sha256": "2044dd7198fd1f730c3fe1d68c422be7e06ed57b4ad28bfe402f4836b84be869", - "uncompressed-size": 2529296384 - } - }, - "oscontainer": { - "digest": "sha256:6a410508e645cb24729fd860ae53a352b3df23a11d5747b0648d2f300a37de1d", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev" - }, - "ostree-commit": "b44e5d88d608175e62e95a35b59bd3e912327cfea036e5393169146af7512588", - "ostree-version": "47.83.202102091015-0" -} \ No newline at end of file diff --git a/data/data/rhcos-s390x.json b/data/data/rhcos-s390x.json deleted file mode 100644 index 38e42d8bc43..00000000000 --- a/data/data/rhcos-s390x.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7-s390x/47.83.202102090311-0/s390x/", - "buildid": "47.83.202102090311-0", - "images": { - "dasd": { - "path": "rhcos-47.83.202102090311-0-dasd.s390x.raw.gz", - "sha256": "af39f736c9cd6bec61d4f7a098adcebc0b7583cd299339859c831380256c27d4", - "size": 831578576, - "uncompressed-sha256": "a390b9b95a1381ebec1736d4aa5d193f0820a41c6af79fc7283960b91fa4a861", - "uncompressed-size": 3516923904 - }, - "live-initramfs": { - "path": "rhcos-47.83.202102090311-0-live-initramfs.s390x.img", - "sha256": "07e5642b818ee9582f59050657dceecad4683c6c54c2f92b071549c8a4826e05" - }, - "live-iso": { - "path": "rhcos-47.83.202102090311-0-live.s390x.iso", - "sha256": "e64d8d66bd69e6ea7ebdd9be74abce43e10e0731527ee6662780f20863ffc71c" - }, - "live-kernel": { - "path": "rhcos-47.83.202102090311-0-live-kernel-s390x", - "sha256": "a0f17299369b9ce9e42c874a8cc3658a00e58144fc0f54849ef96d9414d811d0" - }, - "live-rootfs": { - "path": "rhcos-47.83.202102090311-0-live-rootfs.s390x.img", - "sha256": "79de4fb97a151b051201eb04f291a1b36f54d3968d2c3f31571066da8231945a" - }, - "metal": { - "path": "rhcos-47.83.202102090311-0-metal.s390x.raw.gz", - "sha256": "299bcb3de103f701866904f41e316e7c375fd1e0c4434b068e578a35d11084e1", - "size": 831763974, - "uncompressed-sha256": "ab0b1f6080c472f88dc418610cb6af2dd9e8aff835c9a7b417716f67c3e2e25d", - "uncompressed-size": 3516923904 - }, - "metal4k": { - "path": "rhcos-47.83.202102090311-0-metal4k.s390x.raw.gz", - "sha256": "566bca2f1462b4d70f1d7da7a1c7d477252f2e2db6251ee61f6e810c3a450982", - "size": 831520327, - "uncompressed-sha256": "3478e62963f4b0bba45cc41a92cae33e9907cc3e4ed1206ef94a05db4e70b9fe", - "uncompressed-size": 3516923904 - }, - "openstack": { - "path": "rhcos-47.83.202102090311-0-openstack.s390x.qcow2.gz", - "sha256": "4ebac56f35e48ff66b18ed21785f722272bc5b24573c2410f3d63a374eeab6db", - "size": 830070694, - "uncompressed-sha256": "2920cfe9a35e24302127507ab39e54d619c839d910361fe45c0c46dbd9813e7a", - "uncompressed-size": 2179530752 - }, - "ostree": { - "path": "rhcos-47.83.202102090311-0-ostree.s390x.tar", - "sha256": "d7ed80d612fedcca6a39017e41851acbb35c5d0a8cce9c06df8afacfe059e310", - "size": 779970560 - }, - "qemu": { - "path": "rhcos-47.83.202102090311-0-qemu.s390x.qcow2.gz", - "sha256": "80d61716f6ca97e9b5256b2202132dcac169700937b40545ce9cd8ad9e6bbcee", - "size": 831149363, - "uncompressed-sha256": "cc3b8294320a6635bfdf05a380fb931875a57fe6b18118940b1ce2f23ca069a1", - "uncompressed-size": 2213019648 - } - }, - "oscontainer": { - "digest": "sha256:0e8147407a02605f0e4f79ac5e8ddfda21b7557769a26b9f7138e82dc9558af0", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev" - }, - "ostree-commit": "ac18fdc352f3e1bcbf1c7d74f713f14de2c4117c869afd097432b5f8355e3781", - "ostree-version": "47.83.202102090311-0" -} \ No newline at end of file diff --git a/data/data/rhcos.json b/data/data/rhcos.json deleted file mode 100644 index a7c191006a4..00000000000 --- a/data/data/rhcos.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "amis": { - "af-south-1": { - "hvm": "ami-057e5df70c52dc128" - }, - "ap-east-1": { - "hvm": "ami-006ab68917f52bb13" - }, - "ap-northeast-1": { - "hvm": "ami-0d236f6289c700771" - }, - "ap-northeast-2": { - "hvm": "ami-040394572427a293a" - }, - "ap-south-1": { - "hvm": "ami-0838c978c0390dd75" - }, - "ap-southeast-1": { - "hvm": "ami-07af688c8b65de56f" - }, - "ap-southeast-2": { - "hvm": "ami-0a36faab6aa0a0dea" - }, - "ca-central-1": { - "hvm": "ami-01284e5815ce66a95" - }, - "eu-central-1": { - "hvm": "ami-0361c06cf3e935cfe" - }, - "eu-north-1": { - "hvm": "ami-0080eb90a48d9655e" - }, - "eu-south-1": { - "hvm": "ami-0a3bc89f7aadf0343" - }, - "eu-west-1": { - "hvm": "ami-0b4024fa5cb2588bd" - }, - "eu-west-2": { - "hvm": "ami-07376355104ab4106" - }, - "eu-west-3": { - "hvm": "ami-038f4ce9ea7ac7191" - }, - "me-south-1": { - "hvm": "ami-025899013a24bb708" - }, - "sa-east-1": { - "hvm": "ami-089e1a3dcc5a5fe08" - }, - "us-east-1": { - "hvm": "ami-0d5f9982f029fbc14" - }, - "us-east-2": { - "hvm": "ami-0c84b5c5255ec4777" - }, - "us-west-1": { - "hvm": "ami-0b421328859954025" - }, - "us-west-2": { - "hvm": "ami-010de485a2ee23e5e" - } - }, - "azure": { - "image": "rhcos-47.83.202102090044-0-azure.x86_64.vhd", - "url": "https://rhcos.blob.core.windows.net/imagebucket/rhcos-47.83.202102090044-0-azure.x86_64.vhd" - }, - "baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.7/47.83.202102090044-0/x86_64/", - "buildid": "47.83.202102090044-0", - "gcp": { - "image": "rhcos-47-83-202102090044-0-gcp-x86-64", - "project": "rhcos-cloud", - "url": "https://storage.googleapis.com/rhcos/rhcos/rhcos-47-83-202102090044-0-gcp-x86-64.tar.gz" - }, - "images": { - "aws": { - "path": "rhcos-47.83.202102090044-0-aws.x86_64.vmdk.gz", - "sha256": "ad54945302d9aaf0c5d6a5d1ee457325a3dcd88a68067d18a4d614acef5390d4", - "size": 951239242, - "uncompressed-sha256": "fbb7fbbc6cc6161ffa5c571f1b9022fe80038eea0a7f099c5b18ceba3b82f5eb", - "uncompressed-size": 970902016 - }, - "azure": { - "path": "rhcos-47.83.202102090044-0-azure.x86_64.vhd.gz", - "sha256": "32aa9be04b7f06bfe028fc7c93443f0c742afb006e73b6076016fa897ae5f716", - "size": 951756228, - "uncompressed-sha256": "7e60c02aeebd129a99d65da48beddb99bd29ac7b31f3bb9395fb1d87e6311448", - "uncompressed-size": 17179869696 - }, - "gcp": { - "path": "rhcos-47.83.202102090044-0-gcp.x86_64.tar.gz", - "sha256": "07275bf2844f0dba6296d984d293959f614cc60af9f1be4070142a8cdcc650aa", - "size": 937047583 - }, - "ibmcloud": { - "path": "rhcos-47.83.202102090044-0-ibmcloud.x86_64.qcow2.gz", - "sha256": "b81b26a61d11a9c2c6fb33a94ff124f461907bff550338cfecf173cdd93c09be", - "size": 937381841, - "uncompressed-sha256": "5b6fdfb53e3ede4d264d13862bda6801d932f12e1a17309ac62ac32836bca8ff", - "uncompressed-size": 2360082432 - }, - "live-initramfs": { - "path": "rhcos-47.83.202102090044-0-live-initramfs.x86_64.img", - "sha256": "29ba7e12b16f143a3f036226568ce91b3f7c8bd6feab719a73b0bed1817e4444" - }, - "live-iso": { - "path": "rhcos-47.83.202102090044-0-live.x86_64.iso", - "sha256": "b765a9e99edfa0a91778a4787070c6afcaa198ba8806c8c1533c34a23d63136f" - }, - "live-kernel": { - "path": "rhcos-47.83.202102090044-0-live-kernel-x86_64", - "sha256": "7da6617f6bb7b29c0a8cba002642f2fa23d954874e0d3641e61dd59573563381" - }, - "live-rootfs": { - "path": "rhcos-47.83.202102090044-0-live-rootfs.x86_64.img", - "sha256": "6da4ae110fc2bcea8ac0e6c40fa9d701bbde5b936a1410f75735386c8ea805bf" - }, - "metal": { - "path": "rhcos-47.83.202102090044-0-metal.x86_64.raw.gz", - "sha256": "0a456b02960eeb40a102ef14f5556843c2c504358f3db21f3fe667d8346c9bdf", - "size": 939085053, - "uncompressed-sha256": "36379d083adccccb3de266d2802cfcf5079429865fa010d9b499e87042d46526", - "uncompressed-size": 3717201920 - }, - "metal4k": { - "path": "rhcos-47.83.202102090044-0-metal4k.x86_64.raw.gz", - "sha256": "ff10909c5d4ffbb3a829d070dcf3ce9a8b2d2aebff2924ee464d517eb948bfba", - "size": 936609970, - "uncompressed-sha256": "d5821d7fbd20f86bab29d028855200221f316fa041e86374c5f693da9b5d7b83", - "uncompressed-size": 3717201920 - }, - "openstack": { - "path": "rhcos-47.83.202102090044-0-openstack.x86_64.qcow2.gz", - "sha256": "e5ebb8bcf6d081e52e1e7db0e93ff960ff472e25803a5671170959212e88cad9", - "size": 937380970, - "uncompressed-sha256": "c1b93a426d0f74f0059193439e306f3356b788302a825cfadd870460e543028e", - "uncompressed-size": 2360082432 - }, - "ostree": { - "path": "rhcos-47.83.202102090044-0-ostree.x86_64.tar", - "sha256": "3b5fc040f7493ff7dc5aef4da22077ad74eb2e12a01a9e820d5c116e58716c4f", - "size": 863467520 - }, - "qemu": { - "path": "rhcos-47.83.202102090044-0-qemu.x86_64.qcow2.gz", - "sha256": "2ca82f1d762bba1cb2e5ac1386be0a1ab0264cf88b0594c9cd1e53d285833c6d", - "size": 938521497, - "uncompressed-sha256": "5d31652c7856a87450dce1bbbb561b578ee75443c190096cb977a814e5f35935", - "uncompressed-size": 2394030080 - }, - "vmware": { - "path": "rhcos-47.83.202102090044-0-vmware.x86_64.ova", - "sha256": "13d92692b8eed717ff8d0d113a24add339a65ef1f12eceeb99dabcd922cc86d1", - "size": 970915840 - } - }, - "oscontainer": { - "digest": "sha256:a32077727aa2ef96a1e2371dbcc53ba06f3d9727e836b72be0f0dd4513937e1e", - "image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev" - }, - "ostree-commit": "646a9832dd0dc9fe174a2fc005863a9582186518a5476522a0e9bdccc0e5252a", - "ostree-version": "47.83.202102090044-0" -} \ No newline at end of file diff --git a/docs/user/aws/install_upi.md b/docs/user/aws/install_upi.md index 90c88b6b65e..ed7546f0538 100644 --- a/docs/user/aws/install_upi.md +++ b/docs/user/aws/install_upi.md @@ -21,8 +21,8 @@ $ openshift-install create install-config ### Optional: Create Encrypted AMIs The IPI-based installer creates an encrypted AMI by default. If you wish to have an encrypted AMI for UPI-based -installs, you will need to create it directly. You can find a list of the appropriate base AMIs -[here](../../../data/data/rhcos.json). +installs, you will need to create it directly. You can find a list of the appropriate base AMIs +as part of the CoreOS stream metadata [here](../../../data/data/rhcos-4.8.json). You will make an encrypted copy of the AMI according to the [AWS documentation][encrypted-copy]. diff --git a/go.mod b/go.mod index 6c7699fb010..008da62f8ff 100644 --- a/go.mod +++ b/go.mod @@ -21,6 +21,7 @@ require ( github.com/clarketm/json v1.14.1 github.com/containers/image v3.0.2+incompatible github.com/coreos/ignition/v2 v2.9.0 + github.com/coreos/stream-metadata-go v0.0.0-20210216154348-7c4d5d7d95b5 github.com/dmacvicar/terraform-provider-libvirt v0.6.4-0.20201216193629-2b60d7626ff8 github.com/fatih/color v1.10.0 // indirect github.com/frankban/quicktest v1.7.2 // indirect diff --git a/go.sum b/go.sum index 1dbde8230d7..466423fc79f 100644 --- a/go.sum +++ b/go.sum @@ -303,6 +303,17 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.35.0/go.mod h1:XHYZUStZWcwd1yk/1DjZv/fywqKIyAJ6pSwvIr+v9BQ= +github.com/coreos/prometheus-operator v0.38.0/go.mod h1:xZC7/TgeC0/mBaJk+1H9dbHaiEvLYHgX6Mi1h40UPh8= +github.com/coreos/stream-metadata-go v0.0.0-20210115160721-ba77d4e64952 h1:t7IgMcyflINfXWPISnHTXwa/F+NxLgWGRGejoyfHUII= +github.com/coreos/stream-metadata-go v0.0.0-20210115160721-ba77d4e64952/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko= +github.com/coreos/stream-metadata-go v0.0.0-20210119202048-fb3ac10789fb h1:a1FamXpn1idyCsvXOAEdlmAWDZi6baC6sP2mJ/iHiHs= +github.com/coreos/stream-metadata-go v0.0.0-20210119202048-fb3ac10789fb/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko= +github.com/coreos/stream-metadata-go v0.0.0-20210120211222-7575c72c6f05 h1:GXgmcV54WyU3LDXRwf3vXtgkmajMHoYfQ/qCuPblr4A= +github.com/coreos/stream-metadata-go v0.0.0-20210120211222-7575c72c6f05/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko= +github.com/coreos/stream-metadata-go v0.0.0-20210121193119-2fbf8747cee7 h1:6LNM7FalzC7155uc5ecuUmD1x70QsOexZYGVHnLc4OE= +github.com/coreos/stream-metadata-go v0.0.0-20210121193119-2fbf8747cee7/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko= +github.com/coreos/stream-metadata-go v0.0.0-20210216154348-7c4d5d7d95b5 h1:rFS+eq6Wghj4SOylbWmWcYWkAho4+35NHIMZBv9EozA= +github.com/coreos/stream-metadata-go v0.0.0-20210216154348-7c4d5d7d95b5/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko= github.com/coreos/vcontext v0.0.0-20190529201340-22b159166068/go.mod h1:E+6hug9bFSe0KZ2ZAzr8M9F5JlArJjv5D1JS7KSkPKE= github.com/coreos/vcontext v0.0.0-20191017033345-260217907eb5/go.mod h1:E+6hug9bFSe0KZ2ZAzr8M9F5JlArJjv5D1JS7KSkPKE= github.com/coreos/vcontext v0.0.0-20200225161404-ee043618d38d h1:Nu473BdYOxcnhFfPrl1ihpCtxI/VZr2IfhVIHDGP43Y= diff --git a/hack/update-rhcos-bootimage b/hack/update-rhcos-bootimage new file mode 100755 index 00000000000..a54ca4ce874 --- /dev/null +++ b/hack/update-rhcos-bootimage @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +cat << 'EOF' +This code has moved to https://github.com/coreos/coreos-assembler/ + +See https://github.com/coreos/coreos-assembler/pull/2000 in particular. + +The initial file data/data/rhcos-4.8 was generated this way: + +$ plume cosa2stream --name rhcos-4.8 --distro rhcos x86_64=48.83.202102230316-0 s390x=47.83.202102090311-0 ppc64le=47.83.202102091015-0 > data/data/rhcos-4.8.json + +To update the bootimage for one or more architectures, use e.g. + +$ plume cosa2stream --target data/data/rhcos-4.8.json --distro rhcos x86_64=48.83.202102230316-0 s390x=47.83.202102090311-0 ppc64le=47.83.202102091015-0 +EOF +exit 1 diff --git a/hack/update-rhcos-bootimage.py b/hack/update-rhcos-bootimage.py deleted file mode 100755 index ba2ff1af0a2..00000000000 --- a/hack/update-rhcos-bootimage.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 -# Usage: ./hack/update-rhcos-bootimage.py https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.6/46.82.202008260918-0/x86_64/meta.json amd64 -import codecs,os,sys,json,argparse -import urllib.parse -import urllib.request - -# An app running in the CI cluster exposes this public endpoint about ART RHCOS -# builds. Do not try to e.g. point to RHT-internal endpoints. -RHCOS_RELEASES_APP = 'https://releases-art-rhcos.svc.ci.openshift.org' - -parser = argparse.ArgumentParser() -parser.add_argument("meta", action='store') -parser.add_argument("arch", action='store', choices=['amd64', 's390x', 'ppc64le']) -args = parser.parse_args() - -metadata_dir = os.path.join(os.path.dirname(sys.argv[0]), "../data/data") - -if not args.meta.startswith(RHCOS_RELEASES_APP): - raise SystemExit("URL must start with: " + RHCOS_RELEASES_APP) - -with urllib.request.urlopen(args.meta) as f: - string_f = codecs.getreader('utf-8')(f) # support for Python < 3.6 - meta = json.load(string_f) -newmeta = {} -for k in ['images', 'buildid', 'oscontainer', - 'ostree-commit', 'ostree-version', - 'azure', 'gcp']: - if meta.get(k): - newmeta[k] = meta[k] -if meta.get(k): - newmeta['amis'] = { - entry['name']: { - 'hvm': entry['hvm'], - } - for entry in meta['amis'] - } -newmeta['baseURI'] = urllib.parse.urljoin(args.meta, '.') - -with open(os.path.join(metadata_dir, 'rhcos-{}.json'.format(args.arch)), 'w') as f: - json.dump(newmeta, f, sort_keys=True, indent=4) - -# Continue to populate the legacy metadata file because there are still -# processes consuming this file directly. This normally could just be a symlink -# but some of these processes reference raw.githubusercontent.com which doesn't -# follow symlinks. -if args.arch == 'amd64': - with open(os.path.join(metadata_dir, "rhcos.json"), 'w') as f: - json.dump(newmeta, f, sort_keys=True, indent=4) diff --git a/images/baremetal/Dockerfile.ci b/images/baremetal/Dockerfile.ci index 69812a7108d..401a39789a6 100644 --- a/images/baremetal/Dockerfile.ci +++ b/images/baremetal/Dockerfile.ci @@ -11,7 +11,7 @@ RUN TAGS="libvirt baremetal" hack/build.sh FROM registry.ci.openshift.org/ocp/4.8:base COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install -COPY --from=builder /go/src/github.com/openshift/installer/data/data/rhcos.json /var/cache/ +COPY --from=builder /go/src/github.com/openshift/installer/data/data/rhcos-4.8.json /var/cache/ RUN yum update -y && \ yum install --setopt=tsflags=nodocs -y \ diff --git a/images/installer/Dockerfile.upi.ci b/images/installer/Dockerfile.upi.ci index 817a6054b98..6b6e3eaecdf 100644 --- a/images/installer/Dockerfile.upi.ci +++ b/images/installer/Dockerfile.upi.ci @@ -14,7 +14,7 @@ FROM registry.ci.openshift.org/ocp/4.8:base COPY --from=cli /usr/bin/oc /bin/oc COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install COPY --from=builder /go/src/github.com/openshift/installer/upi /var/lib/openshift-install/upi -COPY --from=builder /go/src/github.com/openshift/installer/data/data/rhcos.json /var/lib/openshift-install/rhcos.json +COPY --from=builder /go/src/github.com/openshift/installer/data/data/rhcos-4.8.json /var/lib/openshift-install/rhcos.json RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc RUN sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >/etc/yum.repos.d/azure-cli.repo' diff --git a/pkg/asset/cluster/tfvars.go b/pkg/asset/cluster/tfvars.go index 8291cfdb11d..7dcd3b0459e 100644 --- a/pkg/asset/cluster/tfvars.go +++ b/pkg/asset/cluster/tfvars.go @@ -21,6 +21,7 @@ import ( azureprovider "sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1beta1" openstackprovider "sigs.k8s.io/cluster-api-provider-openstack/pkg/apis/openstackproviderconfig/v1alpha1" + coreosarch "github.com/coreos/stream-metadata-go/arch" "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/ignition" "github.com/openshift/installer/pkg/asset/ignition/bootstrap" @@ -338,16 +339,29 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error { } preexistingnetwork := installConfig.Config.GCP.Network != "" - imageRaw, err := rhcospkg.GCPRaw(ctx, installConfig.Config.ControlPlane.Architecture) + archName := coreosarch.RpmArch(fmt.Sprintf("%s", installConfig.Config.ControlPlane.Architecture)) + st, err := rhcospkg.FetchCoreOSBuild(ctx) if err != nil { - return errors.Wrap(err, "failed to find Raw GCP image URL") + return err + } + starch, err := st.GetArchitecture(archName) + if err != nil { + return err + } + + var gcpimage string + if starch.Images.Gcp != nil { + img := starch.Images.Gcp + gcpimage = fmt.Sprintf("projects/%s/global/images/%s", img.Project, img.Name) + } else { + return fmt.Errorf("%s: No GCP build found", st.FormatPrefix(archName)) } data, err := gcptfvars.TFVars( gcptfvars.TFVarsSources{ Auth: auth, MasterConfigs: masterConfigs, WorkerConfigs: workerConfigs, - ImageURI: imageRaw, + ImageURI: gcpimage, ImageLicenses: installConfig.Config.GCP.Licenses, PublicZoneName: publicZoneName, PublishStrategy: installConfig.Config.Publish, diff --git a/pkg/asset/rhcos/bootstrap_image.go b/pkg/asset/rhcos/bootstrap_image.go index 6fde584b5ba..752557d8a40 100644 --- a/pkg/asset/rhcos/bootstrap_image.go +++ b/pkg/asset/rhcos/bootstrap_image.go @@ -3,8 +3,11 @@ package rhcos import ( "context" + "fmt" "time" + "github.com/coreos/stream-metadata-go/arch" + "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/installconfig" "github.com/openshift/installer/pkg/rhcos" @@ -37,28 +40,44 @@ func (i *BootstrapImage) Generate(p asset.Parents) error { p.Get(ic) config := ic.Config - var osimage string - var err error ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) defer cancel() + switch config.Platform.Name() { case baremetal.Name: - // Check for RHCOS image URL override - if boi := config.Platform.BareMetal.BootstrapOSImage; boi != "" { - osimage = boi - break + archName := arch.RpmArch(fmt.Sprintf("%s", config.ControlPlane.Architecture)) + st, err := rhcos.FetchCoreOSBuild(ctx) + if err != nil { + return err + } + starch, err := st.GetArchitecture(archName) + if err != nil { + return err } + // Check for CoreOS image URL override + if boi := config.Platform.BareMetal.BootstrapOSImage; boi != "" { + *i = BootstrapImage(boi) + return nil + } // Baremetal IPI launches a local VM for the bootstrap node // Hence requires the QEMU image to use the libvirt backend - osimage, err = rhcos.QEMU(ctx, config.ControlPlane.Architecture) + if a, ok := starch.Artifacts["qemu"]; ok { + u, err := rhcos.FindArtifactURL(a) + if err != nil { + return err + } + *i = BootstrapImage(u) + return nil + } + return fmt.Errorf("%s: No qemu build found", st.FormatPrefix(archName)) default: // other platforms use the same image for all nodes - osimage, err = osImage(config) - } - if err != nil { - return err + u, err := osImage(config) + if err != nil { + return err + } + *i = BootstrapImage(u) + return nil } - *i = BootstrapImage(osimage) - return nil } diff --git a/pkg/asset/rhcos/image.go b/pkg/asset/rhcos/image.go index 12ca213c0ac..efec681f739 100644 --- a/pkg/asset/rhcos/image.go +++ b/pkg/asset/rhcos/image.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/pkg/errors" + "github.com/coreos/stream-metadata-go/arch" "github.com/sirupsen/logrus" "github.com/openshift/installer/pkg/asset" @@ -66,67 +66,96 @@ func (i *Image) Generate(p asset.Parents) error { } func osImage(config *types.InstallConfig) (string, error) { - arch := config.ControlPlane.Architecture - - var osimage string - var err error ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) defer cancel() + + archName := arch.RpmArch(fmt.Sprintf("%s", config.ControlPlane.Architecture)) + + st, err := rhcos.FetchCoreOSBuild(ctx) + if err != nil { + return "", err + } + starch, err := st.GetArchitecture(archName) + if err != nil { + return "", err + } switch config.Platform.Name() { case aws.Name: if len(config.Platform.AWS.AMIID) > 0 { - osimage = config.Platform.AWS.AMIID - break + return config.Platform.AWS.AMIID, nil } region := config.Platform.AWS.Region if !configaws.IsKnownRegion(config.Platform.AWS.Region) { region = "us-east-1" } - osimage, err = rhcos.AMI(ctx, arch, region) + osimage, err := st.GetAMI(archName, region) + if err != nil { + return "", err + } if region != config.Platform.AWS.Region { osimage = fmt.Sprintf("%s,%s", osimage, region) } + return osimage, nil case gcp.Name: - osimage, err = rhcos.GCP(ctx, arch) + if starch.Images.Gcp != nil { + img := starch.Images.Gcp + return fmt.Sprintf("projects/%s/global/images/%s", img.Project, img.Name), nil + } + return "", fmt.Errorf("%s: No GCP build found", st.FormatPrefix(archName)) case libvirt.Name: - osimage, err = rhcos.QEMU(ctx, arch) - case openstack.Name: - if oi := config.Platform.OpenStack.ClusterOSImage; oi != "" { - osimage = oi - break + // 𝅘𝅥𝅮 Everything's going to be a-ok 𝅘𝅥𝅮 + if a, ok := starch.Artifacts["qemu"]; ok { + return rhcos.FindArtifactURL(a) } - osimage, err = rhcos.OpenStack(ctx, arch) + return "", fmt.Errorf("%s: No qemu build found", st.FormatPrefix(archName)) case ovirt.Name: - osimage, err = rhcos.OpenStack(ctx, arch) + fallthrough case kubevirt.Name: - osimage, err = rhcos.OpenStack(ctx, arch) + fallthrough + case openstack.Name: + if oi := config.Platform.OpenStack.ClusterOSImage; oi != "" { + return oi, nil + } + if a, ok := starch.Artifacts["openstack"]; ok { + return rhcos.FindArtifactURL(a) + } + return "", fmt.Errorf("%s: No openstack build found", st.FormatPrefix(archName)) case azure.Name: - osimage, err = rhcos.VHD(ctx, arch) + ext := starch.RHELCoreOSExtensions + if ext == nil { + return "", fmt.Errorf("%s: No azure build found", st.FormatPrefix(archName)) + } + azd := ext.AzureDisk + if azd == nil { + return "", fmt.Errorf("%s: No azure build found", st.FormatPrefix(archName)) + } + return azd.URL, nil case baremetal.Name: - // Check for RHCOS image URL override + // Check for image URL override if oi := config.Platform.BareMetal.ClusterOSImage; oi != "" { - osimage = oi - break + return oi, nil } // Note that baremetal IPI currently uses the OpenStack image // because this contains the necessary ironic config drive // ignition support, which isn't enabled in the UPI BM images - osimage, err = rhcos.OpenStack(ctx, arch) + if a, ok := starch.Artifacts["openstack"]; ok { + return rhcos.FindArtifactURL(a) + } + return "", fmt.Errorf("%s: No openstack build found", st.FormatPrefix(archName)) case vsphere.Name: - // Check for RHCOS image URL override + // Check for image URL override if config.Platform.VSphere.ClusterOSImage != "" { - osimage = config.Platform.VSphere.ClusterOSImage - break + return config.Platform.VSphere.ClusterOSImage, nil } - osimage, err = rhcos.VMware(ctx, arch) + if a, ok := starch.Artifacts["vmware"]; ok { + return rhcos.FindArtifactURL(a) + } + return "", fmt.Errorf("%s: No vmware build found", st.FormatPrefix(archName)) case none.Name: + return "", nil default: - return "", errors.New("invalid Platform") - } - if err != nil { - return "", err + return "", fmt.Errorf("invalid platform %v", config.Platform.Name()) } - return osimage, nil } diff --git a/pkg/rhcos/ami.go b/pkg/rhcos/ami.go deleted file mode 100644 index 04cb15db911..00000000000 --- a/pkg/rhcos/ami.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:generate go run ami_regions_generate.go rhcos ../../data/data/rhcos-amd64.json ami_regions.go - -package rhcos - -import ( - "context" - - "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" -) - -// AMI fetches the HVM AMI ID of the Red Hat Enterprise Linux CoreOS release. -func AMI(ctx context.Context, arch types.Architecture, region string) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - ami, ok := meta.AMIs[region] - if !ok { - return "", errors.Errorf("no RHCOS AMIs found in %s", region) - } - - return ami.HVM, nil -} diff --git a/pkg/rhcos/azure.go b/pkg/rhcos/azure.go deleted file mode 100644 index 14e8fc30bb2..00000000000 --- a/pkg/rhcos/azure.go +++ /dev/null @@ -1,24 +0,0 @@ -package rhcos - -import ( - "context" - - "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" -) - -// VHD fetches the URL of the public Azure storage bucket containing the RHCOS image -func VHD(ctx context.Context, arch types.Architecture) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - url := meta.Azure.URL - if url == "" { - return "", errors.New("no RHCOS Azure URL found") - } - - return url, nil -} diff --git a/pkg/rhcos/builds.go b/pkg/rhcos/builds.go index 76d0b64415f..2159ffe7573 100644 --- a/pkg/rhcos/builds.go +++ b/pkg/rhcos/builds.go @@ -5,69 +5,59 @@ import ( "encoding/json" "fmt" "io/ioutil" - "os" + "net/url" + "github.com/coreos/stream-metadata-go/stream" "github.com/openshift/installer/data" "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" -) - -var ( - errInvalidArch = fmt.Errorf("no build metadata for given architecture") ) -type metadata struct { - AMIs map[string]struct { - HVM string `json:"hvm"` - } `json:"amis"` - Azure struct { - Image string `json:"image"` - URL string `json:"url"` - } - GCP struct { - Image string `json:"image"` - Project string `json:"project"` - URL string `json:"url"` - } - BaseURI string `json:"baseURI"` - Images struct { - QEMU struct { - Path string `json:"path"` - SHA256 string `json:"sha256"` - UncompressedSHA256 string `json:"uncompressed-sha256"` - } `json:"qemu"` - OpenStack struct { - Path string `json:"path"` - SHA256 string `json:"sha256"` - UncompressedSHA256 string `json:"uncompressed-sha256"` - } `json:"openstack"` - VMware struct { - Path string `json:"path"` - SHA256 string `json:"sha256"` - } `json:"vmware"` - } `json:"images"` - OSTreeVersion string `json:"ostree-version"` -} - -func fetchRHCOSBuild(ctx context.Context, arch types.Architecture) (*metadata, error) { - file, err := data.Assets.Open(fmt.Sprintf("rhcos-%s.json", arch)) +// FetchCoreOSBuild returns the pinned version of RHEL/Fedora CoreOS used +// by the installer to provision the bootstrap node and control plane currently. +// For more information, see e.g. https://github.com/openshift/enhancements/pull/201 +func FetchCoreOSBuild(ctx context.Context) (*stream.Stream, error) { + file, err := data.Assets.Open(fmt.Sprintf("rhcos-4.8.json")) if err != nil { return nil, err } defer file.Close() body, err := ioutil.ReadAll(file) - if os.IsNotExist(err) { - return nil, errInvalidArch - } else if err != nil { + if err != nil { return nil, err } - var meta *metadata - if err := json.Unmarshal(body, &meta); err != nil { - return meta, errors.Wrap(err, "failed to parse RHCOS build metadata") + var st stream.Stream + if err := json.Unmarshal(body, &st); err != nil { + return nil, errors.Wrap(err, "failed to parse CoreOS stream metadata") } + return &st, nil +} - return meta, nil +// FormatURLWithIntegrity squashes an artifact into a URL string +// with the uncompressed sha256 as a query parameter. This is necessary +// currently because various parts of the installer pass around this +// reference as a string, and it's also exposed to users via install-config overrides. +func FormatURLWithIntegrity(artifact *stream.Artifact) (string, error) { + u, err := url.Parse(artifact.Location) + if err != nil { + return "", fmt.Errorf("failed to parse artifact URL: %v", err) + } + q := u.Query() + q.Set("sha256", artifact.UncompressedSha256) + u.RawQuery = q.Encode() + return u.String(), nil +} + +// FindArtifactURL uses the first recognized artifact type; this +// mainly abstracts over e.g. `qcow2.xz` and `qcow2.gz`. The main +// platform with multiple artifact types today is `metal`; don't +// use this for that platform. +func FindArtifactURL(artifacts stream.PlatformArtifacts) (string, error) { + for _, v := range artifacts.Formats { + if v.Disk != nil { + return FormatURLWithIntegrity(v.Disk) + } + } + return "", fmt.Errorf("no \"disk\" artifact found") } diff --git a/pkg/rhcos/gcp.go b/pkg/rhcos/gcp.go deleted file mode 100644 index 96dbbf27833..00000000000 --- a/pkg/rhcos/gcp.go +++ /dev/null @@ -1,30 +0,0 @@ -package rhcos - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" -) - -// GCP fetches the URL of the public RHCOS image -func GCP(ctx context.Context, arch types.Architecture) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - return fmt.Sprintf("projects/%s/global/images/%s", meta.GCP.Project, meta.GCP.Image), nil -} - -// GCPRaw fetches the URL of the public GCP storage bucket containing the RHCOS image -func GCPRaw(ctx context.Context, arch types.Architecture) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - return meta.GCP.URL, nil -} diff --git a/pkg/rhcos/openstack.go b/pkg/rhcos/openstack.go index 7f25ac7d815..574ed125a9c 100644 --- a/pkg/rhcos/openstack.go +++ b/pkg/rhcos/openstack.go @@ -1,48 +1,9 @@ package rhcos import ( - "context" "net/url" - - "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" ) -// OpenStack fetches the URL of the Red Hat Enterprise Linux CoreOS release, -// for the openstack platform -func OpenStack(ctx context.Context, arch types.Architecture) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - base, err := url.Parse(meta.BaseURI) - if err != nil { - return "", err - } - - relOpenStack, err := url.Parse(meta.Images.OpenStack.Path) - if err != nil { - return "", err - } - - baseURL := base.ResolveReference(relOpenStack).String() - - // Attach sha256 checksum to the URL. Always provide the - // uncompressed SHA256; the cache will take care of - // uncompressing before checksumming. - baseURL += "?sha256=" + meta.Images.OpenStack.UncompressedSHA256 - - // Check that we have generated a valid URL - _, err = url.ParseRequestURI(baseURL) - if err != nil { - return "", err - } - - return baseURL, nil -} - // GenerateOpenStackImageName returns Glance image name for instances. func GenerateOpenStackImageName(rhcosImage, infraID string) (imageName string, isURL bool) { // Here we check whether rhcosImage is a URL or not. If this is the first case, it means that Glance image diff --git a/pkg/rhcos/qemu.go b/pkg/rhcos/qemu.go deleted file mode 100644 index f0c0026cc80..00000000000 --- a/pkg/rhcos/qemu.go +++ /dev/null @@ -1,43 +0,0 @@ -package rhcos - -import ( - "context" - "net/url" - - "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" -) - -// QEMU fetches the URL of the Red Hat Enterprise Linux CoreOS release. -func QEMU(ctx context.Context, arch types.Architecture) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - base, err := url.Parse(meta.BaseURI) - if err != nil { - return "", err - } - - relQEMU, err := url.Parse(meta.Images.QEMU.Path) - if err != nil { - return "", err - } - - baseURL := base.ResolveReference(relQEMU).String() - - // Attach sha256 checksum to the URL. Always provide the - // uncompressed SHA256; the cache will take care of - // uncompressing before checksumming. - baseURL += "?sha256=" + meta.Images.QEMU.UncompressedSHA256 - - // Check that we have generated a valid URL - _, err = url.ParseRequestURI(baseURL) - if err != nil { - return "", err - } - - return baseURL, nil -} diff --git a/pkg/rhcos/vmware.go b/pkg/rhcos/vmware.go deleted file mode 100644 index d3b1a368f3f..00000000000 --- a/pkg/rhcos/vmware.go +++ /dev/null @@ -1,43 +0,0 @@ -package rhcos - -import ( - "context" - "net/url" - - "github.com/pkg/errors" - - "github.com/openshift/installer/pkg/types" -) - -// VMware fetches the URL of the Red Hat Enterprise Linux CoreOS release. -func VMware(ctx context.Context, arch types.Architecture) (string, error) { - meta, err := fetchRHCOSBuild(ctx, arch) - if err != nil { - return "", errors.Wrap(err, "failed to fetch RHCOS metadata") - } - - base, err := url.Parse(meta.BaseURI) - if err != nil { - return "", err - } - - image, err := url.Parse(meta.Images.VMware.Path) - if err != nil { - return "", err - } - - baseURL := base.ResolveReference(image).String() - - // Attach sha256 checksum to the URL. Always provide the - // uncompressed SHA256; the cache will take care of - // uncompressing before checksumming. - baseURL += "?sha256=" + meta.Images.VMware.SHA256 - - // Check that we have generated a valid URL - _, err = url.ParseRequestURI(baseURL) - if err != nil { - return "", err - } - - return baseURL, nil -} diff --git a/vendor/github.com/coreos/stream-metadata-go/LICENSE b/vendor/github.com/coreos/stream-metadata-go/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/vendor/github.com/coreos/stream-metadata-go/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/coreos/stream-metadata-go/arch/arch.go b/vendor/github.com/coreos/stream-metadata-go/arch/arch.go new file mode 100644 index 00000000000..d4a3e6b79ef --- /dev/null +++ b/vendor/github.com/coreos/stream-metadata-go/arch/arch.go @@ -0,0 +1,48 @@ +// package arch contains mappings between the Golang architecture and +// the RPM architecture used by Fedora CoreOS and derivatives. +package arch + +import "runtime" + +type mapping struct { + rpmArch string + goArch string +} + +// If an architecture isn't defined here, we assume it's +// pass through. +var translations = []mapping{ + { + rpmArch: "x86_64", + goArch: "amd64", + }, + { + rpmArch: "aarch64", + goArch: "arm64", + }, +} + +// CurrentRpmArch returns the current architecture in RPM terms. +func CurrentRpmArch() string { + return RpmArch(runtime.GOARCH) +} + +// RpmArch translates a Go architecture to RPM. +func RpmArch(goarch string) string { + for _, m := range translations { + if m.goArch == goarch { + return m.rpmArch + } + } + return goarch +} + +// GoArch translates an RPM architecture to Go. +func GoArch(rpmarch string) string { + for _, m := range translations { + if m.rpmArch == rpmarch { + return m.goArch + } + } + return rpmarch +} diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go b/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go new file mode 100644 index 00000000000..320d84b41d4 --- /dev/null +++ b/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go @@ -0,0 +1,18 @@ +package rhcos + +// Extensions is data specific to Red Hat Enterprise Linux CoreOS +type Extensions struct { + AzureDisk *AzureDisk `json:"azure-disk,omitempty"` +} + +// AzureDisk represents an Azure disk image that can be imported +// into an image gallery or otherwise replicated, and then used +// as a boot source for virtual machines. +type AzureDisk struct { + // Release is the source release version + Release string `json:"release"` + // URL to an image already stored in Azure infrastructure + // that can be copied into an image gallery. Avoid creating VMs directly + // from this URL as that may lead to performance limitations. + URL string `json:"url,omitempty"` +} diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/stream.go b/vendor/github.com/coreos/stream-metadata-go/stream/stream.go new file mode 100644 index 00000000000..e3f100cea59 --- /dev/null +++ b/vendor/github.com/coreos/stream-metadata-go/stream/stream.go @@ -0,0 +1,74 @@ +// Package stream models a CoreOS "stream", which is +// a description of the recommended set of binary images for CoreOS. Use +// this API to find cloud images, bare metal disk images, etc. +package stream + +import ( + "github.com/coreos/stream-metadata-go/stream/rhcos" +) + +// Stream contains artifacts available in a stream +type Stream struct { + Stream string `json:"stream"` + Metadata Metadata `json:"metadata"` + Architectures map[string]Arch `json:"architectures"` +} + +// Metadata for a release or stream +type Metadata struct { + LastModified string `json:"last-modified"` +} + +// Arch contains release details for a particular hardware architecture +type Arch struct { + Artifacts map[string]PlatformArtifacts `json:"artifacts"` + Images Images `json:"images,omitempty"` + // RHELCoreOSExtensions is data specific to Red Hat Enterprise Linux CoreOS + RHELCoreOSExtensions *rhcos.Extensions `json:"rhel-coreos-extensions,omitempty"` +} + +// PlatformArtifacts contains images for a platform +type PlatformArtifacts struct { + Release string `json:"release"` + Formats map[string]ImageFormat `json:"formats"` +} + +// ImageFormat contains all artifacts for a single OS image +type ImageFormat struct { + Disk *Artifact `json:"disk,omitempty"` + Kernel *Artifact `json:"kernel,omitempty"` + Initramfs *Artifact `json:"initramfs,omitempty"` + Rootfs *Artifact `json:"rootfs,omitempty"` +} + +// Artifact represents one image file, plus its metadata +type Artifact struct { + Location string `json:"location"` + Signature string `json:"signature"` + Sha256 string `json:"sha256"` + UncompressedSha256 string `json:"uncompressed-sha256,omitempty"` +} + +// Images contains images available in cloud providers +type Images struct { + Aws *AwsImage `json:"aws,omitempty"` + Gcp *GcpImage `json:"gcp,omitempty"` +} + +// AwsImage represents an image across all AWS regions +type AwsImage struct { + Regions map[string]AwsRegionImage `json:"regions,omitempty"` +} + +// AwsRegionImage represents an image in one AWS region +type AwsRegionImage struct { + Release string `json:"release"` + Image string `json:"image"` +} + +// GcpImage represents a GCP cloud image +type GcpImage struct { + Project string `json:"project,omitempty"` + Family string `json:"family,omitempty"` + Name string `json:"name,omitempty"` +} diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go b/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go new file mode 100644 index 00000000000..64247ffcde2 --- /dev/null +++ b/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go @@ -0,0 +1,47 @@ +package stream + +import "fmt" + +// FormatPrefix describes a stream+architecture combination, intended for prepending to error messages +func (st *Stream) FormatPrefix(archname string) string { + return fmt.Sprintf("stream:%s arch:%s", st.Stream, archname) +} + +// GetArchitecture loads the architecture-specific builds from a stream, +// with a useful descriptive error message if the architecture is not found. +func (st *Stream) GetArchitecture(archname string) (*Arch, error) { + archdata, ok := st.Architectures[archname] + if !ok { + return nil, fmt.Errorf("stream:%s does not have architecture '%s'", st.Stream, archname) + } + return &archdata, nil +} + +// GetAwsRegionImage returns the release data (AMI and release ID) for a particular +// architecture and region. +func (st *Stream) GetAwsRegionImage(archname, region string) (*AwsRegionImage, error) { + starch, err := st.GetArchitecture(archname) + if err != nil { + return nil, err + } + awsimages := starch.Images.Aws + if awsimages == nil { + return nil, fmt.Errorf("%s: No AWS images", st.FormatPrefix(archname)) + } + var regionVal AwsRegionImage + var ok bool + if regionVal, ok = awsimages.Regions[region]; !ok { + return nil, fmt.Errorf("%s: No AWS images in region %s", st.FormatPrefix(archname), region) + } + + return ®ionVal, nil +} + +// GetAMI returns the AWS machine image for a particular architecture and region. +func (st *Stream) GetAMI(archname, region string) (string, error) { + regionVal, err := st.GetAwsRegionImage(archname, region) + if err != nil { + return "", err + } + return regionVal.Image, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index b58dfe05dda..5dca6e7d388 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -430,6 +430,11 @@ github.com/coreos/ignition/v2/config/util github.com/coreos/ignition/v2/config/v3_1/types github.com/coreos/ignition/v2/config/v3_2/types github.com/coreos/ignition/v2/config/validate +# github.com/coreos/stream-metadata-go v0.0.0-20210216154348-7c4d5d7d95b5 +## explicit +github.com/coreos/stream-metadata-go/arch +github.com/coreos/stream-metadata-go/stream +github.com/coreos/stream-metadata-go/stream/rhcos # github.com/coreos/vcontext v0.0.0-20201120045928-b0e13dab675c github.com/coreos/vcontext/json github.com/coreos/vcontext/path