From 71183792b435109e73f70925eb94c91c04145f3d Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 6 Jun 2018 14:21:05 +1200 Subject: [PATCH] Add gitlab-runner --- manuscript/recipies/gitlab-runner.md | 33 ++++++++++++++++++++++++++++ manuscript/reference/networks.md | 1 + 2 files changed, 34 insertions(+) diff --git a/manuscript/recipies/gitlab-runner.md b/manuscript/recipies/gitlab-runner.md index d733ead..4913c12 100644 --- a/manuscript/recipies/gitlab-runner.md +++ b/manuscript/recipies/gitlab-runner.md @@ -22,6 +22,39 @@ cd gitlab mkdir -p {runners/1,runners/2} ``` +### Setup Docker Swarm + +Create a docker swarm config file in docker-compose syntax (v3), something like this: + +!!! tip + I share (_with my [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that patrons can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` 👍 + +``` +version: '3' + +services: + 1: + image: gitlab/gitlab-runner + volumes: + - /var/data/gitlab-runner/1:/var/data/gitlab/runners/1 + networks: + - internal + + 2: + image: gitlab/gitlab-runner + volumes: + - /var/data/gitlab-runner/:/var/data/gitlab/runners/2 + networks: + - internal + +networks: + internal: + driver: overlay + ipam: + config: + - subnet: 172.16.23.0/24 +``` + ### Configure runners diff --git a/manuscript/reference/networks.md b/manuscript/reference/networks.md index 6e0068d..ab8d635 100644 --- a/manuscript/reference/networks.md +++ b/manuscript/reference/networks.md @@ -28,6 +28,7 @@ Network | Range [InstaPy](https://geek-cookbook.funkypenguin.co.nz/recipies/instapy/) | 172.16.20.0/24 [Turtle Pool](https://geek-cookbook.funkypenguin.co.nz/recipies/turtle-pool/) | 172.16.21.0/24 [MiniFlux](https://geek-cookbook.funkypenguin.co.nz/recipies/miniflux/) | 172.16.22.0/24 +[Gitlab Runner](https://geek-cookbook.funkypenguin.co.nz/recipies/gitlab-runner/) | 172.16.23.0/24 ## Chef's Notes