distro: Add azure-sap-rhui image type to RHEL8
This commit is contained in:
parent
a47c239d11
commit
8c07d65fe0
5 changed files with 44 additions and 1 deletions
|
|
@ -78,7 +78,8 @@ func (c *ComposerConfigFile) weldrDistrosImageTypeDenyList() map[string][]string
|
||||||
|
|
||||||
// GetDefaultConfig returns the default configuration of osbuild-composer
|
// GetDefaultConfig returns the default configuration of osbuild-composer
|
||||||
// Defaults:
|
// Defaults:
|
||||||
// - 'azure-rhui', 'ec2', 'ec2-ha', 'ec2-sap' image types on 'rhel-85' are not exposed via Weldr API
|
// - 'azure-rhui', 'azure-sap-rhui', 'ec2', 'ec2-ha', 'ec2-sap' image types on 'rhel-*'
|
||||||
|
// are not exposed via Weldr API
|
||||||
func GetDefaultConfig() *ComposerConfigFile {
|
func GetDefaultConfig() *ComposerConfigFile {
|
||||||
return &ComposerConfigFile{
|
return &ComposerConfigFile{
|
||||||
Koji: KojiAPIConfig{
|
Koji: KojiAPIConfig{
|
||||||
|
|
@ -99,6 +100,7 @@ func GetDefaultConfig() *ComposerConfigFile {
|
||||||
"rhel-*": {
|
"rhel-*": {
|
||||||
ImageTypeDenyList: []string{
|
ImageTypeDenyList: []string{
|
||||||
"azure-rhui",
|
"azure-rhui",
|
||||||
|
"azure-sap-rhui",
|
||||||
"ec2",
|
"ec2",
|
||||||
"ec2-ha",
|
"ec2-ha",
|
||||||
"ec2-sap",
|
"ec2-sap",
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ func TestDefaultConfig(t *testing.T) {
|
||||||
"rhel-*": {
|
"rhel-*": {
|
||||||
[]string{
|
[]string{
|
||||||
"azure-rhui",
|
"azure-rhui",
|
||||||
|
"azure-sap-rhui",
|
||||||
"ec2",
|
"ec2",
|
||||||
"ec2-ha",
|
"ec2-ha",
|
||||||
"ec2-sap",
|
"ec2-sap",
|
||||||
|
|
|
||||||
|
|
@ -588,3 +588,32 @@ var azureRhuiImgType = imageType{
|
||||||
exports: []string{"archive"},
|
exports: []string{"archive"},
|
||||||
basePartitionTables: azureRhuiBasePartitionTables,
|
basePartitionTables: azureRhuiBasePartitionTables,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SapAzureImageConfig(rd distribution) *distro.ImageConfig {
|
||||||
|
return SapImageConfig(rd).InheritFrom(defaultAzureImageConfig)
|
||||||
|
}
|
||||||
|
|
||||||
|
func azureSapImgType(rd distribution) imageType {
|
||||||
|
return imageType{
|
||||||
|
name: "azure-sap-rhui",
|
||||||
|
filename: "disk.vhd.xz",
|
||||||
|
mimeType: "application/xz",
|
||||||
|
packageSets: map[string]packageSetFunc{
|
||||||
|
// the ec2 buildroot is required due to the cloud-init stage and dependency on YAML
|
||||||
|
buildPkgsKey: ec2BuildPackageSet,
|
||||||
|
osPkgsKey: azureSapPackageSet,
|
||||||
|
},
|
||||||
|
packageSetChains: map[string][]string{
|
||||||
|
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||||
|
},
|
||||||
|
defaultImageConfig: SapAzureImageConfig(rd),
|
||||||
|
kernelOptions: defaultAzureKernelOptions,
|
||||||
|
bootable: true,
|
||||||
|
defaultSize: 64 * common.GibiByte,
|
||||||
|
pipelines: vhdPipelines(true),
|
||||||
|
buildPipelines: []string{"build"},
|
||||||
|
payloadPipelines: []string{"os", "image", "vpc", "archive"},
|
||||||
|
exports: []string{"archive"},
|
||||||
|
basePartitionTables: azureRhuiBasePartitionTables,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1636,6 +1636,7 @@ func newDistro(distroName string) distro.Distro {
|
||||||
// add azure to RHEL distro only
|
// add azure to RHEL distro only
|
||||||
x86_64.addImageTypes(azureRhuiImgType)
|
x86_64.addImageTypes(azureRhuiImgType)
|
||||||
x86_64.addImageTypes(azureByosImgType)
|
x86_64.addImageTypes(azureByosImgType)
|
||||||
|
x86_64.addImageTypes(azureSapImgType(rd))
|
||||||
|
|
||||||
// add ec2 image types to RHEL distro only
|
// add ec2 image types to RHEL distro only
|
||||||
x86_64.addImageTypes(ec2ImgTypeX86_64, ec2HaImgTypeX86_64)
|
x86_64.addImageTypes(ec2ImgTypeX86_64, ec2HaImgTypeX86_64)
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,14 @@ func TestFilenameFromType(t *testing.T) {
|
||||||
mimeType: "application/xz",
|
mimeType: "application/xz",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "azure-sap-rhui",
|
||||||
|
args: args{"azure-sap-rhui"},
|
||||||
|
want: wantResult{
|
||||||
|
filename: "disk.vhd.xz",
|
||||||
|
mimeType: "application/xz",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "vmdk",
|
name: "vmdk",
|
||||||
args: args{"vmdk"},
|
args: args{"vmdk"},
|
||||||
|
|
@ -291,6 +299,7 @@ func TestImageType_Name(t *testing.T) {
|
||||||
"openstack",
|
"openstack",
|
||||||
"vhd",
|
"vhd",
|
||||||
"azure-rhui",
|
"azure-rhui",
|
||||||
|
"azure-sap-rhui",
|
||||||
"vmdk",
|
"vmdk",
|
||||||
"ami",
|
"ami",
|
||||||
"ec2",
|
"ec2",
|
||||||
|
|
@ -480,6 +489,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
||||||
"openstack",
|
"openstack",
|
||||||
"vhd",
|
"vhd",
|
||||||
"azure-rhui",
|
"azure-rhui",
|
||||||
|
"azure-sap-rhui",
|
||||||
"vmdk",
|
"vmdk",
|
||||||
"ami",
|
"ami",
|
||||||
"ec2",
|
"ec2",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue