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

Arm64 auto build #797

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Conversation

tobiasge
Copy link
Member

Related Issue: #468

New Behavior

  • Build ARM64 and AMD64 images

Contrast to Current Behavior

  • Only AMD64 images are build

Discussion: Benefits and Drawbacks

  • Major changes to the build script
  • In earlier version of the build process we had builds for 3 different registries, that were different images, now one image is build and pushed to all registries and both architectures, the drawback here is, that the tests are only run for the AMD64 image (with the release workflow). The push workflow runs the tests on both architectures
  • For this to work I introduced the new IMAGE_NAMES variable that sets what was earlier set in DOCKER_REGISTRY, DOCKER_ORG and DOCKER_REPO
  • DOCKER_TARGET was removed because the -ldap version is integrated into the main image with Debian
  • This new build system has been running on my repository for a while and seems to work good
  • The workflow_dispatch option is now enabled for the release workflow. Meaning it can be triggered manually
  • Builds on the work from @cimnine in PR Build multi-arch images based on Debian #604 but without the Docker caching (Do we need that?)

Changes to the Wiki

  • None

Proposed Release Note Entry

  • Enabled the automatic building of ARM64 images

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

@tobiasge tobiasge added the enhancement The issue describes an enhancement that we would like to implement in the future. label Jul 13, 2022
@tobiasge tobiasge requested a review from cimnine July 13, 2022 06:34
@tobiasge tobiasge force-pushed the arm64-auto-build branch 4 times, most recently from 86b68cb to 40ac752 Compare July 13, 2022 07:13
@cimnine
Copy link
Collaborator

cimnine commented Jul 13, 2022

Before I go deep into the code, I believe one problem remains: This build-process does not create multi-plattform images, does it? My quick scan revealed that it does not build & push the necessary manifest that combines both platform into one tagged image. It only builds images for both platforms, but keeps them independently. (Or is this manifest thing not necessary anylonger?)

As an intermediate solution, we could publish ghcr.io/netbox-community/netbox:vX.Y.Z-a.b.c-arm64 (and tag the main image additionally with …-arm64). And then we could tackle the manifest later. This would already allow users to fetch the arm64 image.

@tobiasge
Copy link
Member Author

tobiasge commented Jul 13, 2022

When I check the tags on Docker Hub for my repository I do see one tag latest that points to two images. And when I do docker pull tgenannt/netbox:latest and then docker inspect tgenannt/netbox:latest I get the same value for RepoDigests on both my Intel Debian VM and my Mac M1 Debian VM.

Inspect on AMD: https://controlc.com/90a16617
Inspect on ARM: https://controlc.com/a06cf77f

Copy link
Collaborator

@cimnine cimnine left a comment

Choose a reason for hiding this comment

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

I've spotted some minor inconsistencies regarding SKIP_GIT. I believe they were in the script already, but it'd be great if you could fix them anyway.

build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
@tobiasge tobiasge requested a review from cimnine July 13, 2022 12:41
build.sh Show resolved Hide resolved
@tobiasge tobiasge merged commit adc2079 into netbox-community:develop Jul 15, 2022
@tobiasge tobiasge deleted the arm64-auto-build branch July 15, 2022 14:57
This was referenced Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue describes an enhancement that we would like to implement in the future.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants