Loki: ARM Support for promtail and Loki

Created on 5 Jun 2019  Â·  10Comments  Â·  Source: grafana/loki

Is your feature request related to a problem? Please describe.
Loki and promtail is not available for ARM architecture

Describe the solution you'd like
Loki and promtail available on ARM architecture

Describe alternatives you've considered
Would be really nice that loki and promtail will have support for ARM devices

componenpackaging kinfeature

Most helpful comment

Currently, this is probably impossible with a single DS. However, once we implemented Image Manifest v2, the docker daemon automatically picks the right version for the OS.

Until that you need two.

All 10 comments

Okay, in theory promtail as well as loki are already ARM compatible. As they are written in Golang, which is cross platform, they can run everywhere ARM is supported. However, building production binaries is not currently supported using the Makefile, as the assets task fails because of the wrong GOARCH.

Nevertheless you can build development binaries for your platform yourself:

  1. Obtain a recent Golang build: https://nats.io/documentation/tutorials/go-install/
  2. Checkout loki: git clone https://github.com/grafana/loki && cd loki
  3. Build promtail: GOOS=linux GOARCH=arm64 go build ./cmd/promtail
  4. Build loki: GOOS=linux GOARCH=arm64 go build ./cmd/loki

Now you have ./loki and ./promtail binaries for arm64. You may tune GOOS for the Operating System (linux, windows, darwin), and GOARCH for the architecture (amd64, arm64, arm, etc.)

Have made a start at Docker images for amd64/arm64 images for both loki and promtail as I have a multi-arch k8s cluster.
Still need to work out ports/configuration/etc in Dockerfiles but hopefully this gets you going (you'll probably overwrite all that with k8s or compose though)

If you have multi arch cluster how do you deploy for example daemon set of promtail ? You are deploying two and in case of arch is amd you use amd image and in case of arm you deploy arm image ?

Currently, this is probably impossible with a single DS. However, once we implemented Image Manifest v2, the docker daemon automatically picks the right version for the OS.

Until that you need two.

@sh0rez what is the obstacle to using Image Manifest v2? Is that an internal dependency, or an external one?

@vielmetti there is no real obstacle, the required code is just not finished yet. Our current Dockerfile is not cross-platform and the new one is not merged yet (See #668)

Once this is done, I can add manifest v2 support to the CI and cross-platform functionality is provided. Stay tuned!

Thanks @sh0rez - that clarifies things. (I know that in the past some registries did not support manifest v2, e.g. Quay.io, wanted to distinguish between things within the project and external to it.)

Hello everyone!
I can proudly announce that this has been finally implemented in b887602e3654d9525467ed0cde79884887d94749 :tada:

From now on, it is sufficient to just pull the docker image on the desired architecture and it should be the right one.

Currently supported are amd64, arm64 (sometimes called arm8 or aarch64) and arm7.
Thanks for your patience!

Was this page helpful?
0 / 5 - 0 ratings