mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
package: various fixes
- Use `-prod` binaries instead of development binaries for both deb and rpm packages. - Fix binary directory from /usr/sbin to /usr/local/bin as outlined in package/victoria-metrics.service - Fix binary name from `victoriametrics` to `victoria-metrics-prod` in package/victoria-metrics.service
This commit is contained in:
parent
bf6cbb762c
commit
0168a1b658
4 changed files with 16 additions and 16 deletions
|
@ -39,11 +39,11 @@ victoria-metrics-pure-prod:
|
|||
APP_NAME=victoria-metrics APP_SUFFIX='-pure' DOCKER_OPTS='--env CGO_ENABLED=0' $(MAKE) app-via-docker
|
||||
|
||||
### Packaging as DEB - amd64
|
||||
victoria-metrics-package-deb: victoria-metrics
|
||||
victoria-metrics-package-deb: victoria-metrics-prod
|
||||
./package/package_deb.sh amd64
|
||||
|
||||
### Packaging as DEB - arm64
|
||||
victoria-metrics-package-deb-arm64: victoria-metrics-arm64
|
||||
victoria-metrics-package-deb-arm64: victoria-metrics-arm64-prod
|
||||
./package/package_deb.sh arm64
|
||||
|
||||
### Packaging as DEB - all
|
||||
|
@ -52,11 +52,11 @@ victoria-metrics-package-deb-all: \
|
|||
victoria-metrics-package-deb-arm64
|
||||
|
||||
### Packaging as RPM - amd64
|
||||
victoria-metrics-package-rpm: victoria-metrics
|
||||
victoria-metrics-package-rpm: victoria-metrics-prod
|
||||
./package/package_rpm.sh amd64
|
||||
|
||||
### Packaging as RPM - arm64
|
||||
victoria-metrics-package-rpm-arm64: victoria-metrics-arm64
|
||||
victoria-metrics-package-rpm-arm64: victoria-metrics-arm64-prod
|
||||
./package/package_rpm.sh arm64
|
||||
|
||||
### Packaging as RPM - all
|
||||
|
|
|
@ -9,10 +9,10 @@ fi
|
|||
# Map to Debian architecture
|
||||
if [[ "$ARCH" == "amd64" ]]; then
|
||||
DEB_ARCH=amd64
|
||||
EXENAME_SRC="victoria-metrics"
|
||||
EXENAME_SRC="victoria-metrics-prod"
|
||||
elif [[ "$ARCH" == "arm64" ]]; then
|
||||
DEB_ARCH=arm64
|
||||
EXENAME_SRC="victoria-metrics-arm64"
|
||||
EXENAME_SRC="victoria-metrics-arm64-prod"
|
||||
else
|
||||
echo "*** Unknown arch $ARCH"
|
||||
exit 1
|
||||
|
@ -20,7 +20,7 @@ fi
|
|||
|
||||
PACKDIR="./package"
|
||||
TEMPDIR="${PACKDIR}/temp-deb-${DEB_ARCH}"
|
||||
EXENAME_DST="victoria-metrics"
|
||||
EXENAME_DST="victoria-metrics-prod"
|
||||
|
||||
# Pull in version info
|
||||
|
||||
|
@ -33,7 +33,7 @@ BUILD=`cat ${PACKDIR}/VAR_BUILD | perl -ne 'chomp and print'`
|
|||
|
||||
mkdir -p "${TEMPDIR}" && echo "*** Created : ${TEMPDIR}"
|
||||
|
||||
mkdir -p "${TEMPDIR}/usr/sbin/"
|
||||
mkdir -p "${TEMPDIR}/usr/local/bin/"
|
||||
mkdir -p "${TEMPDIR}/lib/systemd/system/"
|
||||
|
||||
echo "*** Version : ${VERSION}-${BUILD}"
|
||||
|
@ -45,7 +45,7 @@ echo "*** Out .deb : ${OUT_DEB}"
|
|||
|
||||
# Copy the binary
|
||||
|
||||
cp "./bin/${EXENAME_SRC}" "${TEMPDIR}/usr/sbin/${EXENAME_DST}"
|
||||
cp "./bin/${EXENAME_SRC}" "${TEMPDIR}/usr/local/bin/${EXENAME_DST}"
|
||||
|
||||
# Copy supporting files
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ fi
|
|||
# Map to Debian architecture
|
||||
if [[ "$ARCH" == "amd64" ]]; then
|
||||
RPM_ARCH=x86_64
|
||||
EXENAME_SRC="victoria-metrics"
|
||||
EXENAME_SRC="victoria-metrics-prod"
|
||||
elif [[ "$ARCH" == "arm64" ]]; then
|
||||
RPM_ARCH=aarch64
|
||||
EXENAME_SRC="victoria-metrics-arm64"
|
||||
EXENAME_SRC="victoria-metrics-arm64-prod"
|
||||
else
|
||||
echo "*** Unknown arch $ARCH"
|
||||
exit 1
|
||||
|
@ -26,7 +26,7 @@ fi
|
|||
|
||||
PACKDIR="./package"
|
||||
TEMPDIR="${PACKDIR}/temp-rpm-${RPM_ARCH}"
|
||||
EXENAME_DST="victoria-metrics"
|
||||
EXENAME_DST="victoria-metrics-prod"
|
||||
|
||||
# Pull in version info
|
||||
|
||||
|
@ -62,14 +62,14 @@ Requires: libc
|
|||
VictoriaMetrics is fast, cost-effective and scalable time series database. It can be used as a long-term remote storage for Prometheus.
|
||||
|
||||
%files
|
||||
%attr(0744, root, root) /usr/sbin/*
|
||||
%attr(0744, root, root) /usr/local/bin/*
|
||||
%attr(0644, root, root) /lib/systemd/system/*
|
||||
|
||||
%prep
|
||||
mkdir -p \$RPM_BUILD_ROOT/usr/sbin/
|
||||
mkdir -p \$RPM_BUILD_ROOT/usr/local/bin/
|
||||
mkdir -p \$RPM_BUILD_ROOT/lib/systemd/system/
|
||||
|
||||
cp ${PWD}/bin/${EXENAME_SRC} \$RPM_BUILD_ROOT/usr/sbin/
|
||||
cp ${PWD}/bin/${EXENAME_SRC} \$RPM_BUILD_ROOT/usr/local/bin/${EXENAME_DST}
|
||||
cp ${PWD}/package/victoria-metrics.service \$RPM_BUILD_ROOT/lib/systemd/system/
|
||||
|
||||
%post
|
||||
|
|
|
@ -8,7 +8,7 @@ StartLimitBurst=5
|
|||
StartLimitInterval=0
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
ExecStart=/usr/local/bin/victoriametrics -storageDataPath=/var/lib/victoria-metrics-data
|
||||
ExecStart=/usr/local/bin/victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics-data
|
||||
ExecStop=/bin/kill -s SIGTERM $MAINPID
|
||||
LimitNOFILE=65536
|
||||
LimitNPROC=32000
|
||||
|
|
Loading…
Reference in a new issue