Skip to content

PMM: build pmm-server for arm64#4248

Draft
EvgeniyPatlan wants to merge 1 commit into
masterfrom
pmm-arm64
Draft

PMM: build pmm-server for arm64#4248
EvgeniyPatlan wants to merge 1 commit into
masterfrom
pmm-arm64

Conversation

@EvgeniyPatlan

Copy link
Copy Markdown
Collaborator

This adds a native arm64 build of pmm-server v3, following the same layout we already use for the client:

  • pmm3-server-autobuild becomes a parent job that runs two new jobs (pmm3-server-autobuild-amd and pmm3-server-autobuild-arm) in parallel and merges their images into a multi-arch manifest with docker buildx imagetools. It still exports TIMESTAMP_TAG, so pmm3-release-candidate doesn't need any changes.
  • watchtower is built for both arches too - the binary cross-compiles, the image is assembled per arch and merged the same way. It runs next to the server on every staging instance, so an arm server host can't live without it.
  • pmm3-api-tests got an AGENT_ARCH parameter and the server parent now triggers it for both arches with the image it just built.
  • pmm3-image-scanning scans both platforms of the manifest and archives per-arch reports.
  • pmm3-aws-staging-start got a SERVER_ARCH parameter (arm64 = t4g.xlarge). runSpotInstance takes the arch as a second argument, default is x86_64 so nothing changes for existing callers. The arm64 worker AMI already exists (same pmm-worker-3 tag, the packer template builds both since a while).
  • package testing jobs and their matrices pass SERVER_ARCH through, so the arm matrix now runs client and server both on arm.
  • setupPMM3Client: latest-tarball resolves to the arm client tarball on aarch64 hosts, before it always downloaded the amd64 one.

All of this was tested from a test branch with separate -test job copies and -test docker tags before opening this PR: the multi-arch manifest builds, api tests are green on both arches, an arm64 staging instance comes up with server+watchtower+client working, package tests ran against it.

Depends on percona/pmm#5630 - without the arch-namespaced S3 build cache the arm build downloads cached x86_64 rpms and skips building. Merge that one first.

Two new jobs need to be registered when this merges: pmm3-server-autobuild-amd and pmm3-server-autobuild-arm (pipeline from SCM, master, script paths match the file names).

Not in this PR, follow-ups:

  • pmm3-client-repo-push uploads both arch tarballs to TESTING/pmm/ under the same file name, so amd64 and arm64 overwrite each other on every RC. Needs an arch-aware destination.
  • rc-testing lanes and nightly UI runs against an arm server.
  • arm64 AMI wiring in pmm3-ami (the packer side is already in Prepare server build for arm64 percona/pmm#5630).

pmm3-server-autobuild becomes a parent that runs two new per-arch jobs
(pmm3-server-autobuild-amd, pmm3-server-autobuild-arm) in parallel and
merges the images into a multi-arch manifest, same layout as the client
autobuild. Watchtower is built for both arches as well. API tests,
image scanning, staging and package testing get arch parameters.
for arch in amd64 arm64; do
rm -rf ctx-${arch}
mkdir -p ctx-${arch}/dockerfiles
cp watchtower-${arch} ctx-${arch}/watchtower

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's remove everything related to Watchtower as it is being discontinued.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@ademidoff it is just test job so it really now copies the old behavior. Sure we can remove this job. But I suggest keeping it for now so it would be possible to test with and without watchtower,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants