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

Add linux-amd64 binary to installer-artifacts #4891

Merged
merged 1 commit into from Jun 19, 2021

Conversation

yselkowitz
Copy link
Contributor

No description provided.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign smarterclayton after the PR has been reviewed.
You can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

The full list of commands accepted by this bot can be found 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

@yselkowitz
Copy link
Contributor Author

Per our discussions on adding this to oc
/cc @soltysh

@@ -4,8 +4,8 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS builder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN go generate ./data && \
SKIP_GENERATION=y GOOS=darwin GOARCH=amd64 hack/build.sh
RUN make cross-build-darwin-amd64 cross-build-linux-amd64
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to build for Linux here? Don't we get that via the FROM ...:installer line 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.

We want to have a linux/amd64 installer even in the other architecture's payloads. For remote deployments, just like we enable installing from mac regardless of cluster architecture, we also want to enable doing such from Linux on commodity hardware, which is still most commonly x86.

@staebler
Copy link
Contributor

@abhinavdahiya From comments in past PRs that have tried to add a makefile, you seem to be the biggest advocate against adding a makefile. I would love your input here on whether adding a makefile to ease building for cross-platform architectures would alleviate your concerns that using make is no easier that using the build script.

Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

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

Please keep the makefile changes as a separate PR so that we can discuss the merits of those changes independently.

Comment on lines 1 to 2
# This Dockerfile builds an image containing the Mac version of the installer layered
# on top of the Linux installer image.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment still accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. :-)


FROM registry.ci.openshift.org/ocp/4.8:installer
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac/openshift-install
COPY --from=macbuilder /go/src/github.com/openshift/installer/_output/bin/darwin_amd64/openshift-install /usr/share/openshift/mac/openshift-install
COPY --from=linuxbuilder /go/src/github.com/openshift/installer/_output/bin/linux_amd64/openshift-install /usr/share/openshift/linux_amd64/openshift-install
Copy link
Contributor

Choose a reason for hiding this comment

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

Help me better understand this. Is ART replacing registry.ci.openshift.org/ocp/4.8:installer with architecture-specific images based on the target architecture of the OpenShift release image?
Depending on the architecture of the release image, this binary may be a duplicate of the one from registry.ci.openshift.org/ocp/4.8:installer, right? But we want to include the duplicate

  1. so that oc has a consistent way of extracting the installer binary for the user's desired architecture and
  2. because there is no good way to use a link instead since the Dockerfile does not know which architecture ART is going to use when replacing registry.ci.openshift.org/ocp/4.8:installer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That pretty well describes it.

This will be used by oc in the next release to allow extracting an
x86_64 installer from another architecture's payload.

Due to the size of the installer binary, building each in a separate
stage minimizes resource requirements when using imagebuilder.  This
does require a matching change to ocp-build-data to add a second builder
stage.
@yselkowitz
Copy link
Contributor Author

/test all

@yselkowitz
Copy link
Contributor Author

/retest

@yselkowitz
Copy link
Contributor Author

don't see how this affecths the upgrade test
/retest
/assign @staebler

Copy link
Contributor

@staebler staebler 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 Jun 18, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 18, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: staebler

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 18, 2021
@yselkowitz
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 9b55aad into openshift:master Jun 19, 2021
yselkowitz added a commit to yselkowitz/ocp-build-data that referenced this pull request Jun 20, 2021
@yselkowitz yselkowitz deleted the artifacts branch May 29, 2022 17:47
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. 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

6 participants