jenkinsci / nomad-plugin

Nomad cloud plugin for Jenkins
https://plugins.jenkins.io/nomad/
MIT License
56 stars 41 forks source link

Supporting Swarm Slaves #12

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hey it would be great if this plugin also supported spinning up jenkins swarm slaves: https://wiki.jenkins-ci.org/display/JENKINS/Swarm+Plugin. What do you think?

far-blue commented 7 years ago

I think the point of Swarm slaves is that they are started out-of-band and register themselves with Jenkins. This plugin is all about Jenkins itself spinning up slaves so the key reason for Swarm is lost. You can easily spin up Swarm slaves directly in Nomad using a standard job (as I do) and it works very well. The advantage of this plugin is the dynamic allocation of slaves based on load. I actually use both this plugin and Swarm slaves directly managed via a Nomad job and they work fine together.

pvandervelde commented 7 years ago

The benefit of using the swarm slave plugin is that it works well on Windows machines. Now that Windows Containers is supported by Docker we could potentially use Nomad and the Nomad plugin to handle the creation of build agents on both Linux and Windows. So what we're concerned having the swarm slaves plugin be supported would be awesome.

far-blue commented 7 years ago

Swarm and Cloud slaves in Jenkins are really very different concepts. Cloud slaves are managed by Jenkins and it can scale them up and down. Swarm slaves invert this and Jenkins is simply informed the slave is available. If you want to use Swarm slaves I'd suggest simply having a script external to Jenkins that queries the API to check on current load and then scales the Nomad job up and down.

pvandervelde commented 7 years ago

Ok we'll try to use the nomad slaves and will see if that works. If not we'll go with the external service

jippi commented 7 years ago

closing as it doesn't seem relevant to the project at this time

please reopen if anyone disagree