Skip to content

Commit 048c406

Browse files
authored
Add support for RHEL-9 OS (#69)
* Add support for RHEL-9 OS * RHEL-9 remove the tmp solution for GPG check error * RHEL-9 remove timeout arg from translate workflow
1 parent edd0016 commit 048c406

File tree

7 files changed

+216
-1
lines changed

7 files changed

+216
-1
lines changed

cli_tools/common/utils/daisyutils/daisy_utils.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ var (
8686
GcloudOsFlag: "rhel-8-byol",
8787
WorkflowPath: "enterprise_linux/translate_rhel_8_byol.wf.json",
8888
LicenseURI: "projects/rhel-cloud/global/licenses/rhel-8-byos",
89+
}, {
90+
GcloudOsFlag: "rhel-9",
91+
WorkflowPath: "enterprise_linux/translate_rhel_9_licensed.wf.json",
92+
LicenseURI: "projects/rhel-cloud/global/licenses/rhel-9-server",
93+
}, {
94+
GcloudOsFlag: "rhel-9-byol",
95+
WorkflowPath: "enterprise_linux/translate_rhel_9_byol.wf.json",
96+
LicenseURI: "projects/rhel-cloud/global/licenses/rhel-9-byos",
8997
}, {
9098
GcloudOsFlag: "rocky-8",
9199
WorkflowPath: "enterprise_linux/translate_rocky_8.wf.json",

cli_tools/common/utils/daisyutils/daisy_utils_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ func Test_GetTranslationSettings_ResolveSameWorkflowPathAsOldMap(t *testing.T) {
4343
"rhel-6": "enterprise_linux/translate_rhel_6_licensed.wf.json",
4444
"rhel-7": "enterprise_linux/translate_rhel_7_licensed.wf.json",
4545
"rhel-8": "enterprise_linux/translate_rhel_8_licensed.wf.json",
46+
"rhel-9": "enterprise_linux/translate_rhel_9_licensed.wf.json",
4647
"rhel-6-byol": "enterprise_linux/translate_rhel_6_byol.wf.json",
4748
"rhel-7-byol": "enterprise_linux/translate_rhel_7_byol.wf.json",
4849
"rhel-8-byol": "enterprise_linux/translate_rhel_8_byol.wf.json",
50+
"rhel-9-byol": "enterprise_linux/translate_rhel_9_byol.wf.json",
4951
"sles-12": "suse/translate_sles_12.wf.json",
5052
"sles-12-byol": "suse/translate_sles_12_byol.wf.json",
5153
"sles-sap-12": "suse/translate_sles_sap_12.wf.json",

cli_tools/gce_ovf_import/ovf_utils/ovf_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ var ovfOSIDToImporterOSID = map[int16]OsInfo{
150150
77: {description: "Microsoft Windows Server 2008 64-Bit", importerOSIDs: []string{}},
151151
78: {description: "FreeBSD 64-Bit", importerOSIDs: []string{}},
152152
79: {description: "RedHat Enterprise Linux", importerOSIDs: []string{}},
153-
80: {description: "RedHat Enterprise Linux 64-Bit", importerOSIDs: []string{"rhel-6", "rhel-6-byol", "rhel-7", "rhel-7-byol", "rhel-8", "rhel-8-byol"}},
153+
80: {description: "RedHat Enterprise Linux 64-Bit", importerOSIDs: []string{"rhel-6", "rhel-6-byol", "rhel-7", "rhel-7-byol", "rhel-8", "rhel-8-byol", "rhel-9", "rhel-9-byol"}},
154154
81: {description: "Solaris 64-Bit", importerOSIDs: []string{}},
155155
82: {description: "SUSE", importerOSIDs: []string{}},
156156
83: {description: "SUSE 64-Bit", importerOSIDs: []string{"opensuse-15"}, nonDeterministic: true},

cli_tools_tests/e2e/gce_image_import_export/test_suites/import/import_tests.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ var basicCases = []*testCase{
270270
caseName: "el-rhel-8-2",
271271
source: "projects/compute-image-import-test/global/images/rhel-8-2",
272272
os: "rhel-8",
273+
}, {
274+
caseName: "el-rhel-9-0",
275+
source: "projects/compute-image-import-test/global/images/rhel-9-0",
276+
os: "rhel-9",
273277
}, {
274278
caseName: "el-rocky-8-4",
275279
source: "projects/compute-image-import-test/global/images/rocky-8-4",
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"Name": "translate-rhel-9-byol",
3+
"Vars": {
4+
"source_disk": {
5+
"Required": true,
6+
"Description": "The RHEL 9 GCE disk to translate."
7+
},
8+
"sysprep": {
9+
"Value": "false",
10+
"Description": "If enabled, run sysprep. This is a no-op for Linux."
11+
},
12+
"install_gce_packages": {
13+
"Value": "true",
14+
"Description": "Whether to install GCE packages."
15+
},
16+
"image_name": {
17+
"Value": "rhel-9-${ID}",
18+
"Description": "The name of the translated RHEL 9 image."
19+
},
20+
"family": {
21+
"Value": "",
22+
"Description": "Optional family to set for the translated image"
23+
},
24+
"description": {
25+
"Value": "",
26+
"Description": "Optional description to set for the translated image"
27+
},
28+
"import_network": {
29+
"Value": "global/networks/default",
30+
"Description": "Network to use for the import instance"
31+
},
32+
"import_subnet": {
33+
"Value": "",
34+
"Description": "SubNetwork to use for the import instance"
35+
},
36+
"compute_service_account": {
37+
"Value": "default",
38+
"Description": "Service account that will be used by the created worker instance"
39+
}
40+
},
41+
"Steps": {
42+
"setup-disks": {
43+
"CreateDisks": [
44+
{
45+
"Name": "disk-translator",
46+
"SourceImage": "projects/compute-image-import/global/images/debian-11-worker-v20221031",
47+
"SizeGb": "10",
48+
"Type": "pd-ssd"
49+
}
50+
]
51+
},
52+
"translate-disk": {
53+
"IncludeWorkflow": {
54+
"Path": "./translate_el.wf.json",
55+
"Vars": {
56+
"el_release": "9",
57+
"install_gce_packages": "${install_gce_packages}",
58+
"translator_disk": "disk-translator",
59+
"imported_disk": "${source_disk}",
60+
"import_network": "${import_network}",
61+
"import_subnet": "${import_subnet}",
62+
"compute_service_account": "${compute_service_account}"
63+
}
64+
}
65+
},
66+
"create-image": {
67+
"CreateImages": [
68+
{
69+
"Name": "${image_name}",
70+
"SourceDisk": "${source_disk}",
71+
"Family": "${family}",
72+
"Licenses": ["projects/rhel-cloud/global/licenses/rhel-9-byos"],
73+
"Description": "${description}",
74+
"ExactName": true,
75+
"NoCleanup": true
76+
}
77+
]
78+
}
79+
},
80+
"Dependencies": {
81+
"translate-disk": ["setup-disks"],
82+
"create-image": ["translate-disk"]
83+
}
84+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"Name": "translate-rhel-9-licensed",
3+
"Vars": {
4+
"source_disk": {
5+
"Required": true,
6+
"Description": "The RHEL 9 GCE disk to translate."
7+
},
8+
"sysprep": {
9+
"Value": "false",
10+
"Description": "If enabled, run sysprep. This is a no-op for Linux."
11+
},
12+
"install_gce_packages": {
13+
"Value": "true",
14+
"Description": "Whether to install GCE packages."
15+
},
16+
"image_name": {
17+
"Value": "rhel-9-${ID}",
18+
"Description": "The name of the translated RHEL 9 image."
19+
},
20+
"family": {
21+
"Value": "",
22+
"Description": "Optional family to set for the translated image"
23+
},
24+
"description": {
25+
"Value": "",
26+
"Description": "Optional description to set for the translated image"
27+
},
28+
"import_network": {
29+
"Value": "global/networks/default",
30+
"Description": "Network to use for the import instance"
31+
},
32+
"import_subnet": {
33+
"Value": "",
34+
"Description": "SubNetwork to use for the import instance"
35+
},
36+
"compute_service_account": {
37+
"Value": "default",
38+
"Description": "Service account that will be used by the created worker instance"
39+
}
40+
},
41+
"Steps": {
42+
"setup-disks": {
43+
"CreateDisks": [
44+
{
45+
"Name": "disk-translator",
46+
"SourceImage": "projects/compute-image-import/global/images/debian-11-worker-v20221031",
47+
"SizeGb": "10",
48+
"Type": "pd-ssd"
49+
}
50+
]
51+
},
52+
"translate-disk": {
53+
"IncludeWorkflow": {
54+
"Path": "./translate_el.wf.json",
55+
"Vars": {
56+
"el_release": "9",
57+
"install_gce_packages": "${install_gce_packages}",
58+
"translator_disk": "disk-translator",
59+
"imported_disk": "${source_disk}",
60+
"use_rhel_gce_license": "true",
61+
"import_network": "${import_network}",
62+
"import_subnet": "${import_subnet}",
63+
"compute_service_account": "${compute_service_account}"
64+
}
65+
}
66+
},
67+
"create-image": {
68+
"CreateImages": [
69+
{
70+
"Name": "${image_name}",
71+
"SourceDisk": "${source_disk}",
72+
"Family": "${family}",
73+
"Licenses": ["projects/rhel-cloud/global/licenses/rhel-9-server"],
74+
"Description": "${description}",
75+
"ExactName": true,
76+
"NoCleanup": true
77+
}
78+
]
79+
}
80+
},
81+
"Dependencies": {
82+
"translate-disk": ["setup-disks"],
83+
"create-image": ["translate-disk"]
84+
}
85+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
source: GCP image 'rhel-9-v20220920'
2+
expected:
3+
distro: rhel
4+
major: "9"
5+
minor: "0"
6+
7+
files:
8+
/etc/os-release: |
9+
NAME="Red Hat Enterprise Linux"
10+
VERSION="9.0 (Plow)"
11+
ID="rhel"
12+
ID_LIKE="fedora"
13+
VERSION_ID="9.0"
14+
PLATFORM_ID="platform:el9"
15+
PRETTY_NAME="Red Hat Enterprise Linux 9.0 (Plow)"
16+
ANSI_COLOR="0;31"
17+
LOGO="fedora-logo-icon"
18+
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
19+
HOME_URL="https://www.redhat.com/"
20+
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/"
21+
BUG_REPORT_URL="https://bugzilla.redhat.com/"
22+
23+
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
24+
REDHAT_BUGZILLA_PRODUCT_VERSION=9.0
25+
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
26+
REDHAT_SUPPORT_PRODUCT_VERSION="9.0"
27+
/etc/redhat-release: |
28+
Red Hat Enterprise Linux release 9.0 (Plow)
29+
/etc/system-release: |
30+
Red Hat Enterprise Linux release 9.0 (Plow)
31+
/etc/system-release-cpe: |
32+
cpe:/o:redhat:enterprise_linux:9::baseos

0 commit comments

Comments
 (0)