Skip to content

Add support for darwin arm64 when installing the plugin via Grafana CLI #584

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

Open
MissingRoberto opened this issue Dec 2, 2024 · 2 comments

Comments

@MissingRoberto
Copy link

What would you like to be added:

Add support for darwin-arm64 when installing the plugin.

Why is this needed:

If you follow the official documentation of this plugin the recommended installation path is by running grafana-cli plugins install grafana-image-renderer which doesn't work on new macbooks.

 grafana-cli --homepath $(pwd) --pluginsDir $(pwd)/data/plugins plugins install grafana-image-renderer
Deprecation warning: The standalone 'grafana-cli' program is deprecated and will be removed in the future. Please update all uses of 'grafana-cli' to 'grafana cli'
Error: ✗ [plugin.archNotFound] grafana-image-renderer is not compatible with your system architecture: darwin-arm64

The first Apple Silicon macbooks were released in 2020, which means that most people using macbooks currently will have one of those and will hit this issue if they try to install this plugin.

Official documentation: https://grafana.com/grafana/plugins/grafana-image-renderer/?tab=installation#installation

The original request for this can be found in #7 but it forces you to run Grafana using Docker and it does not support running things locally which is the recommended way for contributors and provide hot reload for quick development.

@phit
Copy link

phit commented Apr 1, 2025

would also like to see this for small linux systems, don't really wanna install docker just for rendering images..

@phit
Copy link

phit commented Apr 2, 2025

edit: this doesn't work for linux unfortunately due to puppeteer/puppeteer#7740 but could still be useful for macos arm


as far as I can tell there's nothing stopping you from building this locally with this minor patch of bad mapping removed

diff --git a/scripts/pkg.js b/scripts/pkg.js
index ee2ea01..ae3bbb6 100644
--- a/scripts/pkg.js
+++ b/scripts/pkg.js
@@ -17,8 +17,6 @@ const platformTransform = {
 const archTransform = {
   ia32: 'x84',
   arm: 'armv6',
-  // I only assume this is correct
-  arm64: 'armv6',
 };
 
 platform = platformTransform[platform] || platform;

then do make build_package ARCH=linux-arm64-glibc if you aren't running as root you also need to comment out this line in scripts/archive_target.sh

apt-get update && apt-get install zip -y

Image

then you can unzip this to your grafana plugin folder e.g. /var/lib/grafana/plugins and you need to allow it to be loaded this line in the grafana.ini

allow_loading_unsigned_plugins = grafana-image-renderer

arm on macos should be very similar, not sure why these aren't being officially published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants