Skip to content

whamCloud Release

whamCloud Release #22

name: whamCloud Release
on:
workflow_dispatch:
inputs:
mode:
description: 'Run mode — Test builds artifacts only; Release publishes to GitHub Releases'
required: true
type: choice
options:
- Test
- Release
default: Test
version:
description: 'Release version (e.g., 1.0.0)'
required: true
default: '1.0.0'
prerelease:
description: 'Mark as pre-release (Release mode only)'
required: false
type: boolean
default: false
permissions:
contents: write
# ============================================================
# Job 1: Build Go binaries and tarballs once.
# Artifacts are shared with all downstream jobs.
# ============================================================
jobs:
build-binaries:
name: Build Binaries & Tarballs
runs-on: [self-hosted, victoria-logs]
steps:
- name: Show run mode in workflow summary
run: |
if [ "${{ github.event.inputs.mode }}" = "Test" ]; then
echo "## 🧪 Test Run — v${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "Binaries and RPMs will be built and stored as workflow artifacts. **No GitHub Release will be created.**" >> $GITHUB_STEP_SUMMARY
else
echo "## 🚀 Release Run — v${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "Binaries and RPMs will be built, verified, and then published as **GitHub Release v${{ github.event.inputs.version }}**." >> $GITHUB_STEP_SUMMARY
fi
- name: Checkout VictoriaLogs repository
uses: actions/checkout@v5
with:
fetch-depth: 0
path: VictoriaLogs
- name: Build VictoriaLogs tarballs and binaries
working-directory: VictoriaLogs
run: |
make -f Makefile.whamcloud whamcloud-release VERSION=${{ github.event.inputs.version }}
env:
WHAMCLOUD_VERSION: ${{ github.event.inputs.version }}
- name: List build artifacts
working-directory: VictoriaLogs
run: |
echo "=== Tarballs & checksums ==="
ls -lh bin/victoria-logs-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
ls -lh bin/victoria-logs-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
ls -lh bin/vlutils-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
ls -lh bin/vlutils-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
echo "=== Prod binaries (used by RPM packaging) ==="
ls -lh bin/victoria-logs-linux-amd64-prod
ls -lh bin/vlagent-linux-amd64-prod
ls -lh bin/vlogscli-linux-amd64-prod
# Upload tarballs, checksums, and the three prod binaries as one artifact.
# The common path prefix (VictoriaLogs/bin/) is stripped automatically by
# upload-artifact, so downstream jobs receive flat files under their download path.
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-v${{ github.event.inputs.version }}
path: |
VictoriaLogs/bin/victoria-logs-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
VictoriaLogs/bin/victoria-logs-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
VictoriaLogs/bin/vlutils-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
VictoriaLogs/bin/vlutils-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
VictoriaLogs/bin/victoria-logs-linux-amd64-prod
VictoriaLogs/bin/vlagent-linux-amd64-prod
VictoriaLogs/bin/vlogscli-linux-amd64-prod
retention-days: ${{ github.event.inputs.mode == 'Test' && 1 || 30 }}
- name: Clean up build artifacts
if: always()
working-directory: VictoriaLogs
run: |
make -f Makefile.whamcloud whamcloud-clean VERSION=${{ github.event.inputs.version }}
# ============================================================
# Job 2: Build RPMs for all EL distributions in parallel.
# Downloads the shared binaries — no redundant Go builds.
# fail-fast: true — if any dist fails, all legs stop and publish is blocked.
# ============================================================
build-rpms:
name: Build ${{ matrix.dist }} RPMs
needs: build-binaries
runs-on: [self-hosted, victoria-logs]
strategy:
fail-fast: true
matrix:
include:
- dist: el8
image: rockylinux:8
- dist: el9
image: rockylinux:9
- dist: el10
image: rockylinux/rockylinux:10.2
steps:
- name: Checkout victorialogs-rpm repository
uses: actions/checkout@v5
with:
repository: whamCloud/victorialogs-rpm
path: victorialogs-rpm
# Artifact files land flat in bin/ (path prefix stripped by upload-artifact).
# The docker run mounts bin/ as /binaries — matching what the .spec files expect:
# victoria-logs-linux-amd64-prod → /binaries/victoria-logs-linux-amd64-prod
# vlagent-linux-amd64-prod → /binaries/vlagent-linux-amd64-prod
# vlogscli-linux-amd64-prod → /binaries/vlogscli-linux-amd64-prod
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts-v${{ github.event.inputs.version }}
path: bin
- name: Restore binary execute permissions
run: chmod +x bin/*-prod
- name: Build ${{ matrix.dist }} RPMs in container
run: |
echo "Building ${{ matrix.dist }} RPMs for version ${{ github.event.inputs.version }}..."
docker run --rm \
-v $(pwd)/victorialogs-rpm:/build \
-v $(pwd)/bin:/binaries:ro \
-w /build \
${{ matrix.image }} \
bash -c "
set -e
echo 'Installing RPM build tools...'
dnf install -y make rpm-build rpmdevtools systemd-rpm-macros systemd
echo 'Building ${{ matrix.dist }} RPMs...'
make rpm VERSION=${{ github.event.inputs.version }} DISTS=${{ matrix.dist }}
"
- name: List and verify built ${{ matrix.dist }} RPMs
working-directory: victorialogs-rpm
run: |
echo "Built ${{ matrix.dist }} RPMs:"
ls -lh output/*.rpm
echo ""
echo "Verifying RPM metadata:"
for rpm in output/*.rpm; do
echo "=== $rpm ==="
rpm -qip "$rpm" | grep -E "Name|Version|Release|Architecture|Build Host"
done
- name: Test install ${{ matrix.dist }} RPMs
run: |
echo "Testing ${{ matrix.dist }} RPM installation in clean container..."
docker run --rm \
-v $(pwd)/victorialogs-rpm/output:/rpms:ro \
${{ matrix.image }} \
bash -c "
set -e
echo '=== Installing RPMs ==='
dnf install -y /rpms/*.rpm
echo 'Installation successful!'
echo ''
echo '=== Verifying binaries are executable ==='
victoria-logs --version
vlagent --version
vlogscli --version
echo ''
echo '=== All verification checks passed! ==='
"
- name: Upload ${{ matrix.dist }} RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpms-${{ matrix.dist }}-v${{ github.event.inputs.version }}
path: victorialogs-rpm/output/*.rpm
retention-days: ${{ github.event.inputs.mode == 'Test' && 1 || 30 }}
- name: Clean up ${{ matrix.dist }} RPM build artifacts
if: always()
working-directory: victorialogs-rpm
run: make clean
# ============================================================
# Job 3: Publish GitHub Release — Release mode only.
# Runs only after ALL matrix legs of build-rpms succeed.
# All assets are collected first; the Release is created
# once with every file already attached — no partial-asset window.
# ============================================================
publish-release:
name: Publish GitHub Release
needs: build-rpms
runs-on: [self-hosted, victoria-logs]
if: github.event.inputs.mode == 'Release'
steps:
- name: Download tarballs and checksums
uses: actions/download-artifact@v4
with:
name: build-artifacts-v${{ github.event.inputs.version }}
path: release-assets
- name: Download EL8 RPMs
uses: actions/download-artifact@v4
with:
name: rpms-el8-v${{ github.event.inputs.version }}
path: release-assets
- name: Download EL9 RPMs
uses: actions/download-artifact@v4
with:
name: rpms-el9-v${{ github.event.inputs.version }}
path: release-assets
- name: Download EL10 RPMs
uses: actions/download-artifact@v4
with:
name: rpms-el10-v${{ github.event.inputs.version }}
path: release-assets
- name: List all release assets
run: |
echo "Release assets to be published:"
ls -lh release-assets/*.tar.gz release-assets/*_checksums.txt release-assets/*.rpm
# Creates the tag + release and uploads all assets atomically.
# Prod binaries (*-prod) in release-assets/ are excluded by the glob patterns.
- name: Create GitHub Release and upload all assets
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.event.inputs.version }}
name: VictoriaLogs v${{ github.event.inputs.version }}
prerelease: ${{ github.event.inputs.prerelease }}
files: |
release-assets/*.tar.gz
release-assets/*_checksums.txt
release-assets/*.rpm
body: |
# VictoriaLogs v${{ github.event.inputs.version }}
whamCloud custom build of VictoriaLogs for Linux AMD64.
## 📦 What's Included
- **victoria-logs** — Main VictoriaLogs server for log management and analytics
- **vlagent** — Log collection agent for shipping logs to VictoriaLogs
- **vlogscli** — Interactive command-line tool for querying VictoriaLogs
## 🚀 Installation Options
### Option 1: RPM Packages (Recommended)
#### Enterprise Linux 8 / RHEL 8 / Rocky Linux 8 / AlmaLinux 8
```bash
# Download and install victorialogs
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victorialogs-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
sudo dnf install -y ./victorialogs-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
# Download and install vlagent (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlagent-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
sudo dnf install -y ./vlagent-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
# Download and install vlogscli (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlogscli-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
sudo dnf install -y ./vlogscli-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
# Start services
sudo systemctl enable --now victorialogs
sudo systemctl status victorialogs
```
#### Enterprise Linux 9 / RHEL 9 / Rocky Linux 9 / AlmaLinux 9
```bash
# Download and install victorialogs
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
sudo dnf install -y ./victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
# Download and install vlagent (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
sudo dnf install -y ./vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
# Download and install vlogscli (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
sudo dnf install -y ./vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
# Start services
sudo systemctl enable --now victorialogs
sudo systemctl status victorialogs
```
#### Enterprise Linux 10 / RHEL 10 / Rocky Linux 10 / AlmaLinux 10
```bash
# Download and install victorialogs
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victorialogs-${{ github.event.inputs.version }}-1.el10.x86_64.rpm
sudo dnf install -y ./victorialogs-${{ github.event.inputs.version }}-1.el10.x86_64.rpm
# Download and install vlagent (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlagent-${{ github.event.inputs.version }}-1.el10.x86_64.rpm
sudo dnf install -y ./vlagent-${{ github.event.inputs.version }}-1.el10.x86_64.rpm
# Download and install vlogscli (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlogscli-${{ github.event.inputs.version }}-1.el10.x86_64.rpm
sudo dnf install -y ./vlogscli-${{ github.event.inputs.version }}-1.el10.x86_64.rpm
# Start services
sudo systemctl enable --now victorialogs
sudo systemctl status victorialogs
```
### Option 2: Tarball Installation (Any Linux Distribution)
#### VictoriaLogs Server
```bash
# Download the tarball
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victoria-logs-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
# Verify checksum (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victoria-logs-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
sha256sum -c victoria-logs-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
# Extract and run
tar -xzf victoria-logs-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
./victoria-logs-prod -storageDataPath=/var/lib/victorialogs
```
#### vlagent (Log Collection Agent)
```bash
# Download the vlutils tarball
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlutils-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
# Verify checksum (optional)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlutils-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
sha256sum -c vlutils-linux-amd64-v${{ github.event.inputs.version }}_checksums.txt
# Extract
tar -xzf vlutils-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
# Run vlagent
./vlagent-prod -remoteWrite.url=http://localhost:9428/insert/jsonline
```
#### vlogscli (Query CLI)
```bash
# Download the vlutils tarball (if not already downloaded)
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlutils-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
# Extract
tar -xzf vlutils-linux-amd64-v${{ github.event.inputs.version }}.tar.gz
# Run vlogscli
./vlogscli-prod -datasource.url=http://localhost:9428
```
## Documentation
- [VictoriaLogs Documentation](https://docs.victoriametrics.com/victorialogs/)
- [vlagent Documentation](https://docs.victoriametrics.com/victorialogs/vlagent/)
- [vlogscli Documentation](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/)
## Checksums
SHA256 checksums are provided for all tarballs to verify integrity.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}