RHEL-86: add gce-rhui image type
Add the `gce-rhui` image type intended for Google Compute Engine. The image uses Google's RHUI infrastructure to access Red Hat content. Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
db75c39c4d
commit
0219ad1f43
11 changed files with 11828 additions and 5 deletions
|
|
@ -108,6 +108,7 @@ func GetDefaultConfig() *ComposerConfigFile {
|
|||
"ec2",
|
||||
"ec2-ha",
|
||||
"ec2-sap",
|
||||
"gce-rhui",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ func TestDefaultConfig(t *testing.T) {
|
|||
"ec2",
|
||||
"ec2-ha",
|
||||
"ec2-sap",
|
||||
"gce-rhui",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1611,6 +1611,51 @@ func newDistro(distroName string) distro.Distro {
|
|||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
defaultGceRhuiImageConfig := &distro.ImageConfig{
|
||||
RHSMConfig: map[distro.RHSMSubscriptionStatus]*osbuild.RHSMStageOptions{
|
||||
distro.RHSMConfigNoSubscription: {
|
||||
SubMan: &osbuild.RHSMStageOptionsSubMan{
|
||||
Rhsmcertd: &osbuild.SubManConfigRHSMCERTDSection{
|
||||
AutoRegistration: common.BoolToPtr(true),
|
||||
},
|
||||
Rhsm: &osbuild.SubManConfigRHSMSection{
|
||||
ManageRepos: common.BoolToPtr(false),
|
||||
},
|
||||
},
|
||||
},
|
||||
distro.RHSMConfigWithSubscription: {
|
||||
SubMan: &osbuild.RHSMStageOptionsSubMan{
|
||||
Rhsmcertd: &osbuild.SubManConfigRHSMCERTDSection{
|
||||
AutoRegistration: common.BoolToPtr(true),
|
||||
},
|
||||
// do not disable the redhat.repo management if the user
|
||||
// explicitly request the system to be subscribed
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
defaultGceRhuiImageConfig = defaultGceRhuiImageConfig.InheritFrom(defaultGceByosImageConfig)
|
||||
|
||||
gceRhuiImgType := imageType{
|
||||
name: "gce-rhui",
|
||||
filename: "image.tar.gz",
|
||||
mimeType: "application/gzip",
|
||||
packageSets: map[string]packageSetFunc{
|
||||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: gceRhuiPackageSet,
|
||||
},
|
||||
defaultImageConfig: defaultGceRhuiImageConfig,
|
||||
kernelOptions: "net.ifnames=0 biosdevname=0 scsi_mod.use_blk_mq=Y crashkernel=auto console=ttyS0,38400n8d",
|
||||
bootable: true,
|
||||
bootType: distro.UEFIBootType,
|
||||
defaultSize: 20 * GigaByte,
|
||||
pipelines: gcePipelines,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "archive"},
|
||||
exports: []string{"archive"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
tarImgType := imageType{
|
||||
name: "tar",
|
||||
filename: "root.tar.xz",
|
||||
|
|
@ -1650,7 +1695,7 @@ func newDistro(distroName string) distro.Distro {
|
|||
ociImgType := qcow2ImgType
|
||||
ociImgType.name = "oci"
|
||||
|
||||
x86_64.addImageTypes(qcow2ImgType, vhdImgType, vmdkImgType, openstackImgType, amiImgTypeX86_64, tarImgType, imageInstaller, edgeCommitImgType, edgeInstallerImgType, edgeOCIImgType, edgeRawImgType, edgeSimplifiedInstallerImgType, ociImgType, gceImgType)
|
||||
x86_64.addImageTypes(qcow2ImgType, vhdImgType, vmdkImgType, openstackImgType, amiImgTypeX86_64, tarImgType, imageInstaller, edgeCommitImgType, edgeInstallerImgType, edgeOCIImgType, edgeRawImgType, edgeSimplifiedInstallerImgType, ociImgType, gceImgType, gceRhuiImgType)
|
||||
aarch64.addImageTypes(qcow2ImgType, openstackImgType, amiImgTypeAarch64, tarImgType, imageInstaller, edgeCommitImgType, edgeInstallerImgType, edgeOCIImgType, edgeRawImgType, edgeSimplifiedInstallerImgType)
|
||||
ppc64le.addImageTypes(qcow2ImgType, tarImgType)
|
||||
s390x.addImageTypes(qcow2ImgType, tarImgType)
|
||||
|
|
|
|||
|
|
@ -187,6 +187,14 @@ func TestFilenameFromType(t *testing.T) {
|
|||
mimeType: "application/gzip",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "gce-rhui",
|
||||
args: args{"gce-rhui"},
|
||||
want: wantResult{
|
||||
filename: "image.tar.gz",
|
||||
mimeType: "application/gzip",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid-output-type",
|
||||
args: args{"foobar"},
|
||||
|
|
@ -288,6 +296,7 @@ func TestImageType_Name(t *testing.T) {
|
|||
"ec2-ha",
|
||||
"ec2-sap",
|
||||
"gce",
|
||||
"gce-rhui",
|
||||
"edge-commit",
|
||||
"edge-container",
|
||||
"edge-installer",
|
||||
|
|
@ -476,6 +485,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"ec2-ha",
|
||||
"ec2-sap",
|
||||
"gce",
|
||||
"gce-rhui",
|
||||
"edge-commit",
|
||||
"edge-container",
|
||||
"edge-installer",
|
||||
|
|
|
|||
|
|
@ -626,6 +626,15 @@ func gcePackageSet(t *imageType) rpmmd.PackageSet {
|
|||
return gceCommonPackageSet(t)
|
||||
}
|
||||
|
||||
// GCE RHUI image
|
||||
func gceRhuiPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"google-rhui-client-rhel8",
|
||||
},
|
||||
}.Append(gceCommonPackageSet(t))
|
||||
}
|
||||
|
||||
// edge commit OS package set
|
||||
func edgeCommitPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
ps := rpmmd.PackageSet{
|
||||
|
|
|
|||
|
|
@ -368,6 +368,7 @@ var imageTypeCompatMapping = map[string]string{
|
|||
"ec2-ha": "ec2-ha",
|
||||
"oci": "oci",
|
||||
"gce": "GCP",
|
||||
"gce-rhui": "GCE RHUI",
|
||||
}
|
||||
|
||||
func imageTypeToCompatString(imgType distro.ImageType) string {
|
||||
|
|
|
|||
11744
test/data/manifests/rhel_86-x86_64-gce_rhui-boot.json
Normal file
11744
test/data/manifests/rhel_86-x86_64-gce_rhui-boot.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -160,6 +160,7 @@
|
|||
"ec2-ha",
|
||||
"ec2-sap",
|
||||
"gce",
|
||||
"gce-rhui",
|
||||
"openstack",
|
||||
"tar",
|
||||
"qcow2",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,17 @@
|
|||
},
|
||||
"overrides": {}
|
||||
},
|
||||
"gce-rhui": {
|
||||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"image-type": "gce-rhui",
|
||||
"repositories": [],
|
||||
"filename": "image.tar.gz",
|
||||
"blueprint": {}
|
||||
},
|
||||
"overrides": {}
|
||||
},
|
||||
"edge-commit": {
|
||||
"compose-request": {
|
||||
"distro": "",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue