Skip to content
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

ARM Support for promtail and Loki #653

Closed
Razikus opened this issue Jun 5, 2019 · 11 comments
Closed

ARM Support for promtail and Loki #653

Razikus opened this issue Jun 5, 2019 · 11 comments
Labels
component/packaging type/feature Something new we should do

Comments

@Razikus
Copy link

Razikus commented Jun 5, 2019

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

@Razikus Razikus changed the title ARM Support ARM Support for promtail and Loki Jun 5, 2019
@sh0rez
Copy link
Member

sh0rez commented Jun 6, 2019

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.)

@karlskewes
Copy link

karlskewes commented Jun 12, 2019

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)

@RRadziejewski
Copy link

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 ?

@sh0rez
Copy link
Member

sh0rez commented Jun 14, 2019

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.

@steven-sheehy
Copy link
Contributor

@Kuqd Duplicate of #67

@vielmetti
Copy link

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

@sh0rez
Copy link
Member

sh0rez commented Jun 20, 2019

@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!

@vielmetti
Copy link

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.)

@sh0rez
Copy link
Member

sh0rez commented Aug 1, 2019

Hello everyone!
I can proudly announce that this has been finally implemented in b887602 🎉

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!

@sh0rez sh0rez closed this as completed Aug 1, 2019
@sh0rez sh0rez added type/feature Something new we should do and removed type/question labels Aug 1, 2019
@RRadziejewski
Copy link

RRadziejewski commented Aug 1, 2019 via email

@saikrishna1488
Copy link

saikrishna1488 commented Feb 8, 2024

I faced this issue when i used the ec2 with amazon linux 2 and ARM architecture so follow the below process

wget https://github.com/grafana/loki/releases/download/v2.8.8/loki-linux-arm64.zip
unzip loki-linux-arm64.zip
mv loki-linux-arm64 loki
cp loki /usr/local/bin/
wget https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml
cp loki-local-config.yaml /usr/local/bin/

vi /etc/systemd/system/loki.service

place the below content in above file

[Unit]
Description=Loki Service
After=network.target

[Service]
ExecStart=/usr/local/bin/loki -config.file=/usr/local/bin/loki-config.yaml
Restart=always
User=loki
Group=loki

[Install]
WantedBy=multi-user.target

#file end save the file and run below commands

useradd -rs /bin/false loki
systemctl daemon-reload
sudo systemctl enable loki
sudo systemctl start loki
sudo systemctl status loki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/packaging type/feature Something new we should do
Projects
None yet
Development

No branches or pull requests

8 participants