Added install software on VM guest feature

This commit is contained in:
2025-08-12 20:02:42 +02:00
parent 5cce3a0337
commit 41574c143a
22 changed files with 493 additions and 70 deletions

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
#Source: https://docs.gitlab.com/install/package/almalinux/?tab=Community+Edition
# Exit on error, undefined vars, and pipe failures
set -euo pipefail
NET_DEVICE='enp1s0'
GITLAB_URL=$(ip -o -4 addr list ${NET_DEVICE} | awk '{print $4}' | cut -d/ -f1)
#Enable sshd. enabled on cloud-image by default
#systemctl enable --now sshd
#Set firewall rules
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-service=ssh
systemctl reload firewalld
#Add repo
curl "https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh" | bash
#Install Gitlab CE
EXTERNAL_URL="${GITLAB_URL}" dnf install gitlab-ce