Skip to content

Conversation

ggiguash
Copy link
Contributor

@ggiguash ggiguash commented Oct 19, 2024

The functional changes include:

  • Consolidation of Web and Registry URL definition using VM bridge interface, or host name if libvirt is not configured
  • Mirror registry script uses an external storage and configuration file
  • Bootc containerfile and container encapsulate builds save artifacts to the mirror registry directly bypassing file system export.
  • Mirror registry startup is implicit when running bootc builds
  • Mirror registry is no longer optional

These changes should result in reduced resource consumption and reduced runtime of the builds.

Test prerequisites

  • Delete _output
  • sudo podman rmi -af && podman rmi -af && podman volume rm -af
  • Run ./test/bin/build_rpms.sh and download cache.
  • Compare bootc build times and disk space

Test results on AWS c5n.metal host

  • Registry creation of 1m is included in the build time and 34G of disk saved.
  • Registry recreation is fast due to external persistent storage
What Before After
Bootc build time 10m 10m
Create mirror reg 1.5m 20s
sudo podman df 11G 11G
podman df 16G 0G
_output du 53G 35G

@openshift-ci-robot
Copy link

@ggiguash: This pull request explicitly references no jira issue.

In response to this:

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 Oct 19, 2024
Copy link
Contributor

openshift-ci bot commented Oct 19, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 19, 2024
@ggiguash
Copy link
Contributor Author

/test ?

Copy link
Contributor

openshift-ci bot commented Oct 19, 2024

@ggiguash: The following commands are available to trigger required jobs:

  • /test e2e-aws-footprint-and-performance
  • /test e2e-aws-tests
  • /test e2e-aws-tests-arm
  • /test e2e-aws-tests-bootc
  • /test e2e-aws-tests-bootc-arm
  • /test e2e-aws-tests-bootc-periodic
  • /test e2e-aws-tests-bootc-periodic-arm
  • /test e2e-aws-tests-cache
  • /test e2e-aws-tests-cache-arm
  • /test e2e-aws-tests-periodic
  • /test e2e-aws-tests-periodic-arm
  • /test images
  • /test ocp-full-conformance-rhel-eus
  • /test ocp-full-conformance-rhel-eus-arm
  • /test ocp-full-conformance-serial-rhel-eus
  • /test ocp-full-conformance-serial-rhel-eus-arm
  • /test test-rpm
  • /test test-unit
  • /test verify

The following commands are available to trigger optional jobs:

  • /test test-rebase

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-microshift-main-e2e-aws-tests
  • pull-ci-openshift-microshift-main-e2e-aws-tests-arm
  • pull-ci-openshift-microshift-main-e2e-aws-tests-bootc
  • pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-arm
  • pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-periodic
  • pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-periodic-arm
  • pull-ci-openshift-microshift-main-e2e-aws-tests-periodic
  • pull-ci-openshift-microshift-main-e2e-aws-tests-periodic-arm
  • pull-ci-openshift-microshift-main-images
  • pull-ci-openshift-microshift-main-test-unit
  • pull-ci-openshift-microshift-main-verify

In response to this:

/test ?

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-sigs/prow repository.

@ggiguash
Copy link
Contributor Author

/test e2e-aws-tests-bootc
/test e2e-aws-tests-bootc-periodic

@ggiguash ggiguash changed the title NO-ISSUE: Port bootc build procedure to use mirror registry instead of local storage NO-ISSUE: Port bootc build procedure to directly use mirror registry instead of local storage Oct 19, 2024
@ggiguash
Copy link
Contributor Author

/test e2e-aws-tests-bootc
/test e2e-aws-tests-bootc-periodic

@ggiguash ggiguash marked this pull request as ready for review October 20, 2024 10:11
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 20, 2024
@openshift-ci openshift-ci bot requested review from pmtk and vanhalenar October 20, 2024 10:11
@ggiguash
Copy link
Contributor Author

/test-required

@ggiguash
Copy link
Contributor Author

/test e2e-aws-tests-bootc

@ggiguash ggiguash changed the title NO-ISSUE: Port bootc build procedure to directly use mirror registry instead of local storage USHIFT-4704: Port bootc build procedure to directly use mirror registry instead of local storage Oct 20, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 20, 2024

@ggiguash: This pull request references USHIFT-4704 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

The functional changes include:

  • Consolidation of Web and Registry URL definition using VM bridge interface, or host name if libvirt is not configured
  • Mirror registry script uses an external storage and configuration file
  • Bootc containerfile and container encapsulate builds save artifacts to the mirror registry directly bypassing file system export.
  • Mirror registry startup is implicit when running bootc builds
  • Mirror registry is no longer optional

These changes should result in reduced resource consumption and reduced runtime of the builds.

Test prerequisites

  • Delete _output
  • sudo podman rmi -af && podman rmi -af && podman volume rm -af
  • Run ./test/bin/build_rpms.sh and download cache.
  • Compare bootc build times and disk space

Test results on AWS c5n.metal host

  • Registry creation of 1m is included in the build time and 34G of disk saved.
  • Registry recreation is fast due to external persistent storage
What Before After
Bootc build time 10m 10m
Create mirror reg 1.5m 20s
sudo podman df 11G 11G
podman df 16G 0G
_output du 53G 35G

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.

@ggiguash
Copy link
Contributor Author

/test e2e-aws-tests-bootc-periodic

1 similar comment
@ggiguash
Copy link
Contributor Author

/test e2e-aws-tests-bootc-periodic

Copy link
Contributor

openshift-ci bot commented Oct 20, 2024

@ggiguash: 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-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@pmtk pmtk left a comment

Choose a reason for hiding this comment

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

One nit, can be fix some other time
/lgtm

WEB_SERVER_URL="http://${VM_BRIDGE_IP:-$(hostname)}:${WEB_SERVER_PORT}"

# Mirror registry port number
# shellcheck disable=SC2034 # used elsewhere
Copy link
Member

Choose a reason for hiding this comment

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

Probably unnecessary as the variable is used couple lines 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 will fix it when rebasing #3991

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

openshift-ci bot commented Oct 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ggiguash, pmtk

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

@openshift-merge-bot openshift-merge-bot bot merged commit eadd150 into openshift:main Oct 21, 2024
12 checks passed
@ggiguash ggiguash deleted the mirror_registry branch October 21, 2024 13:21
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.

3 participants