I think it would be a great benefit to add Vagrant executor support as it supports multiple vm types and it is how some developers support their development environment and would want to emulate it on the CI.
It would operate by knowing when the vagrant vm is up, running and stopped. And would run the commands via vagrant ssh -c ''.
While I have manage to this with set of specific commands, when a build is canceled or randomly stalled, the vagrant vm is never stopped or destroyed causing server resource issues.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
@bass_rock I'd love to chat with you about how you're doing this currently -- it looks like we have the same desired outcome. Where's best to reach you to collaborate?
One of the benefits of having vagrant, is that one can also use the vagrant catalogue of images for virtualbox, vmware, esxi, parallels, etc. - so it would be docker-like but with VMs instead of containers. So for GitLab, having a vagrant runner makes sense to support all the underlying virtualisation technologies, and, for the user it's a benefit because one could reuse much of the VM stock available for Vagrant (especially for OSX, iOS and Windows builds).
I've been running Vagrant VMs under Jenkins for a while with the same basic resourcing issues, looking to switch some over to Gitlab-CI and decided to consolidate some scripts.
https://github.com/neerolyte/vagrant-sad is a first pass, I'll probably add more functionality in the future, thought some people following this issue might be interested as an intermediate solution though.
as the script and then use triggers from cron to run that - so that it never the more intensive job runs when nothing else is running (we currently have one CI runner capable of running Vagrant VMs and concurrency limited to 1 on that runner).
This is not a fully scalable solution, but it's adequate "for now".
just an idea : if the existing VirtualBox executor was enhanced so that the VM to be run could be specified in the gitlab-ci.yml, wouldn't it be close to a vagrant support ?
@bbdb I don't see how. Vagrant is a way of provisioning multiple VMs together and having them get predictable network, file shares, CPU etc. The Virtualbox runner would require a different base box (i.e we may not have git in the Vagrant base box) and I assume can only run a single VM per job?
It'd be like asking if providing a LXC runner was close to docker support.
I was not clear, sorry. The nice thing I see with vagrant support is that a runner can be configured to run a vm selected in the gitlab-ci file, at runtime. On the other hand, the virtualbox executor tights the runner with a specific VM, at runner configuration time. I was just wondering if the virtualbox executor could be enhanced to allow selection of the VM at run time.