feat: move vmalert to own package
- move vmalert from vmutils to its own package
This commit is contained in:
parent
76c331e530
commit
37e7e7c1b7
1
rpms/vmalert/1.119.0/release
Normal file
1
rpms/vmalert/1.119.0/release
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
||||||
23
rpms/vmalert/Dockerfile
Normal file
23
rpms/vmalert/Dockerfile
Normal 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
|
||||||
2
rpms/vmalert/resources/build.sh
Executable file
2
rpms/vmalert/resources/build.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
37
rpms/vmalert/resources/nfpm.yaml
Normal file
37
rpms/vmalert/resources/nfpm.yaml
Normal 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
|
||||||
@ -19,7 +19,6 @@ replaces:
|
|||||||
- vmutils
|
- vmutils
|
||||||
|
|
||||||
provides:
|
provides:
|
||||||
- vmalert
|
|
||||||
- vmalert-tool
|
- vmalert-tool
|
||||||
- vmauth
|
- vmauth
|
||||||
- vmbackup
|
- vmbackup
|
||||||
@ -28,12 +27,6 @@ provides:
|
|||||||
|
|
||||||
# Files to include in the package
|
# Files to include in the package
|
||||||
contents:
|
contents:
|
||||||
- src: /app/vmalert-prod
|
|
||||||
dst: /usr/bin/vmalert
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/vmalert-tool-prod
|
- src: /app/vmalert-tool-prod
|
||||||
dst: /usr/bin/vmalert-tool
|
dst: /usr/bin/vmalert-tool
|
||||||
file_info:
|
file_info:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user