Gitlab CI

Gitlab Ci Runner on Ubuntu 16.04 as Docker service

apt-get update
apt-get install docker
docker run -d --name gitlab-runner --restart always \
    --volumes-from gitlab-runner-config \
    gitlab/gitlab-runner:latest

 

OLD Part of my guide

Gitlab Ci Runner on Ubuntu 14.04

# Download the package
wget https://s3-eu-west-1.amazonaws.com/downloads-packages/ubuntu-14.04/gitlab-runner_5.2.0~omnibus.1-1_amd64.deb

# Install the package
sudo dpkg -i gitlab-runner_5.2.0~omnibus.1-1_amd64.deb

# Create the user that will run your builds
sudo useradd -s /bin/false -m -r gitlab-runner

# Register your runner instance with a GitLab CI Coordinator
sudo /opt/gitlab-runner/bin/setup -C /home/gitlab-runner

# Install the gitlab-runner Upstart script
sudo cp /opt/gitlab-runner/doc/install/upstart/gitlab-runner.conf /etc/init/

# Start the gitlab-runner Upstart script
sudo service gitlab-runner start

Gitlab CI Multi-Runner

If you want to use Docker runner, install it before using the multi runner:

curl -sSL https://get.docker.com/ | sh

Add GitLab's official repository via apt-get or yum:

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

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

Install gitlab-ci-multi-runner:

# For Debian/Ubuntu
apt-get install gitlab-ci-multi-runner

# For CentOS
yum install gitlab-ci-multi-runner

Register the runner:

sudo gitlab-ci-multi-runner register

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci )
https://gitlab.com/ci
Please enter the gitlab-ci token for this runner
xxx
Please enter the gitlab-ci description for this runner
my-runner
INFO[0034] fcf5c619 Registering runner... succeeded
Please enter the executor: shell, docker, docker-ssh, ssh?
docker
Please enter the Docker image (eg. ruby:2.1):
ruby:2.1
INFO[0037] Runner registered successfully. Feel free to start it, but if it's
running already the config should be automatically reloaded!

Read More

https://gitlab.com/gitlab-org/omnibus-gitlab-runner/blob/master/doc/install/README.md#ubuntu-1404-64-bit

https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md