0% found this document useful (0 votes)
124 views

Install GitLab Runners

GitLab Runner is an open source project that runs jobs and sends results back to GitLab. It can run jobs locally, using Docker containers, or connecting to remote SSH servers. It is written in Go and works on Linux, macOS, and Windows. To install GitLab Runner, you can use Docker, download the binary, or install from package repositories. You then register the runner with your GitLab project and start the runner service.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views

Install GitLab Runners

GitLab Runner is an open source project that runs jobs and sends results back to GitLab. It can run jobs locally, using Docker containers, or connecting to remote SSH servers. It is written in Go and works on Linux, macOS, and Windows. To install GitLab Runner, you can use Docker, download the binary, or install from package repositories. You then register the runner with your GitLab project and start the runner service.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

GitLab Runners

Marc Arren Q. Salita


GitLab Runner
GitLab Runner is the open source project that is used to run your jobs and send the results
back to GitLab. It is used in conjunction with GitLab CI/CD, the open-source continuous
integration service included with GitLab that coordinates the jobs.

Requirements
GitLab Runner is written in Go and can be run as a single binary. No language specific
requirements are needed.
It is designed to run on the GNU/Linux, macOS, and Windows operating systems. Other
operating systems will probably work as long as you can compile a Go binary on them.
If you want to use Docker, install the latest version. GitLab Runner requires a minimum of
Docker v1.13.0.

Features

● Allows:
○ Running multiple jobs concurrently.
○ Using multiple tokens with multiple servers (even per-project).
○ Limiting number of concurrent jobs per-token.
● Jobs can be run:
○ Locally.
○ Using Docker containers.
○ Using Docker containers and executing job over SSH.
○ Using Docker containers with autoscaling on different clouds and
virtualization hypervisors.
○ Connecting to a remote SSH server.
● Is written in Go and distributed as single binary without any other requirements.
● Supports Bash and Windows PowerShell.
● Works on GNU/Linux, macOS, and Windows (pretty much anywhere you can run
Docker).
● Allows customization of the job running environment.
● Automatic configuration reload without restart.
● Easy to use setup with support for Docker, Docker-SSH, Parallels, or SSH running
environments.
● Enables caching of Docker containers.
● Easy installation as a service for GNU/Linux, macOS, and Windows.
● Embedded Prometheus metrics HTTP server.
● Referee workers to monitor and pass Prometheus metrics and other job-specific
data to GitLab

Install GitLab Runner


GitLab Runner can be installed and used on GNU/Linux, macOS, FreeBSD, and Windows.
You can install it using Docker, download the binary manually or use the repository for
rpm/deb packages that GitLab offers. Below you can find information on the different
installation methods:

● Install using GitLab’s repository for Debian/Ubuntu/CentOS/RedHat (preferred).


● Install on GNU/Linux manually (advanced).
● Install on macOS.
● Install on Windows.
● Install as a Docker service.
● Install in autoscaling mode using Docker machine.
● Install on FreeBSD.
● Install on Kubernetes.
● Install the nightly binary manually (development).

Installation of GitLab Runners.

1. Go to link listed of what OS you are using ex. Install on Windows.


2. Download Loaders available and compatible to your OS.
a. X86 - https://gitlab-runner-
downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-
386.exe

i.
b. Amd64 - https://gitlab-runner-
downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-
amd64.exe

i.
3. Create a folder somewhere in your system, ex.: C:\GitLab-Runner.
4. Copy downloaded installer to the folder created and rename it to gitlab-runner.exe

a.
5. Run an elevated command prompt: or run cmd as administrator and go to the
folder .
a. cd C:\GitLab-Runner
6. Proceed to install gitlab-runner.exe
a. gitlab-runner.exe install
7. After installation, start the getlab-runner.exe
a. gitlab-runner.exe start
b.

c. Note: error occurs because of Window7 log directory error, but it is running.
8. To check the version of the gitlab-runners use this command.
a. gitlab-runner.exe --version
b.

9. To register the gitlab-runner, first, stop the process using command


a. gitlab-runner.exe stop
b. Note: it will take some time to finish.
10. Enter command gitlab-runner.exe register
a. It will as you for “Please enter the gitlab-ci coordinator URL”, enter the
b. https://gitlab.com/
c. Enter the Token. (the token is located to your getlab account.)
d. Go to https://gitlab.com/users/sign_in and enter your gitlab account
i.
e. Go to the project you want to register your runners into.

f.

g. Ex. I selected Sample Project

i.
h. Note: you need to be the owner or fork from the project to be able to
go to the settings of the project.
i. Go to Setting->CI/CD tab.
i.
ii. Go to Runners and click Expand
1.

iii. Go to the “Set up a specific Runner manually” and copy the


token.

1.
iv. Paste the token to the cmd registration of gitlab-runner
v.

vi. Enter the name of your runner. Ex. “Sample Runner”


vii. Enter ssh,ci for configuration of pipeline.
1.

viii. Enter shell for initial executor:


1.

ix. Then it is successfully registered to the project.

1.
j. Start the gitlab-runner.exe. Using
i. gitlab-runner.exe start
ii.

k. Done!.

Source: https://www.youtube.com/watch?v=2MBhxk2chhM&list=PLhW3qG5bs-L8YSnCiyQ-
jD8XfHC2W1NL_&index=6

You might also like