CONFIGURING GIT-LAB RUNNER

Kuldip Mori
3 min readAug 10, 2022

--

Learn how to configure GitLab Runner in linux server.

Required Details :

- server architectures type [ x86, AMD64, ARM64, ARM, s390x, ppc64le ].
- super user access [ sudo password ].

ssh server where you want to set gitlab execution runner

Step 1)
#download binary for your system

Warning : Select binary as per instance architecture type. in this case instance type is AMD-64

Other architecture binary — https://docs.gitlab.com/runner/install/linux-manually.html

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

Step 2)
#chmod permission

sudo chmod +x /usr/local/bin/gitlab-runner

Step 3)
#add git CI user

sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

Step 4)
#install run service

sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner

Step 5)
#start gitlab runner

sudo gitlab-runner start

Step 6)
#register git instance

sudo gitlab-runner register

Enter the GitLab instance URL (for example, https://gitlab.com/): ->> https://gitlab.xyz.com/

- Enter the registration token: ->> [ get token in Settings -> CI CD -> Runners -> this registration token: ] ( group-wise & repository wise possible )
- Enter a description for the runner: ->> write ( description )
- Enter tags for the runner (comma-separated) : phase-project name ( phase value are = development or live or stage )
- Enter optional maintenance note for the runner: ( press Enter & ignore )
- Enter the default Docker image : ( as per requirement )

Step 7)
after successfully performing all steps you can see CI CD runners.

Step 8)
- You need to check tags are same as Runners in gitlab-ci.yml file

--

--