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
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue