From 1367a1f35ddd7447d7bf8f2aa5b319d173f6be1a Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 26 Sep 2018 15:33:54 +0100 Subject: [PATCH] grafana: on aarch64 use 5.2.4 version from upstream Upstream started building Grafana for arm64 a while ago. So let's use it instead of someone's build. Change-Id: Ia5359cd86022f2475301407d62a5ad4e1b275c13 --- docker/base/Dockerfile.j2 | 1 - docker/base/sources.list.debian | 3 --- docker/grafana/Dockerfile.j2 | 20 +++++++++++++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 3710a1063d..df1141167e 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -341,7 +341,6 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences ] %} {% set remote_apt_keys = [ 'http://obs.linaro.org/ERP:/18.06/Debian_9/Release.key', - 'https://bintray.com/user/downloadSubjectPublicKey?username=bintray', 'https://download.docker.com/linux/debian/gpg', 'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey' ] %} diff --git a/docker/base/sources.list.debian b/docker/base/sources.list.debian index da74a7dc34..44476cef82 100644 --- a/docker/base/sources.list.debian +++ b/docker/base/sources.list.debian @@ -10,9 +10,6 @@ deb http://obs.linaro.org/ERP:/18.06/Debian_9/ ./ deb [arch=amd64] https://packagecloud.io/grafana/stable/debian/ stretch main -# Unofficial repository for grafana (LP: #1768585). -deb [arch=arm64] https://dl.bintray.com/fg2it/deb-arm64/ stretch main - # elasticsearch (arch:all), logstash (arch:all), kibana (arch:amd64) deb [arch=amd64] https://artifacts.elastic.co/packages/5.x/apt stable main diff --git a/docker/grafana/Dockerfile.j2 b/docker/grafana/Dockerfile.j2 index fa967f0de7..504a235633 100644 --- a/docker/grafana/Dockerfile.j2 +++ b/docker/grafana/Dockerfile.j2 @@ -5,16 +5,34 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} +{% set grafana_packages = ['grafana'] %} + {% if base_arch not in ['aarch64', 'x86_64'] %} RUN echo 'There are no Grafana external repositories for {{ base_arch }}' \ && /bin/false +{% elif base_arch in ['aarch64'] %} + + {% if base_distro in ['centos'] %} + + {% set grafana_packages = [ + 'https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.4-1.aarch64.rpm' + ] %} + + {% elif base_distro in ['debian', 'ubuntu'] %} + + {% set grafana_packages = [ + 'libfontconfig', + 'https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.2.4_arm64.deb' + ] %} + + {% endif %} + {% endif %} {{ macros.configure_user(name='grafana', homedir='/usr/share/grafana') }} -{% set grafana_packages = ['grafana'] %} {{ macros.install_packages(grafana_packages | customizable("packages")) }} WORKDIR /usr/share/grafana