-
Notifications
You must be signed in to change notification settings - Fork 119
Support for multiple runners #97
base: master
Are you sure you want to change the base?
Conversation
@n-e-g Does that mean that people have to change their buildscripts? |
No, that is not the point. All except directory structure works as previously, thus until some build script rely on the directory structure where true build is performed, no changes in build scripts are needed. Btw, writing this comment reminds me that I have not introduced change to init scropt, which I will do in a minute. |
👍 Can confirm this |
Ran across this exact issue the other day. Would be good to see this added in soon and released. Combined with #98, we'd be able to configure the number of runners per machine without having to overwrite the default init.d script. @n-e-g with your changes, how do the different runners show up in the runners web view? When I previously changed |
@robodude666 the runners share the same token so, from gitlab-ci they are seen as a single runner. I also made some experiments with single token per-runner, but this change introduces many incompatibilities with existing scripts. (e.g. from bin dir.). Setup is more complex as well. If there are any ideas how to deal with this, please make some suggestions. |
I was thinking about multiple workers again, and came across the following scenario: What if the project's build script invokes Vagrant or Docker? You might end up running into issues if two of the same container are used at once, or if the same IP address is used at once in Vagrant, etc. Easiest workaround is to always do Alternatively, it can be put up to the user to ensure that a single worker is setup on a runner that's dedicated to the project. |
Hey Guys, you maybe interested in: #99 and gitlabhq/gitlab-ci#462. It's still WIP, but very promising. |
👍 for this |
I have been using this as a patch for the last few days and it seems to work really well. Currently running 20 runners with one project, and a load of developers - seems to work well and I haven't had a problem with it |
@randx Do you plan to merge it? |
👍 for this, multiple runners trying to build the same project is causing us many problems. It seems silly that you can only run one runner per machine or they step on each other. More specifically, that this system cannot handle any project where new commits ever come in faster than the test suite can run. |
+1 for merge. |
@randx Can you have a look at this? |
@dosire yes but later |
@randx OK, thx |
…into multiple-runners Conflicts: lib/config.rb
@@ -26,7 +27,7 @@ def url | |||
end | |||
|
|||
def builds_dir | |||
@builds_path ||= File.join($root_path, 'tmp', 'builds') | |||
@builds_path ||= File.join($root_path, 'tmp', 'builds', 'runner-' + @runner.to_s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [87/80]
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just followed convention in the same file ...
See line below:
opts.on('-CWORKING_DIRECTORY', 'Specify the working directory for gitlab-ci-runner') do |v|
Anyway, I will fix single quotes
already implemented |
Oh, sorry. I misunderstood. |
Currently we are considering to make GO runner official https://github.com/ayufan/gitlab-ci-multi-runner |
@vsizov 👍 The GO runner was much easier to install & setup. Would be cool to see if become the official runner, as it supports multiple operating systems, and even support configuring a multi-runner from GitLab CI. |
This patch allows multiple runners to build the same project in parallel,
as each runner has its own, dedicated directory for checking out and building the projects.