Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

GitLab Notes

GitLab Notes

Install GitLab Runner (Binary)

Reference

# Download binary
sudo curl -L --output /usr/local/bin/gitlab-runner "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64"

# Give it permissions to execute:
sudo chmod +x /usr/local/bin/gitlab-runner

# Create a GitLab CI user:
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

# Install and run as service:
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start

Run GitLab Runner in Docker

docker run -d --name gitlab-runner --restart always \
     -v /srv/gitlab-runner/config:/etc/gitlab-runner \
     -v /var/run/docker.sock:/var/run/docker.sock \
     gitlab/gitlab-runner:latest

sudo docker run -d --name gitlab-runner --restart always \
     -v /home/devops/gitlab-runner/config:/etc/gitlab-runner \
     -v /var/run/docker.sock:/var/run/docker.sock \
     gitlab/gitlab-runner:latest

How to Install GitLab CE in a disconnected environment

$ wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-14.5.2-ce.0.el8.x86_64.rpm/download.rpm
$ sudo dnf install -y \
    curl \
    policycoreutils \
    openssh-server \
    perl \
    postfix \
    openssl \
    tzdata \
    yum-utils
# Enable OpenSSH server daemon if not enabled: sudo systemctl status sshd
sudo systemctl enable sshd
sudo systemctl start sshd

# Check if opening the firewall is needed with: sudo systemctl status firewalld
$ sudo firewall-cmd --permanent --add-service=http && \
    sudo firewall-cmd --permanent --add-service=https && \
    sudo systemctl reload firewalld

Postfix

$ sudo dnf install postfix && \
    sudo systemctl enable postfix && \
    sudo systemctl start postfix

Install Git

  • make sure RHEL repos are enabled (local or satellite)
$ sudo EXTERNAL_URL="http://gitlab.lab.local" \
    GITLAB_ROOT_PASSWORD="gitlabadmin" \
    dnf localinstall -y gitlab-ce-14.5.2-ce.0.el8.x86_64.rpm

Note:

  1. If any error with gpgchec, then disable gpgcheck by adding --nogpgcheck at the end of dnf or yum command.
  2. If you missed to mention the root password while installing, then get the default randomg password generated by installaer. (This password will be removed by gitlab-ctl reconfigure later.)
$ sudo cat /etc/gitlab/initial_root_password

References

Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

Cloud

Ansible AWX Installation

Ref: Ansible AWX Project Introduction to Ansible AWX Project AWX Command Line Interface 3. Install AWX Using Ansible 3.1. Configure AWX Node for …

AWS CLI Cheatsheet

AWS CLI Cheatsheet

The AWS Command Line Interface (CLI) is a powerful tool that provides a streamlined way to interact with Amazon Web Services (AWS) directly from your …

Ansible - Frequently Asked Questions

Ansible - Frequently Asked Questions

Ansible - Frequently Asked Questions What is Ansible? What is IaC (Infrastructure as Code)? What can Ansible do? What are the advantages of Ansible? …

Ansible Cheatsheet

Ansible Cheatsheet

Ansible Cheat Sheet Ansible is an open-source IT automation engine which can help you to automate most of your repetitive tasks in your work life. …

CheatSheets for DevOps Tools

CheatSheets for DevOps Tools

Ansible Cheatsheet kubectl & oc Cheatsheet Docker & Podman Cheatsheet AWS CLI Cheatsheet Vim Editor Cheatsheet Logical Volume Manager (LVM) …

Ansible Automation Platform - Docs & References

Ansible Automation Platform - Docs & References

Ansible Automation Platform Enable RHEL and AAP Subscriptions Red Hat Container Registry Authentication AAP Download Options Extract the AAP …