As the title says, recently evaluating gitlab-ci (liking it so far) but wondering if the below is good enough:
most of the projects in my gitlab repos are node projects (UI, small services etc). Really nothing too heavy weight or anything.
What i Want to do:
- Multiple Gitlab-runners
- executes builds inside docker containers
- perhaps gitlab runner itself a docker service? (so i can have multiple runners in 1 box?)
- some builds might build docker images…so might need DinD?
Current set up:
(Amazon EC2 t2.medium)
Gitlab-ci docker installation Following this and doing the following since i want to use docker executor + build docker files
docker run -d --name gitlab-runner --restart always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ gitlab/gitlab-runner:latest
then i register it (with priv, so i can build docker images):
docker exec -it gitlab-runner gitlab-runner register -n \ --url https://gitlab.com/ci \ --registration-token REGISTRATION_TOKEN \ --executor docker \ --description "My Docker Runner" \ --docker-image "docker:latest" \ --docker-privileged`
now first question is, following the guide to enable a runner to build docker found here, one difference i see with that is that its using a shell install of gitlab-ci, and the command is
gitlab-multi-runner, while the docker one is
gitlab-runner. are these things different?
Question #2: since i want to run runners as docker containers, if i want to add another runner to the same ec2 instance…should/would i just add another container + register? if so is that “ok”?
Question #3: is my above set up sound? runners as docker container, executing builds inside docker containers
Question #4: Currently, my ran containers doesnt seem to delete themselves…any way to solve this issue?
Thanks all for the help