8888 sudo systemctl status victorialogs
8989 ```
9090
91+ #### Enterprise Linux 9 / RHEL 9 / Rocky Linux 9 / AlmaLinux 9
92+
93+ ```bash
94+ # Download and install victorialogs
95+ wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
96+ sudo dnf install -y ./victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
97+
98+ # Download and install vlagent (optional)
99+ wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
100+ sudo dnf install -y ./vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
101+
102+ # Download and install vlogscli (optional)
103+ wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
104+ sudo dnf install -y ./vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
105+
106+ # Start services
107+ sudo systemctl enable --now victorialogs
108+ sudo systemctl status victorialogs
109+ ```
110+
91111 ### Option 2: Tarball Installation (Any Linux Distribution)
92112
93113 #### VictoriaLogs Server
@@ -191,39 +211,82 @@ jobs:
191211 # RPM Building Section
192212 # ========================================
193213
214+ - name : Clean up build artifacts
215+ if : always()
216+ working-directory : VictoriaLogs
217+ run : |
218+ make -f Makefile.whamcloud whamcloud-clean VERSION=${{ github.event.inputs.version }}
219+
220+ # ========================================
221+ # RPM Building Jobs (EL8 and EL9)
222+ # ========================================
223+
224+ build-el8-rpms :
225+ name : Build Rocky Linux 8 RPMs
226+ needs : build-and-release
227+ runs-on : [self-hosted, victoria-logs]
228+ steps :
229+ - name : Checkout VictoriaLogs repository
230+ uses : actions/checkout@v5
231+ with :
232+ fetch-depth : 0
233+ path : VictoriaLogs
234+
235+ - name : Build VictoriaLogs binaries
236+ working-directory : VictoriaLogs
237+ run : |
238+ make -f Makefile.whamcloud whamcloud-release VERSION=${{ github.event.inputs.version }}
239+ env :
240+ WHAMCLOUD_VERSION : ${{ github.event.inputs.version }}
241+
194242 - name : Checkout victorialogs-rpm repository
195243 uses : actions/checkout@v5
196244 with :
197245 repository : whamCloud/victorialogs-rpm
198246 path : victorialogs-rpm
199247
200- - name : Install RPM build tools
201- run : |
202- if ! command -v rpmbuild &> /dev/null; then
203- echo "Installing RPM build tools..."
204- sudo dnf install -y rpm-build rpmdevtools
205- else
206- echo "RPM build tools already installed"
207- fi
208-
209- - name : Build EL8 RPMs
210- working-directory : victorialogs-rpm
248+ - name : Build EL8 RPMs in Rocky Linux 8 container
211249 run : |
212250 echo "Building EL8 RPMs for version ${{ github.event.inputs.version }}..."
213- make rpm VERSION=${{ github.event.inputs.version }}
214-
215- - name : List built RPMs
251+ docker run --rm \
252+ -v $(pwd)/victorialogs-rpm:/build \
253+ -v $(pwd)/VictoriaLogs/bin:/binaries:ro \
254+ -w /build \
255+ rockylinux:8 \
256+ bash -c "
257+ set -e
258+ echo 'Installing RPM build tools...'
259+ dnf install -y make rpm-build rpmdevtools systemd-rpm-macros
260+ echo 'Building EL8 RPMs...'
261+ make rpm VERSION=${{ github.event.inputs.version }}
262+ "
263+
264+ - name : List and verify built EL8 RPMs
216265 working-directory : victorialogs-rpm
217266 run : |
218- echo "Built RPMs:"
267+ echo "Built EL8 RPMs:"
219268 ls -lh output/*.rpm
269+ echo ""
270+ echo "Verifying RPM metadata:"
271+ for rpm in output/*.rpm; do
272+ echo "=== $rpm ==="
273+ rpm -qip "$rpm" | grep -E "Name|Version|Release|Architecture|Build Host"
274+ done
275+
276+ - name : Get release upload URL
277+ id : get_release
278+ run : |
279+ UPLOAD_URL=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
280+ "https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ github.event.inputs.version }}" \
281+ | jq -r '.upload_url')
282+ echo "upload_url=$UPLOAD_URL" >> $GITHUB_OUTPUT
220283
221284 - name : Upload victorialogs EL8 RPM
222285 uses : actions/upload-release-asset@v1
223286 env :
224287 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
225288 with :
226- upload_url : ${{ steps.create_release .outputs.upload_url }}
289+ upload_url : ${{ steps.get_release .outputs.upload_url }}
227290 asset_path : ./victorialogs-rpm/output/victorialogs-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
228291 asset_name : victorialogs-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
229292 asset_content_type : application/x-rpm
@@ -233,7 +296,7 @@ jobs:
233296 env :
234297 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
235298 with :
236- upload_url : ${{ steps.create_release .outputs.upload_url }}
299+ upload_url : ${{ steps.get_release .outputs.upload_url }}
237300 asset_path : ./victorialogs-rpm/output/vlagent-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
238301 asset_name : vlagent-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
239302 asset_content_type : application/x-rpm
@@ -243,24 +306,108 @@ jobs:
243306 env :
244307 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
245308 with :
246- upload_url : ${{ steps.create_release .outputs.upload_url }}
309+ upload_url : ${{ steps.get_release .outputs.upload_url }}
247310 asset_path : ./victorialogs-rpm/output/vlogscli-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
248311 asset_name : vlogscli-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
249312 asset_content_type : application/x-rpm
250313
251- # ========================================
252- # Cleanup Section
253- # ========================================
254-
255- - name : Clean up build artifacts
314+ - name : Clean up EL8 RPM build artifacts
256315 if : always()
316+ working-directory : victorialogs-rpm
317+ run : make clean
318+
319+ build-el9-rpms :
320+ name : Build Rocky Linux 9 RPMs
321+ needs : build-and-release
322+ runs-on : [self-hosted, victoria-logs]
323+ steps :
324+ - name : Checkout VictoriaLogs repository
325+ uses : actions/checkout@v5
326+ with :
327+ fetch-depth : 0
328+ path : VictoriaLogs
329+
330+ - name : Build VictoriaLogs binaries
257331 working-directory : VictoriaLogs
258332 run : |
259- make -f Makefile.whamcloud whamcloud-clean VERSION=${{ github.event.inputs.version }}
333+ make -f Makefile.whamcloud whamcloud-release VERSION=${{ github.event.inputs.version }}
334+ env :
335+ WHAMCLOUD_VERSION : ${{ github.event.inputs.version }}
260336
261- - name : Clean up RPM build artifacts
262- if : always()
337+ - name : Checkout victorialogs-rpm repository
338+ uses : actions/checkout@v5
339+ with :
340+ repository : whamCloud/victorialogs-rpm
341+ path : victorialogs-rpm
342+
343+ - name : Build EL9 RPMs in Rocky Linux 9 container
344+ run : |
345+ echo "Building EL9 RPMs for version ${{ github.event.inputs.version }}..."
346+ docker run --rm \
347+ -v $(pwd)/victorialogs-rpm:/build \
348+ -v $(pwd)/VictoriaLogs/bin:/binaries:ro \
349+ -w /build \
350+ rockylinux:9 \
351+ bash -c "
352+ set -e
353+ echo 'Installing RPM build tools...'
354+ dnf install -y make rpm-build rpmdevtools systemd-rpm-macros
355+ echo 'Building EL9 RPMs...'
356+ make rpm VERSION=${{ github.event.inputs.version }}
357+ "
358+
359+ - name : List and verify built EL9 RPMs
263360 working-directory : victorialogs-rpm
264361 run : |
265- make clean
362+ echo "Built EL9 RPMs:"
363+ ls -lh output/*.rpm
364+ echo ""
365+ echo "Verifying RPM metadata:"
366+ for rpm in output/*.rpm; do
367+ echo "=== $rpm ==="
368+ rpm -qip "$rpm" | grep -E "Name|Version|Release|Architecture|Build Host"
369+ done
370+
371+ - name : Get release upload URL
372+ id : get_release
373+ run : |
374+ UPLOAD_URL=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
375+ "https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ github.event.inputs.version }}" \
376+ | jq -r '.upload_url')
377+ echo "upload_url=$UPLOAD_URL" >> $GITHUB_OUTPUT
378+
379+ - name : Upload victorialogs EL9 RPM
380+ uses : actions/upload-release-asset@v1
381+ env :
382+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
383+ with :
384+ upload_url : ${{ steps.get_release.outputs.upload_url }}
385+ asset_path : ./victorialogs-rpm/output/victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
386+ asset_name : victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
387+ asset_content_type : application/x-rpm
388+
389+ - name : Upload vlagent EL9 RPM
390+ uses : actions/upload-release-asset@v1
391+ env :
392+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
393+ with :
394+ upload_url : ${{ steps.get_release.outputs.upload_url }}
395+ asset_path : ./victorialogs-rpm/output/vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
396+ asset_name : vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
397+ asset_content_type : application/x-rpm
398+
399+ - name : Upload vlogscli EL9 RPM
400+ uses : actions/upload-release-asset@v1
401+ env :
402+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
403+ with :
404+ upload_url : ${{ steps.get_release.outputs.upload_url }}
405+ asset_path : ./victorialogs-rpm/output/vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
406+ asset_name : vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
407+ asset_content_type : application/x-rpm
408+
409+ - name : Clean up EL9 RPM build artifacts
410+ if : always()
411+ working-directory : victorialogs-rpm
412+ run : make clean
266413
0 commit comments