fg2it / grafana-on-raspberry

Grafana packages for raspberry pi (armv6/armv7) and aarch64/arm64
311 stars 32 forks source link

Request for arm64 packages #16

Closed marcelrv closed 6 years ago

marcelrv commented 7 years ago

Thanks very much for building these rpi packages.

I'm having the pine64, which is an arm64 architecture and also not provided with the regular repository. I now installed your armhf package, but would be great if a arm64 package would be available as well.

fg2it commented 7 years ago

That is something i would like to do but currently i don't have the hardware. So, this won't be done soon.

scargill commented 7 years ago

Another request here... got 4.4.3 working a treat on the Pi - but I have several ARM64 machines (NanoPi Neo2) and cannot find any release for ARM64 - any help here appreciated. If I knew how to do this I would do it myself.... but right now it is beyond me.

fragolinux commented 7 years ago

what about the src.deb files so we can try to rebuild them on arm64 arch? thanks

fragolinux commented 7 years ago

marcelrv, hi, we just tested this on a neo2: wget https://dl.bintray.com/fg2it/deb/main/g/grafana_4.4.3_armhf.deb sudo dpkg -i grafana_4.4.3_armhf.deb but we got:

dpkg: error processing archive grafana_4.4.3_armhf.deb (--install): package architecture (armhf) does not match system (arm64) Errors were encountered while processing: grafana_4.4.3_armhf.deb

so, how did you install an armhf file on arm64 arch??? thanks

fg2it commented 7 years ago

@fragolinux You will probably need

dpkg --add-architecture armhf

for dpkg to accept an armhf package on your system. But dpkg will probably refuse even with this (and it should) since grafana package has dependencies that won't be met. Here, dpkg is likely not the easiest tool since it won't manage these dependencies.

I think the easiest way is via apt and properly set sources. For this, you should do something like:

You might also need an other repo that contains the grafana package dependencies for armhf arch, but the one already in your system might do the job.

Then you have a chance it will work, but I am unsure. I would advise some caution here : try this on a test system (I would do it inside a docker container).

A less dangerous test is to first try the tarball : the dependencies of grafana package are for install and for phantomjs. So you don't really need them to run grafana-server binary (see the official doc for how to run it directly). But still, grafana-server has some dependencies on system libraries that will need to be met, so I would not bet much on this way.

If you manage to have it works, please let me know how.

@marcelrv could provides details on your os config (eg apt source, ...) and the way you install my package ?

fg2it commented 7 years ago

@scargill The core of grafana should build fine. The problem will likely be phantomjs since there is not official binary for arm64. That is a nasty beast to build, so I would try to find a reasonable source that has already build it and check it works on your system (it needs to be v2.1.1). Then I would try a native build. Grafana build instructions should be close to what you need. The files Dockerfile and build.sh could help but need a few modifications. In a bash shell :

marcelrv commented 7 years ago

@marcelrv could provides details on your os config (eg apt source, ...) and the way you install my package ?

I'm currently having in my file: deb [arch=armhf] https://dl.bintray.com/fg2it/deb jessie main

fg2it commented 7 years ago

@marcelrv found that post. Is it how you did it ? Can you check the content of cat /etc/apt/sources.list ?

marcelrv commented 7 years ago

@fg2it indeed, that's my post.

What is in cat /etc/apt/sources.list? I made a file /etc/apt/sources.list.d/grafana.list where I added the line deb [arch=armhf] https://dl.bintray.com/fg2it/deb jessie main

but if relevant, here is the other one as well

$ sudo cat /etc/apt/sources.list
deb http://ports.ubuntu.com/ xenial main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial main restricted universe multiverse

deb http://ports.ubuntu.com/ xenial-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial-updates main restricted universe multiverse

deb http://ports.ubuntu.com/ xenial-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial-security main restricted universe multiverse

deb http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse
fragolinux commented 7 years ago

this is what i did to install it on arch64, i had to wget and dpkg install the deb file, as i don't know how to apt-get install the package from the armhf repository, if i try the usual "sudo apt-get install grafana" it downloaded the arch64 (old) version 2.6.0... how to force apt-get install to download the armhf version? thanks

sudo apt-get -y update sudo apt-get install -y apt-transport-https curl sudo dpkg --add-architecture armhf echo "deb [arch=armhf] https://dl.bintray.com/fg2it/deb jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add - sudo apt-get -y update sudo apt-get -y remove --purge grafana grafana-data sudo rm -rf /var/log/grafana wget https://dl.bintray.com/fg2it/deb/main/g/grafana_4.4.3_armhf.deb sudo dpkg -i grafana_4.4.3_armhf.deb sudo apt-get -f install sudo systemctl daemon-reload sudo systemctl enable grafana-server sudo systemctl start grafana-server

fragolinux commented 7 years ago

nevermind, found: sudo apt-get -y update && sudo apt-get install -y grafana:armhf

enrikre commented 6 years ago

I did all this but get an error when installing with the latest command (apt-get install -y grafana:armhf):

Unpacking grafana:armhf (4.5.2) ... dpkg: error processing archive /var/cache/apt/archives/grafana_4.5.2_armhf.deb (--unpack): trying to overwrite '/usr/share/grafana/vendor/phantomjs/phantomjs', which is also in package grafana-data 2.6.0+dfsg-1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for libc-bin (2.23-0ubuntu9) ... Processing triggers for systemd (229-4ubuntu19) ... Errors were encountered while processing: /var/cache/apt/archives/grafana_4.5.2_armhf.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

enrikre commented 6 years ago

Sorry for that, just solved it. I had some old packages from a previous grafana 2.6 old version installation (grafana-data) as can be seen in the error message. Removing grafana-data with apt solved the problem.

jschaeke commented 6 years ago

If anyone has a working armv64v8 Dockerfile, I'm interested too (for running on Scaleway)...

elraro commented 6 years ago

@jschaeke im trying to compile it forarmv8 (scaleway too)! Give me a few days

elraro commented 6 years ago

WARNING

Its just a DEV BUILD, SO PLEASE, DONT USE IT IN STABLE

https://github.com/elraro/grafana-arm64/releases

@jschaeke let me a few hours and i will update the Dockerfile and the image in the docker hub

carlosedp commented 6 years ago

Guys, I've set an automated build on Travis-CI to crossbuild Grafana images based on the awesome @fg2it mechanics. The images are uploaded to my DockerHub and have a manifest so fetching :latest or the :release number grabs the correct image for your platform (ARM32 or ARM64).

fg2it commented 6 years ago

It seems we are all on that build 😄 I build an experimental arm64 phantomjs binary which was one of thing I missed for an arm64 grafana build. So, I build an experimental package of grafana v5.0.0 for arm64 and created a repo on bintray to host it. It can be download directly from https://bintray.com/fg2it/deb-arm64/download_file?file_path=pool%2Fg%2Fgrafana-on-raspberry%2Fgrafana_5.0.0_arm64.deb or you add the repo to your source

sudo apt-get install apt-transport-https curl
curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
echo "deb https://dl.bintray.com/fg2it/deb-arm64 stretch experimental" | sudo tee -a /etc/apt/sources.list.d/grafana.list

and install as usual

sudo apt-get update
sudo apt-get install grafana

In the bintray repo, the package is currently available for wheezy, jessie and stretch but as an experimental package only.

If you missed it, this is an experimental package. The reason is I still don't have arm64 board so I was just able to perform minimal testing of the package. I would greatly appreciate if some of you could test and report how it behaves (with as much details as possible : os version, install process, hardware used, ...), including the png feature relying on phantomjs. In case of error, I would also be interested in behaviour of the phantomjs binary included in the package (should be /usr/share/grafana/tools/phantomjs).

Edit :

scargill commented 6 years ago

I would need help to make changes. Still early days

On 3 March 2018 12:07:29 am fg2it notifications@github.com wrote:

It seems we are all on that build 😄 I build an experimental arm64 phantomjs binary which was one of thing I missed for an arm64 grafana build. So, I build an experimental package of grafana v5.0.0 for arm64 and created a repo on bintray to host it. It can be download directly from https://bintray.com/fg2it/deb-arm64/download_file?file_path=pool%2Fg%2Fgrafana-on-raspberry%2Fgrafana_5.0.0_arm64.deb or you add the repo to your source

sudo apt-get install apt-transport-https curl
curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | 
sudo apt-key add -
echo "deb https://dl.bintray.com/fg2it/deb stretch experimental" | sudo tee 
-a /etc/apt/sources.list.d/grafana.list

and install as usual

sudo apt-get update
sudo apt-get install grafana

In the bintray repo, the package is currently available for wheezy, jessie and stretch but as an experimental package only.

If you missed it, this is an experimental package. The reason is I still don't have arm64 board so I was just able to perform minimal testing of the package. I would greatly appreciate if some of you could test and report how it behaves (with as much details as possible : os version, install process, hardware used, ...), including the png feature relying on phantomjs. In case of error, I would also be interested in behaviour of the phantomjs binary included in the package (should be /usr/share/grafana/tools/phantomjs).

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/fg2it/grafana-on-raspberry/issues/16#issuecomment-370093574

fg2it commented 6 years ago

v5.0.3 should world with arm64/jessie

matt407 commented 6 years ago

Thank you for providing an arm64 package. :+1: I installed v5.0.3 on Armbian Stretch on my Odroid C2. It looks good so far!!

fg2it commented 6 years ago

@matt407 thanks for the feedback. Did you try the png rendering feature ([in the pop up menu of a panel title] Share -> Direct link rendered image) ?

matt407 commented 6 years ago

Well, if I use on a Panel Share - Link - "Direct link rendered image", a new browser tab will be opened and the shared panel is provided. When I copy the address line to another browser, where no session to Grafana exists, I was redirected to the login screen of Grafana.

fg2it commented 6 years ago

If I understand correctly, that is just fine :-) The new tab just creates a png, which is meant to be saved and sent (or store) as you wish. The url is a temporary url. Again, thanks for trying (and sharing) !

matt407 commented 6 years ago

@fg2it , the png feature was new to me, I never used it before. It is working well, the selected graph is provided in a new window. :+1: :+1:

fg2it commented 6 years ago

After about 200 downloads, I don't see reports of problems with the released arm64 packages, so let say this is solved. See Release section and bintray repo.

marcelrv commented 6 years ago

thanks!!