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

USHIFT-2344: Add layer4 image-blueprints to support creating images with RPMs buillt elsewhere #3012

Merged

Conversation

jogeo
Copy link
Contributor

@jogeo jogeo commented Feb 14, 2024

This PR addresses USHIFT-2344 and provides a layer of blueprints intended to be used with RPMs build by ART.

At this time I do not expect the images built from the layer4 directory to be run in CI. Rather they will be used in the QE lab. Creating a layer4 directory also sets up a storage location for additional blueprint templates with variations the QE team would like to use in their lab.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2024
@ggiguash
Copy link
Contributor

ggiguash commented Feb 14, 2024

/retitle USHIFT-2344: Add layer4 image-blueprints to support creating images with RPMs buillt elsewhere

@openshift-ci openshift-ci bot changed the title Add layer4 image-blueprints to support creating images with RPMs buil… USHIFT-2344: Add layer4 image-blueprints to support creating images with RPMs buillt elsewhere Feb 14, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 14, 2024

@jogeo: This pull request references USHIFT-2344 which is a valid jira issue.

In response to this:

This PR addresses USHIFT-2344 and provides a layer of blueprints intended to be used with RPMs build by ART.

At this time I do not expect the images built from the layer4 directory to be run in CI. Rather they will be used in the QE lab. Creating a layer4 directory also sets up a storage location for additional blueprint templates with variations the QE team would like to use in their lab.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 14, 2024
@@ -545,6 +545,10 @@ build_images.sh [-iIsdf] [-l layer-dir | -g group-dir] [-t template]

-d Dry run by skipping the composer start commands.

-e Extract container images.
Copy link
Contributor

@ggiguash ggiguash Feb 14, 2024

Choose a reason for hiding this comment

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

Please, remove this option from help

Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to use the existing rhel92.iso and rhel93.iso images built in layer1 and cached.
Why do we need another ISO?

Copy link
Contributor

Choose a reason for hiding this comment

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

QE deploys directly from the ISO in some cases (without a kickstart telling the system to override the ostree image in the ISO with one from a web server). To do that, they need an ISO with a full image with MicroShift in it.

Copy link
Contributor

Choose a reason for hiding this comment

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

The only difference of this toml with the other source commits is the missing microshift-test-agent.
We should be able to build it on top of the existing rhel92.iso image.

Did you try naming the file rhel92-microshift-art.toml? It would then using the existing build as a base.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would not use -art suffix here, because practically, one can drop anything in place of those RPMs.
What about using -ext or -external in accordance with my comment below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did try using the rhel92 image from from layer1 but since it includes packages that are not provided by RHEL (i.e. microshift-test-agent) it requires building the additional RPM from source. The goal of layer4 is to use packaging from the official build tooling and avoid building locally.


[[packages]]
name = "microshift"
version = "{{ .Env.SOURCE_VERSION }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we should be reusing the same SOURCE_VERSION setting for something else.
May I suggest using the notion of external rpms for what you're trying to implement.

We could have a special EXTERNAL_SOURCE_VERSION setting that would be valid during the build only if a dedicated directory is populated with RPMs manually.

Copy link
Contributor

Choose a reason for hiding this comment

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

The build should fail if such RPMs do not exist.

Copy link
Contributor

Choose a reason for hiding this comment

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

We probably didn't pick the best name for that variable to begin with. For CI, it's the version of the source code. The QE team is relying on the fact that copying pre-built RPMs out of brew into a repo in the same location that we would find RPMs if we built from source means they can reuse the existing logic for determining the version from those RPMs.

If we added a new variable, we would have to include the version detection logic, and only selectively fail if the RPMs don't exist and we're supposed to build them. We don't currently link any version detection to any specific layers, which makes the templating and script easier to reason about. I don't think we should change that.

If we renamed the variable PRIMARY_VERSION_UNDER_TEST it would be clearer, but I don't think it's worth making that change just for this PR.

I think reusing the existing variable is reasonable.

[[packages]]
name = "systemd-resolved"
version = "*"

Copy link
Contributor

@agullon agullon Feb 14, 2024

Choose a reason for hiding this comment

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

Can we add here these packages? They may be useful for troubleshooting. Also, iproute-tc is needed for Stress Testing.
I copy them from blueprint_v0.0.1.toml and added kernel-modules-extra

[[packages]]
name = "iputils"
version = "*"

[[packages]]
name = "bind-utils"
version = "*"

[[packages]]
name = "net-tools"
version = "*"

[[packages]]
name = "iotop"
version = "*"

[[packages]]
name = "strace"
version = "*"

[[packages]]
name = "iproute-tc"
version = "*"

[[packages]]
name = "kernel-modules-extra"
version = "*"

Copy link
Contributor

Choose a reason for hiding this comment

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

Are these things we may want to recommend that users install, or are they mostly useful for debugging failures in the test environment?

[[packages]]
name = "systemd-resolved"
version = "*"

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add here the same extra packages I commented in the rhel92 toml file?

Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

This looks mostly OK to me. There's a question about the use of -art in the image names and one bit of cleanup to do in the help message, but otherwise I think the choices all make sense.


[[packages]]
name = "microshift"
version = "{{ .Env.SOURCE_VERSION }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably didn't pick the best name for that variable to begin with. For CI, it's the version of the source code. The QE team is relying on the fact that copying pre-built RPMs out of brew into a repo in the same location that we would find RPMs if we built from source means they can reuse the existing logic for determining the version from those RPMs.

If we added a new variable, we would have to include the version detection logic, and only selectively fail if the RPMs don't exist and we're supposed to build them. We don't currently link any version detection to any specific layers, which makes the templating and script easier to reason about. I don't think we should change that.

If we renamed the variable PRIMARY_VERSION_UNDER_TEST it would be clearer, but I don't think it's worth making that change just for this PR.

I think reusing the existing variable is reasonable.

[[packages]]
name = "systemd-resolved"
version = "*"

Copy link
Contributor

Choose a reason for hiding this comment

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

Are these things we may want to recommend that users install, or are they mostly useful for debugging failures in the test environment?

Copy link
Contributor

Choose a reason for hiding this comment

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

QE deploys directly from the ISO in some cases (without a kickstart telling the system to override the ostree image in the ISO with one from a web server). To do that, they need an ISO with a full image with MicroShift in it.

@jogeo jogeo force-pushed the art_image_build_w_group1_parent branch from 2af6042 to 94e95e4 Compare February 20, 2024 19:49
Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2024
Copy link
Contributor

openshift-ci bot commented Feb 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, jogeo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Feb 22, 2024

@jogeo: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit e2e8447 into openshift:main Feb 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants