Skip to content
Snippets Groups Projects
linux.rst 7.75 KiB

Deploying a Linux-based CI

This document contains instructions to build and deploy a new bare-OS CI for Linux. Instructions for deployment assume a freshly installed machine, with Idiap's latest Debian distribution running. Our builds use Docker images. We also configure docker-in-docker to enable to run docker builds (and other tests) within docker images.

Warning

Idiap has throttling rules that are typically applied to all machines in the lab network. To avoid issues for newly installed CI nodes, ensure you request throttling to be disabled for new CI machines.

Docker and Gitlab-runner setup

Base docker installation: https://secure.idiap.ch/intranet/system/software/docker

Ensure to add/configure for auto-loading the overlay kernel module in /etc/modules. Then update/create /etc/docker/daemon.json to contain the entry "storage-driver": "overlay2".

To ensure that you can control memory and CPU usage for launched docker containers, you'll need to enable "cgroups" on your machine. In essence, change /etc/default/grub to contain the line GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1". Then, re-run update-grub after such change.

To install docker at Idiap, you also need to follow the security guidelines.

If you do not follow these guidelines, the machine will not be accessible from outside via the login gateway, as the default docker installation conflicts with Idiap's internal setup. You may also find other network connectivity issues.