How to Install GitLab CI on Manjaro

GitLab CI is a powerful continuous integration and deployment tool for software development teams. In this tutorial, we will learn how to install GitLab CI on the Manjaro operating system.

Prerequisites

Before we begin, make sure that you have the following prerequisites:

Step 1: Install GitLab CE

GitLab CI is a part of GitLab CE (Community Edition). Therefore, we need to install GitLab CE first. Follow these steps to install GitLab CE on Manjaro.

  1. Open the terminal by pressing Ctrl + Alt + T.

  2. Update the package manager of your system:

    sudo pacman -Syu
    
  3. Install the dependencies required for GitLab CE:

    sudo pacman -S curl openssh-server openssh-clients postfix
    
  4. Add the GitLab package repository to Manjaro:

    curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
    
  5. Install GitLab CE:

    sudo pacman -S gitlab-ce
    
  6. Once the installation is complete, you can start the GitLab service by running the following command:

    sudo systemctl start gitlab-runsvdir.service
    
  7. Verify that the GitLab service is running:

    sudo gitlab-ctl status
    

    You should see output similar to the following:

    run: gitlab-workhorse: (pid XXXX) XXXXs; XXXkb
    run: logrotate: (pid XXXX) XXXXs; XXXkb
    run: nginx: (pid XXXX) XXXXs; XXXkb
    run: postgresql: (pid XXXX) XXXXs; XXXkb
    run: redis: (pid XXXX) XXXXs; XXXkb
    run: sidekiq: (pid XXXX) XXXXs; XXXkb
    run: unicorn: (pid XXXX) XXXXs; XXXkb
    

Step 2: Install and Configure GitLab CI Runner

GitLab CI Runner is the component that runs the tests and deploys the code. Follow these steps to install and configure GitLab CI Runner on Manjaro.

  1. Install the GitLab CI Runner package:

    sudo pacman -S gitlab-ci-multi-runner
    
  2. Register the GitLab CI Runner with GitLab:

    sudo gitlab-ci-multi-runner register
    

    Follow the prompts to provide the URL and registration token for your GitLab instance.

  3. Start the GitLab CI Runner service:

    sudo systemctl start gitlab-ci-multi-runner
    
  4. Verify that the GitLab CI Runner service is running:

    sudo gitlab-ci-multi-runner status
    

    You should see output similar to the following:

    Service:gitlab-runner
    * gitlab-runner.service - GitLab Runner
     Loaded: loaded (/usr/lib/systemd/system/gitlab-runner.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2021-07-13 10:10:23 IST; 2min 39s ago
    

Conclusion

Congratulations! You have successfully installed GitLab CI on your Manjaro system. You can now use GitLab CI to automate your software development process and improve your team's productivity.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!