Devan Carpenter
6b1df92895
use ansible's preferred arch naming scheme
...
ansible looks for "x86_64" instead of "amd64"
2 years ago
Devan Carpenter
38541ca3ee
split tasks for installing Gitlab repos by arch
...
previous if/else was invalid, so no arch was set, causing playbook to
fail.
2 years ago
Devan Carpenter
c055dc2ea6
docker: set volumes
...
set "/cache" as a volume by default, and allow for override via ansible
fact
2 years ago
Devan Carpenter
1b71a2e18d
docker: allow for setting default image
2 years ago
Devan Carpenter
3c0dde0048
docker: allow for privileged docker engine
...
For docker-in-docker, privileged mode must be enabled.[0]
This commit allows for privileged mode to be enabled for the docker
executor, via an ansible.fact.
[0] https://docs.gitlab.com/runner/executors/docker.html#the-privileged-mode
2 years ago
Devan Carpenter
e67598c4cf
gitlab: use single quotes
2 years ago
Devan Carpenter
32a64326e6
gitlab: fix string quoting typo
2 years ago
Devan Carpenter
4046de9f56
gitlab: add support for multiple architectures
...
amd64 was hardcoded into the gitlab repo string. now it will try to use
the host's reported architecture.
2 years ago
Devan Carpenter
900945dec1
docker: use ansible conditional for arch selection
...
in-line substitution is more tricky. this is a simple way to explicitly
declare the Docker apt repo string by architecture.
2 years ago
Devan Carpenter
e2bb64c3b9
docker: use arm64 instead of aarch64
...
If architecture is "aarch64" we should use the string "arm64" with the
Docker repo.
2 years ago
Devan Carpenter
f232d791c5
docker: add support for multiple architectures
...
amd64 was hardcoded into the docker repo string. now it will try to use
the host's reported architecture.
2 years ago
Devan Carpenter
ee16467665
docker: increase concurrent jobs to 10
...
Allow running more conncurent jobs with the Docker executor.
3 years ago
Devan Carpenter
14bcd20a41
split KVM and docker configs
...
Config cannot have conflicting executor configurations. One _must_
specify the selected executor in a sub-section. eg. "[runners.docker]",
otherwise you end up with mysterious errors like:
WARNING: Job failed: panic: runtime error: invalid memory address or
nil pointer dereference
3 years ago
Devan Carpenter
44ce3fe7db
add gitlab-runner user to the docker group
...
The user named "gitlab-runner" has to be in the "docker" group if it
hopes to use the docker executor.
3 years ago
Devan Carpenter
b9a3214c2e
allow for dynamic runner description
...
Previously the Runner description was hard coded. Now it is possible to
set it dynamically via an ansible fact.
3 years ago
Devan Carpenter
1c6de43858
specify the runner's tags explicitly
...
We need a distinction between the executor name and the tags. This is
important to work with pre-existing CI configurations, without needing
to modify them. It also makes sense to seperate this in general as a tag
may not relate directly to the executor.
For example:
executor= docker
tag= linux
3 years ago
Devan Carpenter
a84f9aa856
let's not forget our json commas
...
missing comma made invalid json, which made most of the important tasks
get skipped.
3 years ago
Devan Carpenter
a917db54c4
initialize: add gitlab-runner role
...
This playbook sets up a Gitlab Runner with the choice between a Docker
executor and a custom KVM executor.
roles/gitlab-runner/templates/gitlab-runners-network.xml
3 years ago