From 766e5e4d2c153f6ecac41e8223a18e9465976250 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 29 Jan 2019 18:35:09 +0200 Subject: [PATCH] Add ARM builds of Prometheus for 2.6.1 Signed-off-by: Radoslav Dimitrov --- contrib/alertmanager-arm64/0.15.0/Makefile | 2 +- contrib/alertmanager-armhf/0.15.0/Makefile | 2 +- contrib/prometheus-arm64/2.6.1/Dockerfile | 31 ++++++++++++++++++++++ contrib/prometheus-arm64/2.6.1/Makefile | 7 +++++ contrib/prometheus-arm64/2.6.1/README.md | 13 +++++++++ contrib/prometheus-armhf/2.6.1/Dockerfile | 31 ++++++++++++++++++++++ contrib/prometheus-armhf/2.6.1/Makefile | 7 +++++ contrib/prometheus-armhf/2.6.1/README.md | 13 +++++++++ 8 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 contrib/prometheus-arm64/2.6.1/Dockerfile create mode 100644 contrib/prometheus-arm64/2.6.1/Makefile create mode 100644 contrib/prometheus-arm64/2.6.1/README.md create mode 100644 contrib/prometheus-armhf/2.6.1/Dockerfile create mode 100644 contrib/prometheus-armhf/2.6.1/Makefile create mode 100644 contrib/prometheus-armhf/2.6.1/README.md diff --git a/contrib/alertmanager-arm64/0.15.0/Makefile b/contrib/alertmanager-arm64/0.15.0/Makefile index d7b7b40d..79d4c9ee 100644 --- a/contrib/alertmanager-arm64/0.15.0/Makefile +++ b/contrib/alertmanager-arm64/0.15.0/Makefile @@ -4,4 +4,4 @@ ci-arm64-build: .PHONY: ci-arm64-push ci-arm64-push: - docker push functions/alertmanager:0.15.0-arm64 \ No newline at end of file + docker push functions/alertmanager:0.15.0-arm64 diff --git a/contrib/alertmanager-armhf/0.15.0/Makefile b/contrib/alertmanager-armhf/0.15.0/Makefile index dbc45436..eb8c055b 100644 --- a/contrib/alertmanager-armhf/0.15.0/Makefile +++ b/contrib/alertmanager-armhf/0.15.0/Makefile @@ -4,4 +4,4 @@ ci-armhf-build: .PHONY: ci-armhf-push ci-armhf-push: - docker push functions/alertmanager:0.15.0-armhf \ No newline at end of file + docker push functions/alertmanager:0.15.0-armhf diff --git a/contrib/prometheus-arm64/2.6.1/Dockerfile b/contrib/prometheus-arm64/2.6.1/Dockerfile new file mode 100644 index 00000000..0f40b43e --- /dev/null +++ b/contrib/prometheus-arm64/2.6.1/Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:3.8 +WORKDIR /root/ + +RUN apk add --update libarchive-tools curl \ + && curl -sLf https://github.com/prometheus/prometheus/releases/download/v2.6.1/prometheus-2.6.1.linux-arm64.tar.gz > prometheus.tar.gz \ + && bsdtar -xvf prometheus.tar.gz -C ./ --strip-components=1 \ + && apk del libarchive-tools curl \ + && mkdir /etc/prometheus \ + && mkdir -p /usr/share/prometheus \ + && cp prometheus /bin/prometheus \ + && cp promtool /bin/promtool \ + && cp prometheus.yml /etc/prometheus/ \ + && cp -r console_libraries /usr/share/prometheus/ \ + && cp -r consoles /usr/share/prometheus/ \ + && rm -rf /root/* + +RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ +RUN mkdir -p /prometheus && \ + chown -R nobody:nogroup /etc/prometheus /prometheus + +USER nobody +EXPOSE 9090 +VOLUME [ "/prometheus" ] +WORKDIR /prometheus + +ENTRYPOINT [ "/bin/prometheus" ] +CMD [ "--config.file=/etc/prometheus/prometheus.yml", \ + "--storage.tsdb.path=/prometheus", \ + "--web.console.libraries=/usr/share/prometheus/console_libraries", \ + "--web.console.templates=/usr/share/prometheus/consoles" ] + diff --git a/contrib/prometheus-arm64/2.6.1/Makefile b/contrib/prometheus-arm64/2.6.1/Makefile new file mode 100644 index 00000000..6dea1bad --- /dev/null +++ b/contrib/prometheus-arm64/2.6.1/Makefile @@ -0,0 +1,7 @@ +.PHONY: ci-arm64-build +ci-arm64-build: + docker build -t functions/prometheus:2.6.1-arm64 . + +.PHONY: ci-arm64-push +ci-arm64-push: + docker push functions/prometheus:2.6.1-arm64 diff --git a/contrib/prometheus-arm64/2.6.1/README.md b/contrib/prometheus-arm64/2.6.1/README.md new file mode 100644 index 00000000..d0a4d6e7 --- /dev/null +++ b/contrib/prometheus-arm64/2.6.1/README.md @@ -0,0 +1,13 @@ +# Prometheus for ARM64 + +## Building: + +```bash +make ci-arm64-build +``` + +## Pushing: + +```bash +make ci-arm64-push +``` diff --git a/contrib/prometheus-armhf/2.6.1/Dockerfile b/contrib/prometheus-armhf/2.6.1/Dockerfile new file mode 100644 index 00000000..7c4ff8d6 --- /dev/null +++ b/contrib/prometheus-armhf/2.6.1/Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:3.8 +WORKDIR /root/ + +RUN apk add --update libarchive-tools curl \ + && curl -sLf https://github.com/prometheus/prometheus/releases/download/v2.6.1/prometheus-2.6.1.linux-armv7.tar.gz > prometheus.tar.gz \ + && bsdtar -xvf prometheus.tar.gz -C ./ --strip-components=1 \ + && apk del libarchive-tools curl \ + && mkdir /etc/prometheus \ + && mkdir -p /usr/share/prometheus \ + && cp prometheus /bin/prometheus \ + && cp promtool /bin/promtool \ + && cp prometheus.yml /etc/prometheus/ \ + && cp -r console_libraries /usr/share/prometheus/ \ + && cp -r consoles /usr/share/prometheus/ \ + && rm -rf /root/* + +RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ +RUN mkdir -p /prometheus && \ + chown -R nobody:nogroup /etc/prometheus /prometheus + +USER nobody +EXPOSE 9090 +VOLUME [ "/prometheus" ] +WORKDIR /prometheus + +ENTRYPOINT [ "/bin/prometheus" ] +CMD [ "--config.file=/etc/prometheus/prometheus.yml", \ + "--storage.tsdb.path=/prometheus", \ + "--web.console.libraries=/usr/share/prometheus/console_libraries", \ + "--web.console.templates=/usr/share/prometheus/consoles" ] + diff --git a/contrib/prometheus-armhf/2.6.1/Makefile b/contrib/prometheus-armhf/2.6.1/Makefile new file mode 100644 index 00000000..9302b588 --- /dev/null +++ b/contrib/prometheus-armhf/2.6.1/Makefile @@ -0,0 +1,7 @@ +.PHONY: ci-armhf-build +ci-armhf-build: + docker build -t functions/prometheus:2.6.1-armhf . + +.PHONY: ci-armhf-push +ci-armhf-push: + docker push functions/prometheus:2.6.1-armhf diff --git a/contrib/prometheus-armhf/2.6.1/README.md b/contrib/prometheus-armhf/2.6.1/README.md new file mode 100644 index 00000000..195d7921 --- /dev/null +++ b/contrib/prometheus-armhf/2.6.1/README.md @@ -0,0 +1,13 @@ +# Prometheus for ARMHF + +## Building: + +```bash +make ci-armhf-build +``` + +## Pushing: + +```bash +make ci-armhf-push +```