Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support building offline OS bundles for Oracle Linux 9.4 #1192

Merged
merged 6 commits into from
Oct 7, 2024

Conversation

manoj-nutanix
Copy link
Contributor

@manoj-nutanix manoj-nutanix commented Sep 30, 2024

What problem does this PR solve?:
Supports building offline OS bundle for Oracle Linux 9.4

Which issue(s) does this PR fix?:

Special notes for your reviewer:

Tested with CI jobs -

  1. https://github.com/mesosphere/konvoy-image-builder/actions/runs/11174525665
  2. https://github.com/mesosphere/konvoy-image-builder/actions/runs/11175175038

Pending:
Testing cluster creation using offline OS bundle.

Does this PR introduce a user-facing change?:


@manoj-nutanix manoj-nutanix force-pushed the NCN-102633 branch 2 times, most recently from 8a152c7 to 49ab833 Compare September 30, 2024 11:44
@dkoshkin
Copy link
Contributor

The Containerd tar is named https://packages.d2iq.com/dkp/containerd/containerd-1.7.22-d2iq.1-ol-9.4-x86_64.tar.gz, but the e2e test automation assumes its this:

Downloading https://packages.d2iq.com/dkp/containerd/containerd-1.7.22-d2iq.1-oracle-9.4-x86_64.tar.gz to artifacts/containerd-1.7.22-d2iq.1-oracle-9.4-x86_64.tar.gz

https://github.com/mesosphere/konvoy-image-builder/actions/runs/11105421677/job/30851548106#step:10:1693

You'll want another change to replace oracle with ol in

osDist = strings.Replace(osDist, "redhat", "rhel", 1)

@manoj-nutanix
Copy link
Contributor Author

The Containerd tar is named https://packages.d2iq.com/dkp/containerd/containerd-1.7.22-d2iq.1-ol-9.4-x86_64.tar.gz, but the e2e test automation assumes its this:

Downloading https://packages.d2iq.com/dkp/containerd/containerd-1.7.22-d2iq.1-oracle-9.4-x86_64.tar.gz to artifacts/containerd-1.7.22-d2iq.1-oracle-9.4-x86_64.tar.gz

https://github.com/mesosphere/konvoy-image-builder/actions/runs/11105421677/job/30851548106#step:10:1693

You'll want another change to replace oracle with ol in

osDist = strings.Replace(osDist, "redhat", "rhel", 1)

Thanks, will make this change.. will go through e2e test to check the steps and packages it requires.

@dkoshkin dkoshkin changed the title [WIP] NCN-102633: Support building offline OS bundles for Oracle Linux 9.4 [WIP] feat: Support building offline OS bundles for Oracle Linux 9.4 Sep 30, 2024
@dkoshkin
Copy link
Contributor

(Updated the PR title because it gets used by automation for the release)

@manoj-nutanix manoj-nutanix force-pushed the NCN-102633 branch 6 times, most recently from cea4732 to 6418213 Compare October 3, 2024 09:20
@@ -47,6 +47,10 @@ var osToConfig = map[string]OSConfig{
configDir: "bundles/ubuntu20.04",
containerImage: "docker.io/library/ubuntu:20.04",
},
"oracle-9.4": {
configDir: "bundles/oracle9.4",
containerImage: "docker.io/library/oraclelinux:9",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the minor version container images have not been released yet on any registry(ref) so using this image which currently points to 9.4 only -

[root@8b53e13be278 generated]# cat /etc/oracle-release
Oracle Linux Server release 9.4

[root@8b53e13be278 generated]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.4 (Plow)

[root@8b53e13be278 generated]# cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="9.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manoj-nutanix manoj-nutanix marked this pull request as ready for review October 3, 2024 10:16
.pre-commit-config.yaml Outdated Show resolved Hide resolved
@manoj-nutanix manoj-nutanix changed the title [WIP] feat: Support building offline OS bundles for Oracle Linux 9.4 feat: Support building offline OS bundles for Oracle Linux 9.4 Oct 3, 2024
@dkoshkin
Copy link
Contributor

dkoshkin commented Oct 3, 2024

Looks great, I just merged #1190, can you please rebase on main.
You can also remove the non-offline tests from the GHA files (like we have for the other OSs), I don't think we need both in there.

Copy link

@kevinantonythomas kevinantonythomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But will let someone who knows this code to appprove

@manoj-nutanix
Copy link
Contributor Author

manoj-nutanix commented Oct 3, 2024

Looks great, I just merged #1190, can you please rebase on main. You can also remove the non-offline tests from the GHA files (like we have for the other OSs), I don't think we need both in there.

rebased and removed the non-offline tests for oracle-9.4 .. I suppose there would some e2e test covering both offline and non-offline modes of OS image as there're few ansible tasks which are specific to modes so confirming.

@github-actions github-actions bot added feature and removed feature labels Oct 4, 2024
@supershal supershal added the runs-vsphere-tests runs the vsphere e2e tests label Oct 4, 2024
@supershal
Copy link
Collaborator

Running vsphere e2e tests. Good to merge if those are successful for Oracle 9.4: https://github.com/mesosphere/konvoy-image-builder/actions/runs/11186167572/

yum:
name: "{{ item }}"
state: present
update_cache: true
enablerepo: "{{ 'offline' if offline_mode_enabled else '' }}"
disablerepo: "{{ '*' if offline_mode_enabled else '' }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@manoj-nutanix manoj-nutanix merged commit f8da088 into main Oct 7, 2024
29 checks passed
@manoj-nutanix manoj-nutanix deleted the NCN-102633 branch October 7, 2024 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature runs-vsphere-tests runs the vsphere e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants