Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 1.86 KB

01_20-installing-gitlab-ci.md

File metadata and controls

76 lines (50 loc) · 1.86 KB

Setting up your CI/CD infrastructure

Installing Runner Server

GitLab has a separate repository for Runner Server.

Add the repo definition and install the Runner Server package:

curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash

sudo apt-get install -y gitlab-ci-multi-runner

Setting up your CI/CD infrastructure

Confirm Runner Server is up

Check service status:

sudo service gitlab-runner status

runner service is active

Setting up your CI/CD infrastructure

Configure docker group

Allow non-root user "gitlab-runner" to use Docker:

sudo usermod -aG docker gitlab-runner

Setting up your CI/CD infrastructure

Locate the config file for Runner Server

Runner Server's config file is /etc/gitlab-runner/config.toml.

TOML is Tom's Obvious, Minimal Language, easier (for humans) than YAML:

sudo cat /etc/gitlab-runner/config.toml

Example:

concurrent = 1
check_interval = 0
Setting Description
concurrent Limits how many jobs globally can be run concurrently. The most upper limit of jobs using all defined runners. 0 does not mean unlimited
check_interval defines in seconds how often to check GitLab for a new builds

We won't look at the other possible settings.

Setting up your CI/CD infrastructure

Increase concurrency

Edit /etc/gitlab-runner/config.toml to increase concurrency to 3.

sudo vim /etc/gitlab-runner/config.toml

Runner Server will pick up the change automatically.

Now we can run jobs in parallel (provided there are no dependencies).