How to Install and configure GitLab runner on centos 7
Method To Install and configure GitLab runner on centos 7
Introduction:
GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline. GitLab Runner is open-source and written in Go. It can be run as a single binary; no language-specific requirements are needed. GitLab Runner can also run inside a Docker container or be deployed into a Kubernetes cluster.
Installation Procedure:
Step 1 : Check the installed OS version by using the following command
linuxhelp@linuxhelp:~$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
Step 2: Login to your Gitlab account and go inside any project
Snap1
Step 3: Navigate the project to find the settings and move to the CI/Cd section
Step 4: Follow the instruction given under the specific runners sections
Step 5 : To install GitLab Runner, Add the official GitLab repository
root@linuxhelp: curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6904 100 6904 0 0 11167 0 --:--:-- --:--:-- --:--:-- 11153
Detected operating system as centos/7.
Checking for curl...
Detected curl...
Downloading repository file: https://packages.gitlab.com/install/repositories/runner/gitlab-runner/config_file.repo?os=centos&dist=7&source=script
done.
Installing pygpgme to verify GPG signatures...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirrors.nipa.cloud
* extras: mirrors.piconets.webwerks.in
* updates: centosa7.centos.org
gitlab-ce/x86_64/signature | 862 B 00:00:00
gitlab-ce/x86_64/signature | 1.0 kB 00:00:00 !!!
runner_gitlab-runner-source/signature | 862 B 00:00:00
runner_gitlab-runner-source/signature | 951 B 00:00:00 !!!
Package pygpgme-0.3-9.el7.x86_64 already installed and latest version
Generating yum cache for runner_gitlab-runner...
Generating yum cache for runner_gitlab-runner-source...
The repository is setup! You can now install packages.
Step 6 : Install the latest version of GitLab Runner
root@linuxhelp:~# sudo yum install gitlab-runner
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: mirrors.nipa.cloud
* extras: centos.excellmedia.net
* updates: centosv8.centos.org
Resolving Dependencies
--> Running transaction check
---> Package gitlab-runner.x86_64 0:14.3.2-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository Size
Installing:
gitlab-runner x86_64 14.3.2-1 runner_gitlab-runner 433 M
Total download size: 433 M
Installed size: 472 M
Is this ok [y/d/N]: y
Downloading packages:
gitlab-runner-14.3.2-1.x86_64.rpm | 433 MB 00:00:47
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : gitlab-runner-14.3.2-1.x86_64 1/1
revision=e0218c92 version=14.3.2
INFO: Docker installation not found, skipping clear-docker-cache
Verifying : gitlab-runner-14.3.2-1.x86_64 1/1
Installed:
gitlab-runner.x86_64 0:14.3.2-1
Complete!
Step 7 : Now its time to register the runner To register a runner under Linux: Run the following command:
root@linuxhelp:~# sudo gitlab-runner register
Enter the GitLab instance URL (for example, https://gitlab.com/):
http://192.168.6.115/
Enter the registration token:
azCS4D5nSBbLE9zjJ-R3
Enter a description for the runner:
[linuxhelp]: Ci
Enter tags for the runner (comma-separated):
cui pipeline
Registering runner... succeeded runner=azCS4D5n
Enter an executor: kubernetes, custom, docker, shell, docker+machine, docker-ssh+machine, docker-ssh, parallels, ssh, virtualbox:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!.
With this installation and configuration of Gitlab runner on centos 7 comes to end.
Comments ( 0 )
No comments available