Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Support for ARM64 #334

Merged
merged 10 commits into from
Nov 8, 2020
Merged

Support for ARM64 #334

merged 10 commits into from
Nov 8, 2020

Conversation

hakman
Copy link
Contributor

@hakman hakman commented Jul 25, 2020

Taking #315 a bit further.

The manifest part can be done in 2 ways separately:

  1. Using docker manifest ...:
$ export DOCKER_CLI_EXPERIMENTAL=enabled
$ docker manifest create \
    kopeio/etcd-manager:docker \
    kopeio/etcd-manager-amd64:latest kopeio/etcd-manager-arm64:latest
$ docker manifest push --purge kopeio/etcd-manager:docker
  1. Using manifest-tool ...:
$ manifest-tool push from-args \
    --platforms linux/amd64,linux/arm64 \
    --template kopeio/etcd-manager-ARCHVARIANT:latest \
    --target kopeio/etcd-manager:latest

WORKSPACE Show resolved Hide resolved
# and also avoids problems such as 3.1.12 not being available on arm
def supported_etcd_arch_and_version():
return [
[ "amd64", "3.1.12" ],
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add ("amd64", "2.2.1") ... I know we don't want to support 2.2.1 for much longer (if at all) but it would make this PR strictly additive.

Of course I may be forgetting why we removed it!

(And no need to support on arm64, there's no user base on arm64/2.2.1 that we need to cater to)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will try to do this, but will not be able to test.
I removed it purely because of build issues. v2.2.1 is built from source and and my Bazel version doesn't seem to like it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is ok to skip 2.2.1 here as we build the layer differently. The latest commit should fix this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah - makes sense, thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😄

@justinsb
Copy link
Contributor

Looks good in general. If we can continue to support 2.2.1 then this can be additive.

I'll look into the manifest tool options; I believe our fallback position is to dual-tag the amd64 image as etcd-manager and etcd-manager-amd64.

@hakman
Copy link
Contributor Author

hakman commented Sep 15, 2020

Thanks for checking this @justinsb. Will update this today, but will need to sync on the image/repo names to make multiarch manifest easier in DockerHub.

@hakman hakman force-pushed the build_arch branch 3 times, most recently from 9d5c51e to 98e5b6f Compare September 15, 2020 06:00
@hakman
Copy link
Contributor Author

hakman commented Sep 15, 2020

I had to revert the change to #340 due to #345.

@hakman hakman force-pushed the build_arch branch 2 times, most recently from 386fa33 to 552736b Compare September 15, 2020 09:24
@hakman hakman requested a review from justinsb September 15, 2020 10:22
@hakman hakman mentioned this pull request Sep 15, 2020
@justinsb
Copy link
Contributor

Just merged #345 - I think this needs a rebase, but hopefully we're now unblocked on this PR?

@hakman
Copy link
Contributor Author

hakman commented Sep 25, 2020

@justinsb Actually it was unblocked until #345 was merged :).
The new base image is AMD64 only or at least I'm not seeing any multi-arch here:
https://console.cloud.google.com/gcr/images/cloud-marketplace-containers/GLOBAL/google/debian10?gcrImageListsize=30

@hakman hakman changed the title WIP: Support for ARM64 v2 Support for ARM64 Oct 27, 2020
layers = select({
"@io_bazel_rules_go//go/platform:amd64": [
"etcd-2.2.1-layer-amd64",
"etcd-3.1.12-layer-amd64",
Copy link
Contributor

Choose a reason for hiding this comment

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

We may be able to generate (most) of this from supported_etcd_arch_and_version ... an idea for the future :-)

@justinsb
Copy link
Contributor

justinsb commented Nov 8, 2020

Looks good - let's get this merged :-) Thanks @hakman

/approve
/lgtm

@justinsb justinsb merged commit 622c454 into kopeio:master Nov 8, 2020
@hakman
Copy link
Contributor Author

hakman commented Nov 8, 2020

Thanks @justinsb :)

@hakman hakman deleted the build_arch branch November 8, 2020 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants