Skip to content

v2.0.0 Breaking changes, Apple M1 support

Compare
Choose a tag to compare
@cloudpossebot cloudpossebot released this 16 Mar 20:51
f6619d9

🚀 Enhancements

Initial support for ARM @Nuru (#837)

Breaking changes (building)

In addition to the changes listed below, this release may bring unexpected breaking changes, ironically due to support for ARM.

Geodesic now must be built with BuildKit. Failing to use BuildKit will generate errors due to ARG TARGETARCH being undefined (it is pre-defined by BuildKit and should not be added on the command line).

BuildKit is installed and used by default by Docker Desktop. For Docker on Linux, recommended options are:

  1. Enable BuildKit on Linux temporarily by adding to Makefile:
export DOCKER_BUILDKIT := 1
  1. Ensure your Linux installation has BuildKit enabled by configuration by adding
{
  "features": {
    "buildkit" : true
  }
}

to /etc/docker/daemon.json (and restarting the daemon).

Previously, if you built a Docker image based on Geodesic on an ARM machine like an Apple M1, because Geodesic was only available in linux/amd64 architecture, your build would have been forced into linux/amd64 architecture and your installations, whether from apt-get or other sources, would have had to have been the same linux/amd64 architecture to work. (The build and run of the resulting Docker image would have been run under emulation.) Now, if you are building on an Apple M1 or M2, you will get the Geodesic linux/arm64 architecture (using native, not emulated code for build and execution, with potentially huge performance benefits), and the rest of your Dockerfile will need to be updated to install architecture-specific packages, some of which may not exist. You will need to decide if you want to go on without them or rather stick to linux/amd64 emulation to retain them.

Furthermore, if you built and pushed a Geodesic image in the past, you would always get a single architecture (linux/amd64) image. Now, if you are not careful, you may overwrite that with a linux/arm64 image, causing slowdowns for people using your image on Intel/AMD/X86_64 hardware. If you want to support both architectures in a shared image, you will need to use Docker buildx to generate a multi-platform image.

If you want to avoid all this, you can convert your FROM statement in your Dockerfile from

FROM cloudposse/geodesic:2.0.0-debian

to

FROM --platform=linux/amd64 cloudposse/geodesic:2.0.0-debian

For more information on multi-platform (a.k.a. multi-architecture) builds, see:

Breaking changes (using)

If you have been using Geodesic to run Terraform code on your host machine (Cloud Posses current standard operating procedure), and are caching providers locally (default Terraform behavior), and you switch to using the new architecture, your Terraform lock files will be a problem, because they will only have checksums for the linux_amd64 platform. You can delete the lock files, or update them with terraform providers lock -platform=linux_arm64. If you want to check in your lock files, then no matter which architecture your host is, be sure to have the lock files include both architectures, by running

terraform providers lock -platform=linux_arm64 -platform=linux_amd64 

what

  • Enhance Debian version of Geodesic to run on arm64 as well as amd64 architecture
  • Make cloudposse/geodesic:latest image Debian instead of Alpine. NOTE: due to a bug, fixed in Geodesic 2.1.1, the latest tag was only being updated in the public.ecr.aws repo, not the Docker Hub repo, so docker pull cloudposse/geodesic:latest was stuck at pulling geodesic:1.7.0-alpine until being switched to geodesic:2.1.1-debian with the v2.1.1 release.
  • Remove binaries that are not available on arm64 or are just outdated:
    • kops
    • awless
    • cfssl
    • rakkess
    • tfenv
    • tfmask
  • Remove init-terraform script meant to be used with obsolete direnv/tfenv configuration
  • Copy python from "official" pre-built docker images rather than compiling it ourselves
  • Update Python 3.10.8 -> 3.10.10
  • Update Google Cloud SDK 410.0.0 -> 422.0.0 (breaking changes)
  • Update Helm-git 0.14.0 -> 0.15.1

why

  • Provide native code support for Apple and Gravitron hardware

notes

This is our initial support of arm64 and can be expected to have some bugs to shake out.

We are only supporting arm64 on Debian at this time. We will not support it on Alpine. Will consider supporting CentOS (or its successor) if we have sufficient demand.

Geodesic relies heavily on Cloud Posse's packages distribution, and it has not yet been updated to automatically generate arm64 packages. As a result, for most packages, only the latest version is available in arm64. We have historical versions of atmos, kubectl, and terraform published. If you need historical versions of other packages, you can request them by opening an issue in packages, but please consider either staying on amd64 or updating to the latest version of the binary instead. Please also give us a few weeks to get arm64 packages automated.

references

  • Supersedes and closes #805
  • Closes #719