Merge pull request 'benvin/vmagent' (#50) from benvin/vmagent into master
All checks were successful
Deploy / deploy-8 (push) Successful in 4s
Deploy / deploy-9 (push) Successful in 4s

Reviewed-on: #50
This commit is contained in:
Ben Vincent 2025-07-13 17:05:42 +10:00
commit 7c5d5619bf
9 changed files with 126 additions and 14 deletions

View File

@ -0,0 +1 @@
1

23
rpms/vmagent/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY resources /app/resources
# Download the required files
RUN wget -O /app/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${PACKAGE_VERSION}/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz && \
tar xf vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/bash
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,37 @@
# nfpm.yaml
name: vmagent
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "vmagent collects metrics data via popular data ingestion protocols and routes it to VictoriaMetrics."
maintainer: VictoriaMetrics
homepage: https://github.com/VictoriaMetrics/VictoriaMetrics
license: Apache-2.0 license
disable_globbing: false
replaces:
- vmagent
provides:
- vmagent
# Files to include in the package
contents:
- src: /app/vmagent-prod
dst: /usr/bin/vmagent
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -0,0 +1 @@
1

23
rpms/vmalert/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY resources /app/resources
# Download the required files
RUN wget -O /app/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${PACKAGE_VERSION}/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz && \
tar xf vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,2 @@
#!/usr/bin/bash
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,37 @@
# nfpm.yaml
name: vmalert
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "vmalert processes alerts and recording rules from VictoriaMetrics."
maintainer: VictoriaMetrics
homepage: https://github.com/VictoriaMetrics/VictoriaMetrics
license: Apache-2.0 license
disable_globbing: false
replaces:
- vmalert
provides:
- vmalert
# Files to include in the package
contents:
- src: /app/vmalert-prod
dst: /usr/bin/vmalert
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh

View File

@ -19,8 +19,6 @@ replaces:
- vmutils
provides:
- vmagent
- vmalert
- vmalert-tool
- vmauth
- vmbackup
@ -29,18 +27,6 @@ provides:
# Files to include in the package
contents:
- src: /app/vmagent-prod
dst: /usr/bin/vmagent
file_info:
mode: 0755
owner: root
group: root
- src: /app/vmalert-prod
dst: /usr/bin/vmalert
file_info:
mode: 0755
owner: root
group: root
- src: /app/vmalert-tool-prod
dst: /usr/bin/vmalert-tool
file_info: