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

[Merged by Bors] - Self hosted docker builds #4592

Closed

Conversation

realbigsean
Copy link
Member

Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?

@realbigsean realbigsean added the ready-for-review The code is ready for review label Aug 9, 2023
.github/workflows/docker.yml Outdated Show resolved Hide resolved
.github/workflows/docker.yml Outdated Show resolved Hide resolved
@realbigsean
Copy link
Member Author

I'm going to test this out on the deneb branch #4599

@realbigsean
Copy link
Member Author

Ok looks like it's failing, my guess is due to permissions. I'm gonna give this a shot (looks like there's better support for this type of thing nowadays): https://docs.docker.com/build/ci/github-actions/multi-platform/

@realbigsean
Copy link
Member Author

We must go deeper: docker/setup-qemu-action#67

* self hosted docker builds attempted fix

* fix env var references in docker builds
@realbigsean
Copy link
Member Author

This looks promising on the deneb branch following the guidance of the previously linked issue. Here's the action where it's running https://github.com/sigp/lighthouse/actions/runs/5824054179/job/15792273258

One thing to note is that this doesn't currently include --provenance=false, but I can add it if we want it. I'm not sure why it was there, maybe to speed things up? It looks like the build and push step is something like 4 minutes slower without that flag.

@realbigsean
Copy link
Member Author

Obviosly jinxed the last one. Looks like it failed on creation of the multiarch image. From what I can gather, we're using an old way to do this: docker manifest, where we can now use docker buildx imagetools create. Testing this again on deneb https://github.com/sigp/lighthouse/actions/runs/5825468485

* self hosted docker builds attempted fix

* use imagetools instead of docker manifest
@realbigsean
Copy link
Member Author

@paulhauner
Copy link
Member

This is really cool, but I think we should do the Docker builds on the new release-only runner that @antondlr is working on.

I am concerned about using the testing runners for building binaries (or Docker images) that are expected to run in production.

I've also experienced the ARM OOMs, generally it works after a few tries. It's a crappy solution I know, but I think we should have the release-only boxes soon!

@antondlr
Copy link
Member

One thing to note is that this doesn't currently include --provenance=false, but I can add it if we want it. I'm not sure why it was there, maybe to speed things up? It looks like the build and push step is something like 4 minutes slower without that flag.

the flag was introduced here; tldr: buildx v0.10.0 added provenance attestations to images but they are packed in a way that's incompatible with docker manifest

@antondlr
Copy link
Member

This is really cool, but I think we should do the Docker builds on the new release-only runner that @antondlr is working on.

agree; I'll try to get some runners up Soon ™️ , iirc box is basically ready and idling
only the weird windows setup is still pending (I have to copy over a large file from age's network for that)

@realbigsean
Copy link
Member Author

This is really cool, but I think we should do the Docker builds on the new release-only runner that @antondlr is working on.

makes sense!

the flag was introduced #3902; tldr: buildx v0.10.0 added provenance attestations to images but they are packed in a way that's incompatible with docker manifest

Since switching to imagetools instead of manifest seems to make it work without that flag, I guess I'll leave it off.

I'll leave this PR open and switch it to the release runner whenever it's ready

@realbigsean realbigsean added blocked and removed ready-for-review The code is ready for review labels Aug 16, 2023
@antondlr antondlr removed the blocked label Aug 31, 2023
@michaelsproul michaelsproul added the v4.5.0 ETA Q4 2023 label Sep 20, 2023
@jimmygchen jimmygchen added the ready-for-review The code is ready for review label Sep 20, 2023
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

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

Looks good 👍
It's been working well for Deneb as well (using the dev runners though).

@antondlr
Copy link
Member

the DinD instance has this buildx builder pre-set as default:
(installed through docker run --privileged tonistiigi/binfmt --install all)

runner$ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS  BUILDKIT             PLATFORMS
default * docker
  default default         running v0.11.6+0a15675913b7 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386

so I think we can skip those 2 steps on self-hosted

Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Nice work, looks good to me! Keen to see it in action for v4.5.0!

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 20, 2023
@michaelsproul
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 20, 2023
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
@bors
Copy link

bors bot commented Sep 20, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 20, 2023
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
@bors
Copy link

bors bot commented Sep 21, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 21, 2023
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
@michaelsproul
Copy link
Member

bors r-
bors r+

@bors
Copy link

bors bot commented Sep 21, 2023

Canceled.

bors bot pushed a commit that referenced this pull request Sep 21, 2023
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
@bors
Copy link

bors bot commented Sep 21, 2023

Build failed (retrying...):

@michaelsproul
Copy link
Member

bors r-

@bors
Copy link

bors bot commented Sep 21, 2023

Canceled.

@michaelsproul
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 21, 2023
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
@bors
Copy link

bors bot commented Sep 21, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 21, 2023
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch #3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
@bors
Copy link

bors bot commented Sep 21, 2023

@bors bors bot changed the title Self hosted docker builds [Merged by Bors] - Self hosted docker builds Sep 21, 2023
@bors bors bot closed this Sep 21, 2023
bors bot pushed a commit that referenced this pull request Oct 18, 2023
## Issue Addressed

Related to #4676.

Deneb-specifc CI code to be removed before merging to `unstable`. Dot not merge until we're ready to merge into `unstable`, as we may need to release deneb docker images before merging.

Keep in mind that most of the changes in the below PR (to `unstable`) have already 
been merged to `deneb-free-blobs`, so merging `deneb-free-blobs` into `unstable` would include those changes - it would be ok if the release runners are ready, otherwise we may want to exclude them before merging.
- #4592
Gua00va pushed a commit to Gua00va/lighthouse that referenced this pull request Oct 18, 2023
## Issue Addressed

Related to sigp#4676.

Deneb-specifc CI code to be removed before merging to `unstable`. Dot not merge until we're ready to merge into `unstable`, as we may need to release deneb docker images before merging.

Keep in mind that most of the changes in the below PR (to `unstable`) have already 
been merged to `deneb-free-blobs`, so merging `deneb-free-blobs` into `unstable` would include those changes - it would be ok if the release runners are ready, otherwise we may want to exclude them before merging.
- sigp#4592
@realbigsean realbigsean deleted the self-hosted-docker-builds branch November 21, 2023 16:16
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch sigp#3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

We're OOM'ing on Docker builds on the Deneb branch sigp#3929

Are we ok to self host automated docker builds?


Co-authored-by: realbigsean <[email protected]>
Co-authored-by: realbigsean <[email protected]>
Co-authored-by: antondlr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra-ci ready-for-merge This PR is ready to merge. v4.5.0 ETA Q4 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants