Kelly Beard
Kelly Beard

Reputation: 702

One Gitlab CI runner per project?

We upgraded from Gitlab 7.11.4 to 9 in one fell swoop (by accident). Now we are trying to get CI set up the way it use to run for us before. I understand that CI is an integrated thing now.

One of my coworkers got a multi-runner thing going. The running command looks like so:

/usr/bin/gitlab-ci-multi-runner run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user gitlab-runner

But previously we had 1 runner for each project and we had a user associated for each project. So, if we have 2 projects called "portal" and "engine", we would have users created thusly:

gitlab-runner-fps-portal
gitlab-runner-fps-engine

And being users, they would have home folders like:

/home/gitlab-runner-fps-portal
/home/gitlab-runner-fps-engine

In the older version of CI, you'd have a config.yml with the url of CI and the runners token. Now you have config.toml.

I want to "divorce" the engine runner from this multi setup which runs under user "gitlab-runner" and have its own runner that runs under "gitlab-runner-fps-engine".

Easy to do? Right now since all of this docker business is new to us, we're continuing on to use "shell" as our executor in gitlab, if that information is useful.

Upvotes: 1

Views: 1302

Answers (1)

Jakub Kania
Jakub Kania

Reputation: 16487

There are at least two ways you can do it:

  1. Register a specific runner in each of the projects and disable the shared runners.
  2. Use tags to specify the job must be run on a specific runner. This way you can have some CI jobs run on your defined environment while others (like lint for example) can be run on tagged shared runners.

Upvotes: 1

Related Questions