Recently evaluating Gitlab-CI...is my setup ideal?

As the title says, recently evaluating gitlab-ci (liking it so far) but wondering if the below is good enough:

little background:
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

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?

gitlab-ci-multi-runner is kinda deprecated and in recent versions it symlinks to gitlab-runner, so no, these are the same.

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”?

No need to install the Runner again.You can use the same one to register multiple setups. So in your case, you can use the same command (docker exec -it gitlab-runner gitlab-runner register) and just change the executor and registration token for your different projects.

Question #3: is my above set up sound? runners as docker container, executing builds inside docker containers

Yeah, nothing wrong with that. If you want to not depend on Docker all the time, you can just install the Runner using the deb or rpm packages and then register new instances of Runners using the Docker executor. Whatever suits your needs.

Question #4: Currently, my ran containers doesnt seem to delete themselves…any way to solve this issue?

Hmm, they should be stopped once the build finishes.

Hi Axil,

Thanks a bunch for your input.

as for the last statement: it is stopped (As noted by the red balls), but not deleted…is this how it is? i was under the impression it would be deleted as well