Install Gitlab service

A git installation is crucial to anyone that will be working with ansible automation platform or awx. We can use an online git service, but to keep things simple we install it locally on our proxmox cluster. Gitlab will use some memory, but it is well spent. For a functional gitlab environment, we need a machine (VM) with the following specs:

  • 4096 MB memory (minimum)
  • 2 cores
  • 1024 MB swap
  • 15 GB disk
  • networking
  • DNS record

So before we instantiate the VM, we reserve an IP-address and allocate a name for the machine in DNS. I chose (for this demo) to use git-test.homelab.

To download the iso image for rocky linux, go to the site rockylinux.org.
Add the ISO to your local iso storage to create the virtual machine from.
There is a template with gitlab (turnkey), but it seems to be broken, so we will setup one from scratch.

Create the machine

Start the create VM wizzard, by clicking on the button at the right-top of the screen. Fil in the data in each field on every page and click next:

General:

  • Node: Selact the node to create the container on
  • VM ID: Leave it auto selected or choose a free number
    Click Next

OS:

  • Storage: Select the storage which contains the iso image
  • Use iso image: select the rockylinux iso
  • Guest OS type: linux
  • Guest OS kernel: 6x - 2.6
    Click Next

System:

Leave it all default

Disks:

  • Storage: Select the storage to hold the disk (choose local-lvm for performance)
  • Disk size: 15 GB
    Click Next

You could add more disks here, to separate storage options I didn't for this install.

CPU:

  • Cores: 2
    Click Next

Memory:

  • Memory: set 4096 MB
  • Swap: set 1024 MB
    Click Next

Network:

Leave it all default
Click Next

Comfirm:

Review the choices and click finish to start the deployment.

In the installer:

When the machine boots into the installer, configure the system as a "server with GUI".

After the machine is installed, log on as root user and install the following:
- curl
- openssh-server
- perl
- policycoreutils

Run dnf update -y

Add the gitlab repositories:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

Install gitlab:
sudo EXTERNAL_URL="http://yourdomain.com" dnf install -y gitlab-ee

edit the following file to configure gitlab:
vi /etc/gitlab/gitlab.rb

Run:
sudo gitlab-ctl reconfigure

You can find the initial password for the root account in the file:
/etc/gitlab/initial_root_password

Now login with your browser on the new gitlab (in my case http://git-test.homelab) as 'root' and change the root password, configure other users and start working with gitlab.

As your gitlab is running now, ensure you get a valid certificate, see the "certificate-server" chapter.
If you want to run a gitlab-runner for your pipelines, you'll need a certificate. Refer to the gitlab documentation on how to install the certificate.