Skip to content

Commit

Permalink
Merge pull request #3233 from Prashanth684/4.3-multiarch-images
Browse files Browse the repository at this point in the history
Bug 1818140: Backport adding groundwork for multi-arch images
  • Loading branch information
openshift-merge-robot authored Mar 27, 2020
2 parents 9d52b2d + 791f248 commit 0a7f198
Show file tree
Hide file tree
Showing 27 changed files with 436 additions and 127 deletions.
135 changes: 135 additions & 0 deletions data/data/rhcos-amd64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"amis": {
"ap-northeast-1": {
"hvm": "ami-0ade724aa9d3514b2"
},
"ap-northeast-2": {
"hvm": "ami-0465f2a5450aa0257"
},
"ap-south-1": {
"hvm": "ami-05a3e4b22ecffdf62"
},
"ap-southeast-1": {
"hvm": "ami-00df6135b05c0a02a"
},
"ap-southeast-2": {
"hvm": "ami-075295f492dbaa347"
},
"ca-central-1": {
"hvm": "ami-0a27aa00147a3a2d9"
},
"eu-central-1": {
"hvm": "ami-0e8ca170012209d72"
},
"eu-north-1": {
"hvm": "ami-0c736720637f6b42d"
},
"eu-west-1": {
"hvm": "ami-0770d1d7e95da7ba3"
},
"eu-west-2": {
"hvm": "ami-08499730d4db69065"
},
"eu-west-3": {
"hvm": "ami-0658bcfda04098635"
},
"me-south-1": {
"hvm": "ami-0ea763ffb3e1c62cf"
},
"sa-east-1": {
"hvm": "ami-0298057a4a12e874a"
},
"us-east-1": {
"hvm": "ami-0523c75e911667e58"
},
"us-east-2": {
"hvm": "ami-0d8f77b753c0d96dd"
},
"us-west-1": {
"hvm": "ami-0782247660ad3a3bb"
},
"us-west-2": {
"hvm": "ami-0f0fac946d1d31e97"
}
},
"azure": {
"image": "rhcos-43.81.202003111353.0-azure.x86_64.vhd",
"url": "https://rhcos.blob.core.windows.net/imagebucket/rhcos-43.81.202003111353.0-azure.x86_64.vhd"
},
"baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3/43.81.202003111353.0/x86_64/",
"buildid": "43.81.202003111353.0",
"gcp": {
"image": "rhcos-43-81-202003111353-0",
"url": "https://storage.googleapis.com/rhcos/rhcos/43.81.202003111353.0.tar.gz"
},
"images": {
"aws": {
"path": "rhcos-43.81.202003111353.0-aws.x86_64.vmdk.gz",
"sha256": "e4cbc50409d93fb88d711a89e62c56639579abf804bf2d25b210f43929939000",
"size": 814861898,
"uncompressed-sha256": "2383f9687db4b2f40bf70f2a9750f651c135d09973f7e7f7ed02ac05179e0ea2",
"uncompressed-size": 831565312
},
"azure": {
"path": "rhcos-43.81.202003111353.0-azure.x86_64.vhd.gz",
"sha256": "a2c75bfb3f1c75bd21bba1d669631b05692c1a91a88802bbcd7a3218e1834ff6",
"size": 802153013,
"uncompressed-sha256": "bd427aaa3fab89261ac565a89b0b6d066e3a559e2d62d1f6cb749294963162df",
"uncompressed-size": 2189996544
},
"gcp": {
"path": "rhcos-43.81.202003111353.0-gcp.x86_64.tar.gz",
"sha256": "8baade8d055181d538f75e00367a860c9197c684924062919eb982f5101d27d1",
"size": 801779472
},
"initramfs": {
"path": "rhcos-43.81.202003111353.0-installer-initramfs.x86_64.img",
"sha256": "fa01f1eeeaf6924d8d20bf5834d3853985167b670a0de30a32bc80d3f8c700d4"
},
"iso": {
"path": "rhcos-43.81.202003111353.0-installer.x86_64.iso",
"sha256": "b10975f240769e6f606981be4fe4740536522f7afefe30c95d93f059db48c756"
},
"kernel": {
"path": "rhcos-43.81.202003111353.0-installer-kernel-x86_64",
"sha256": "4d7f7b0a631a8f3fd34c9d39e7a037655871f05d503af240e7647a5f4e6490c9"
},
"metal": {
"path": "rhcos-43.81.202003111353.0-metal.x86_64.raw.gz",
"sha256": "de35f0e0b75c907c805aef687120b34c00e158bd5afaaf7aa60097fe3ed65480",
"size": 803474932,
"uncompressed-sha256": "30e867fb2c2490873276c175e178d77646dd304c91e05d8f99493ebfb16c2fef",
"uncompressed-size": 3369074688
},
"openstack": {
"path": "rhcos-43.81.202003111353.0-openstack.x86_64.qcow2.gz",
"sha256": "8f17baa5564450eea4d3b6f817df3df58af7c3294583be62de615663c0ec55a5",
"size": 803742118,
"uncompressed-sha256": "4d204e638d365d9de121f5d513cff2567abd9232710f4bb79992efa4ba718008",
"uncompressed-size": 2148728832
},
"ostree": {
"path": "rhcos-43.81.202003111353.0-ostree.x86_64.tar",
"sha256": "c1501350436424ec6d7a805c52b3fc665fe490912f5a16d94bf267c9efa2848f",
"size": 722647040
},
"qemu": {
"path": "rhcos-43.81.202003111353.0-qemu.x86_64.qcow2.gz",
"sha256": "cd3260155e494efdb38d0b3019a29980675bff2fee05a80162bd7a587a9bdba6",
"size": 804202741,
"uncompressed-sha256": "bee078cfef57f51d11dcdc7211185e5e85016e044081f3aec9b42637ebd05fec",
"uncompressed-size": 2148663296
},
"vmware": {
"path": "rhcos-43.81.202003111353.0-vmware.x86_64.ova",
"sha256": "c60c94b3ee918379230c63ca18ea144fed57088bc51eee5f12cf839ceb6c1fb6",
"size": 831580160
}
},
"oscontainer": {
"digest": "sha256:eb81a7625f9fc3d1575f92dd4e825b02ec6e362c88a1bd6e048c789a7f965771",
"image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev"
},
"ostree-commit": "86e3934e5a039782f1f1df0f827ce00be7572f9be2441e0d7631a20dff9b2933",
"ostree-version": "43.81.202003111353.0"
}
50 changes: 50 additions & 0 deletions data/data/rhcos-ppc64le.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3-ppc64le/43.81.202003172241.0/ppc64le/",
"buildid": "43.81.202003172241.0",
"images": {
"initramfs": {
"path": "rhcos-43.81.202003172241.0-installer-initramfs.ppc64le.img",
"sha256": "451bfc5b1a872b92c3567d0892eac101bc43bc2d9934c4d6933c379d1936b409"
},
"iso": {
"path": "rhcos-43.81.202003172241.0-installer.ppc64le.iso",
"sha256": "9debdc0bfe2380a2ee057cb1db686f80e95ea9d1c0e45ea8ca70a956467622e8"
},
"kernel": {
"path": "rhcos-43.81.202003172241.0-installer-kernel-ppc64le",
"sha256": "5a78b5099da27cbe6d22032c8e55542c1b2885e8c1e69206f7fc390dae9897b7"
},
"metal": {
"path": "rhcos-43.81.202003172241.0-metal.ppc64le.raw.gz",
"sha256": "0f62f700d805e104e6d5f7743a42101050ab390f18005c11991c80e7a8a42fd6",
"size": 775658410,
"uncompressed-sha256": "2d9678ffbd09ea9f1536f981e9104c5bc26e6326e9c75aa1b162957f7c83f661",
"uncompressed-size": 3486515200
},
"openstack": {
"path": "rhcos-43.81.202003172241.0-openstack.ppc64le.qcow2.gz",
"sha256": "a9c35106ba9ae2c7bf0543d460b5f9278f0624bd39e121b3baaecead68b1326a",
"size": 774596933,
"uncompressed-sha256": "0af1fecc742a46d376a053783d46210188fc77c93e4186e8aa3586d7b09ed0f1",
"uncompressed-size": 2246377472
},
"ostree": {
"path": "rhcos-43.81.202003172241.0-ostree.ppc64le.tar",
"sha256": "57da39c5b22ea077e2f7835ca8b140d55c1154c376b911bbf22cd103480f357e",
"size": 692090880
},
"qemu": {
"path": "rhcos-43.81.202003172241.0-qemu.ppc64le.qcow2.gz",
"sha256": "cc7b2ae27936cd67be3338432a11f5b24f36edcef0c6c43c5c2807bb20f4ae1c",
"size": 775059270,
"uncompressed-sha256": "caef1dc9cc9d08f56241c37a77e08f90d4f72d448569caead522ae5aba239c8f",
"uncompressed-size": 2246311936
}
},
"oscontainer": {
"digest": "sha256:d61cfef76f88a5d3028d28c80b9ecbbb2a20c3dc152d66566375fb5589e9105e",
"image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev"
},
"ostree-commit": "2212098f5ea4361b60987472185f0406e8d78253b5b16399610809abe74d26cc",
"ostree-version": "43.81.202003172241.0"
}
57 changes: 57 additions & 0 deletions data/data/rhcos-s390x.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"baseURI": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.3-s390x/43.81.202003172338.0/s390x/",
"buildid": "43.81.202003172338.0",
"images": {
"dasd": {
"path": "rhcos-43.81.202003172338.0-dasd.s390x.raw.gz",
"sha256": "6b2e0ac527cc33f47154e125be51542291657fea3c51d7e30000a79b46d27446",
"size": 702271061,
"uncompressed-sha256": "789d52cb84fdfd7d5167f6a6b4e1b0803c7696bf96777e7c4911caf6b5ad31a1",
"uncompressed-size": 3171942400
},
"initramfs": {
"path": "rhcos-43.81.202003172338.0-installer-initramfs.s390x.img",
"sha256": "fcb4958ab779bc2d59a451deb62e62b929b7d2fb2b404c698d04968c69ee82ea"
},
"iso": {
"path": "rhcos-43.81.202003172338.0-installer.s390x.iso",
"sha256": "1df3e0cbe8e15c27b3133e59df4a19fd23b01743f37f7cfc5b2283f2129e4cbc"
},
"kernel": {
"path": "rhcos-43.81.202003172338.0-installer-kernel-s390x",
"sha256": "02084b138d77182a3a58dc2e290ab47ec412c5a0441f6d2989c02a89d60f613a"
},
"metal": {
"path": "rhcos-43.81.202003172338.0-metal.s390x.raw.gz",
"sha256": "5e9f11b6c0c310daecabe75fd3435eeb810f9283d322e9efc890e5d8a97c0202",
"size": 702238370,
"uncompressed-sha256": "884be2265e5bc9f310874aed3d093dd4deed187caa240a32672d315bbfeddafa",
"uncompressed-size": 3171942400
},
"openstack": {
"path": "rhcos-43.81.202003172338.0-openstack.s390x.qcow2.gz",
"sha256": "9784da7eee7b7c8d07d68da3900634ad17e3d59c86b4eb79554b8a8b2b4fcf11",
"size": 702634988,
"uncompressed-sha256": "59d290e40071298b852d233ebcbae9df527836729d2b35862768e0b7e27857d5",
"uncompressed-size": 1978335232
},
"ostree": {
"path": "rhcos-43.81.202003172338.0-ostree.s390x.tar",
"sha256": "e85d4cff77aeb3e8fd4c04e3ae578be017995ba16975a62256f68515186ec3a1",
"size": 642109440
},
"qemu": {
"path": "rhcos-43.81.202003172338.0-qemu.s390x.qcow2.gz",
"sha256": "5384458dcaa5e8a8795355046106335fda9a7c079cd165addf7729989afd9377",
"size": 703123878,
"uncompressed-sha256": "717e3d74403e56878961d4e654a161c088c9c1ccf94bbd407fd273b302db376d",
"uncompressed-size": 1978204160
}
},
"oscontainer": {
"digest": "sha256:0b513016131fdab7760dee9ffeab65f7b1c4a928123e81367a0c34c4393a2c0e",
"image": "quay.io/openshift-release-dev/ocp-v4.0-art-dev"
},
"ostree-commit": "fed64caf6e88503e9190e84fbb9a57ab63783e12ab3895bf67e68f66d11b84d1",
"ostree-version": "43.81.202003172338.0"
}
2 changes: 2 additions & 0 deletions docs/user/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ For example, 10.0.0.0/16 represents IP addresses 10.0.0.0 through 10.0.255.255.

The following machine-pool properties are available:

* `architecture` (optional string): Determines the instruction set architecture of the machines in the pool. Currently, heteregeneous clusters are not supported, so all pools must specify the same architecture.
Valid values are `amd64` (the default).
* `hyperthreading` (optional string): Determines the mode of hyperthreading that machines in the pool will utilize.
Valid values are `Enabled` (the default) and `Disabled`.
* `name` (required string): The name of the machine pool.
Expand Down
34 changes: 23 additions & 11 deletions hack/update-rhcos-bootimage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python3
# Usage: ./hack/update-rhcos-bootimage.py https://releases-art-rhcos.svc.ci.openshift.org/storage/releases/ootpa/410.8.20190401.0/meta.json
#!/usr/bin/env python3
# Usage: ./hack/update-rhcos-bootimage.py https://releases-art-rhcos.svc.ci.openshift.org/storage/releases/ootpa/410.8.20190401.0/meta.json amd64
import codecs,os,sys,json,argparse
import urllib.parse
import urllib.request
Expand All @@ -8,12 +8,13 @@
# builds. Do not try to e.g. point to RHT-internal endpoints.
RHCOS_RELEASES_APP = 'https://releases-art-rhcos.svc.ci.openshift.org'

dn = os.path.abspath(os.path.dirname(sys.argv[0]))

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)

Expand All @@ -24,13 +25,24 @@
for k in ['images', 'buildid', 'oscontainer',
'ostree-commit', 'ostree-version',
'azure', 'gcp']:
newmeta[k] = meta[k]
newmeta['amis'] = {
entry['name']: {
'hvm': entry['hvm'],
if meta.get(k):
newmeta[k] = meta[k]
if meta.get(k):
newmeta['amis'] = {
entry['name']: {
'hvm': entry['hvm'],
}
for entry in meta['amis']
}
for entry in meta['amis']
}
newmeta['baseURI'] = urllib.parse.urljoin(args.meta, '.')
with open(os.path.join(dn, "../data/data/rhcos.json"), 'w') as f:

with open(os.path.join(metadata_dir, f"rhcos-{args.arch}.json"), '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)
6 changes: 6 additions & 0 deletions pkg/asset/installconfig/installconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ func TestInstallConfigGenerate_FillsInDefaults(t *testing.T) {
Name: "master",
Replicas: pointer.Int64Ptr(3),
Hyperthreading: types.HyperthreadingEnabled,
Architecture: types.ArchitectureAMD64,
},
Compute: []types.MachinePool{
{
Name: "worker",
Replicas: pointer.Int64Ptr(3),
Hyperthreading: types.HyperthreadingEnabled,
Architecture: types.ArchitectureAMD64,
},
},
Platform: types.Platform{
Expand Down Expand Up @@ -145,12 +147,14 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
Name: "master",
Replicas: pointer.Int64Ptr(3),
Hyperthreading: types.HyperthreadingEnabled,
Architecture: types.ArchitectureAMD64,
},
Compute: []types.MachinePool{
{
Name: "worker",
Replicas: pointer.Int64Ptr(3),
Hyperthreading: types.HyperthreadingEnabled,
Architecture: types.ArchitectureAMD64,
},
},
Platform: types.Platform{
Expand Down Expand Up @@ -229,12 +233,14 @@ network:
Name: "master",
Replicas: pointer.Int64Ptr(3),
Hyperthreading: types.HyperthreadingEnabled,
Architecture: types.ArchitectureAMD64,
},
Compute: []types.MachinePool{
{
Name: "worker",
Replicas: pointer.Int64Ptr(3),
Hyperthreading: types.HyperthreadingEnabled,
Architecture: types.ArchitectureAMD64,
},
},
Platform: types.Platform{
Expand Down
14 changes: 9 additions & 5 deletions pkg/asset/manifests/operators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ func TestRedactedInstallConfig(t *testing.T) {
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("1.2.3.4/5")},
},
ControlPlane: &types.MachinePool{
Name: "control-plane",
Replicas: pointer.Int64Ptr(3),
Name: "control-plane",
Replicas: pointer.Int64Ptr(3),
Architecture: types.ArchitectureAMD64,
},
Compute: []types.MachinePool{
{
Name: "compute",
Replicas: pointer.Int64Ptr(3),
Name: "compute",
Replicas: pointer.Int64Ptr(3),
Architecture: types.ArchitectureAMD64,
},
},
Platform: types.Platform{
Expand All @@ -59,10 +61,12 @@ func TestRedactedInstallConfig(t *testing.T) {
expectedConfig := createInstallConfig()
expectedYaml := `baseDomain: test-domain
compute:
- name: compute
- architecture: amd64
name: compute
platform: {}
replicas: 3
controlPlane:
architecture: amd64
name: control-plane
platform: {}
replicas: 3
Expand Down
Loading

0 comments on commit 0a7f198

Please sign in to comment.