You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mg...@apache.org on 2026/04/14 10:14:27 UTC
(kudu) branch master updated: KUDU-3685: Add Prometheus to thirdparty
This is an automated email from the ASF dual-hosted git repository.
mgreber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 35f51f402 KUDU-3685: Add Prometheus to thirdparty
35f51f402 is described below
commit 35f51f402a5f154b6b9c5f6bb38022f200d32c56
Author: Marton Greber <gr...@gmail.com>
AuthorDate: Mon Apr 13 20:02:21 2026 +0200
KUDU-3685: Add Prometheus to thirdparty
Add Prometheus to thirdparty to support implementing MiniPrometheus for
tests.
Do not build Prometheus from source, since it would currently be the
only third-party component requiring Go tooling. Instead, download the
Prometheus release binary.
Tested that the install works, and Prometheus can start up on:
Ubuntu22, Ubuntu18, Rhel88
Change-Id: I22ec4d34cb5f486aca3e2d624b17528774c2be09
Reviewed-on: http://gerrit.cloudera.org:8080/24187
Reviewed-by: Zoltan Chovan <zc...@cloudera.com>
Tested-by: Marton Greber <gr...@gmail.com>
Reviewed-by: Gabriella Lotz <lo...@gmail.com>
---
thirdparty/build-thirdparty.sh | 8 ++++++++
thirdparty/download-thirdparty.sh | 6 ++++++
thirdparty/vars.sh | 17 +++++++++++++++++
3 files changed, 31 insertions(+)
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index d81d5d74c..accec86e0 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -112,6 +112,7 @@ else
"ranger-kms") F_RANGER_KMS=1 ;;
"rocksdb") F_ROCKSDB=1 ;;
"flatbuffers") F_FLATBUFFERS=1 ;;
+ "prometheus") F_PROMETHEUS=1 ;;
*) echo "Unknown module: $arg"; exit 1 ;;
esac
done
@@ -311,6 +312,13 @@ fi
if [ -n "$F_COMMON" -o -n "$F_FLATBUFFERS" ]; then
build_flatbuffers
fi
+
+# Install Prometheus by symlinking its prebuilt binary directory into $PREFIX/opt.
+# Prometheus is a Go binary and does not require compilation.
+if [ -n "$F_COMMON" -o -n "$F_PROMETHEUS" ]; then
+ mkdir -p $PREFIX/opt
+ ln -nsf $PROMETHEUS_SOURCE $PREFIX/opt/prometheus
+fi
### Build C dependencies without instrumentation
PREFIX=$PREFIX_DEPS
diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index 664d0b15c..0ccdad04f 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -518,6 +518,12 @@ fetch_and_patch \
$ROCKSDB_PATCHLEVEL \
"patch -p1 < $TP_DIR/patches/rocksdb-gcc13.patch"
+PROMETHEUS_PATCHLEVEL=0
+fetch_and_patch \
+ ${PROMETHEUS_NAME}.tar.gz \
+ ${PROMETHEUS_SOURCE} \
+ ${PROMETHEUS_PATCHLEVEL}
+
echo "---------------"
echo "Thirdparty dependencies downloaded successfully"
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 3e38411b8..ef11488a2 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -280,3 +280,20 @@ JWT_CPP_SOURCE=$TP_SOURCE_DIR/$JWT_CPP_NAME
ROCKSDB_VERSION=7.7.3
ROCKSDB_NAME=rocksdb-$ROCKSDB_VERSION
ROCKSDB_SOURCE=$TP_SOURCE_DIR/$ROCKSDB_NAME
+
+# Prometheus is downloaded as a prebuilt binary from the S3 bucket.
+# OS and arch are mapped to the Prometheus release naming convention.
+#
+# To update to a new version:
+# 1. Download the tarballs for all supported OS/arch combinations from
+# https://prometheus.io/download/
+# (os: linux, darwin; arch: amd64, arm64 — four tarballs total)
+# 2. Upload each tarball to the S3 bucket:
+# s3cmd put -P prometheus-<version>.<os>-<arch>.tar.gz \
+# s3://cloudera-thirdparty-libs/
+# 3. Update PROMETHEUS_VERSION below.
+PROMETHEUS_VERSION=3.11.2
+PROMETHEUS_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
+PROMETHEUS_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
+PROMETHEUS_NAME=prometheus-${PROMETHEUS_VERSION}.${PROMETHEUS_OS}-${PROMETHEUS_ARCH}
+PROMETHEUS_SOURCE=$TP_SOURCE_DIR/$PROMETHEUS_NAME