If I'm paraphrasing correctly, you're looking for the ability to spawn off a new vagrant boxes for GoCD job runs. This ability was recently merged into <https://github.com/gocd/gocd/pull/2058> master. It's still a bit early to call this feature as "feature complete", we hope users would give it a try and provide us feedback.
I've written a sample docker plugin <https://github.com/ketan/docker-elastic-agents> that currently spins up docker containers for each build, I'm sure it should be possible to tweak it to use vagrant, or openstack, or AWS or whatever you prefer. Here's a skeleton project that you can fork to develop your own elastic agent plugin. You can find an experimental build with elastic agent support at https://www.go.cd/download/?experimental=true On Tue, Aug 2, 2016 at 6:26 PM Fabian Sturm <[email protected]> wrote: > Hi, > > I am currently in search of a modern CI/CD system that can use e.g. > vagrant to isolate the build machines. I would first like to describe what > I mean by this and then would try to come up with an idea how that could be > done in go.cd. > Maybe there are people who have done something similar and can chip in and > give some insights if it is feasible in go.cd. > > Currently I need to compile a program with Visual Studio msvc and > therefore I need a build machine (agent) which runs under windows. To now > isolate and make this build environment reproducible I would like to create > a script which can generate a vagrant box using a base windows image, > install msvc and some dependencies and freeze this box. > After that I would like to use go.cd to spawn for each job it executes a > fresh vagrant box. > > Unfortunately it seems go.cd does not provide such a mechanism. So for > now my idea is the following. Create a vagrant box containing windows, msvc > etc. the go.cd build agent and the settings for autoregister. > On my big build machine I would then run a script which creates in a loop > new vagrant instances up to a certain amount and deletes vagrant instances > that have been shut down. This would allow me to always have a couple of > build agents ready to process new jobs. > To now be fully reproducible I need to make sure that after a job > execution in a vagrant box the box is not used a second time. For this I > would add to any job a final task which shuts the vagrant box down. > > Does this sound like a reasonable approach? My biggest gripe with it is > that I have to add a shutdown task at the end of every job. I would rather > like to have this setting as part of the build agent. Any idea how I could > do that? > I would also rather like to have a plugin in go.cd which does the > spawning of new vagrant boxes on a build agent directly without a custom > script. > > Any ideas and pointers how to achieve something like this would be great. > And also if someone wants to works on this idea which me and mentor me > creating a solution in this direction. > > Kind regards, > Fabian > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
