-
Notifications
You must be signed in to change notification settings - Fork 496
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
ci: create multiarch vm images #11017
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -692,13 +692,15 @@ jobs: | |||||||||||||||||||||||||
neondatabase/neon-test-extensions-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.version.debian }}-x64 \ | ||||||||||||||||||||||||||
neondatabase/neon-test-extensions-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.version.debian }}-arm64 | ||||||||||||||||||||||||||
vm-compute-node-image: | ||||||||||||||||||||||||||
vm-compute-node-image-arch: | ||||||||||||||||||||||||||
needs: [ check-permissions, meta, compute-node-image ] | ||||||||||||||||||||||||||
if: ${{ contains(fromJSON('["push-main", "pr", "compute-release", "compute-rc-pr"]'), needs.meta.outputs.run-kind) }} | ||||||||||||||||||||||||||
runs-on: [ self-hosted, large ] | ||||||||||||||||||||||||||
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }} | ||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||
fail-fast: false | ||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||
# TODO: in other places we use x64, but vm-builder has hardcoded list of supported architectures at the moment: amd64, arm64, probably should be extended by x64 as well | ||||||||||||||||||||||||||
arch: [ amd64, arm64 ] | ||||||||||||||||||||||||||
version: | ||||||||||||||||||||||||||
# see the comment for `compute-node-image-arch` job | ||||||||||||||||||||||||||
- pg: v14 | ||||||||||||||||||||||||||
|
@@ -717,7 +719,7 @@ jobs: | |||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- name: Downloading vm-builder | ||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||
curl -fL /~https://github.com/neondatabase/autoscaling/releases/download/$VM_BUILDER_VERSION/vm-builder-amd64 -o vm-builder | ||||||||||||||||||||||||||
curl -fL /~https://github.com/neondatabase/autoscaling/releases/download/$VM_BUILDER_VERSION/vm-builder-${{ matrix.arch }} -o vm-builder | ||||||||||||||||||||||||||
chmod +x vm-builder | ||||||||||||||||||||||||||
- uses: neondatabase/dev-actions/set-docker-config-dir@6094485bf440001c94a94a3f9e221e81ff6b6193 | ||||||||||||||||||||||||||
|
@@ -738,12 +740,41 @@ jobs: | |||||||||||||||||||||||||
-size=2G \ | ||||||||||||||||||||||||||
-spec=compute/vm-image-spec-${{ matrix.version.debian }}.yaml \ | ||||||||||||||||||||||||||
-src=neondatabase/compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} \ | ||||||||||||||||||||||||||
-dst=neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} \ | ||||||||||||||||||||||||||
-target-arch=linux/amd64 | ||||||||||||||||||||||||||
-dst=neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.arch }} \ | ||||||||||||||||||||||||||
-target-arch=linux/${{ matrix.arch }} | ||||||||||||||||||||||||||
- name: Pushing vm-compute-node image | ||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||
docker push neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} | ||||||||||||||||||||||||||
docker push neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-${{ matrix.arch }} | ||||||||||||||||||||||||||
vm-compute-node-image: | ||||||||||||||||||||||||||
needs: [ vm-compute-node-image-arch, meta ] | ||||||||||||||||||||||||||
if: ${{ contains(fromJSON('["push-main", "pr", "compute-release", "compute-rc-pr"]'), needs.meta.outputs.run-kind) }} | ||||||||||||||||||||||||||
runs-on: [ self-hosted, large ] | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In other jobs we just use GitHub-hosted runner for that
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was just 2 weeks ago when we switched tasks from gh-hosted to self-hosted runners, and you were the author of that change @bayandin There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mikhail-sakhnov from what I see here, that job is just for the combining manifests for the docker image, no any build or any other computational tasks there, right? |
||||||||||||||||||||||||||
strategy: | ||||||||||||||||||||||||||
matrix: | ||||||||||||||||||||||||||
version: | ||||||||||||||||||||||||||
# see the comment for `compute-node-image-arch` job | ||||||||||||||||||||||||||
- pg: v14 | ||||||||||||||||||||||||||
debian: bullseye | ||||||||||||||||||||||||||
- pg: v15 | ||||||||||||||||||||||||||
debian: bullseye | ||||||||||||||||||||||||||
- pg: v16 | ||||||||||||||||||||||||||
debian: bullseye | ||||||||||||||||||||||||||
- pg: v17 | ||||||||||||||||||||||||||
debian: bookworm | ||||||||||||||||||||||||||
Comment on lines
+758
to
+765
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems we don't use
Suggested change
|
||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||
- uses: docker/login-action@v3 | ||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }} | ||||||||||||||||||||||||||
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- name: Create multi-arch compute-node image | ||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||
docker buildx imagetools create -t neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }} \ | ||||||||||||||||||||||||||
neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-amd64 \ | ||||||||||||||||||||||||||
neondatabase/vm-compute-node-${{ matrix.version.pg }}:${{ needs.meta.outputs.build-tag }}-arm64 | ||||||||||||||||||||||||||
test-images: | ||||||||||||||||||||||||||
needs: [ check-permissions, meta, neon-image, compute-node-image ] | ||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's open an issue for this? TODOs are often forgotten :)