Created
February 24, 2017 20:08
-
-
Save kelchm/59207261cba0d4f9b3796549cfa571cc to your computer and use it in GitHub Desktop.
Self-Registration of GitLab Runners within Rancher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
gitlab-runner-config: | |
image: gitlab/gitlab-runner:alpine | |
stdin_open: true | |
volumes: | |
- /etc/gitlab-runner/ | |
tty: true | |
command: | |
- register | |
- -n | |
- --url | |
- <GITLAB URL> | |
- --registration-token | |
- <REGISTRATION TOKEN> | |
- --executor | |
- docker | |
- --description | |
- Rancher Docker Runner | |
- --docker-image | |
- docker:latest | |
- --docker-volumes | |
- /var/run/docker.sock:/var/run/docker.sock | |
labels: | |
io.rancher.container.pull_image: always | |
io.rancher.container.start_once: 'true' | |
gitlab-runner: | |
image: gitlab/gitlab-runner:alpine | |
stdin_open: true | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
tty: true | |
volumes_from: | |
- gitlab-runner-config | |
command: | |
- run | |
labels: | |
io.rancher.sidekicks: gitlab-runner-config | |
io.rancher.container.pull_image: always | |
io.rancher.scheduler.global: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
gitlab-runner-config: | |
scale: 1 | |
start_on_create: true | |
gitlab-runner: | |
start_on_create: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment