hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.21k stars 4.43k forks source link

Enhancement Request: More control over boot/provision sequence #13374

Open stephenreay opened 6 months ago

stephenreay commented 6 months ago

Is your feature request related to a problem? Please describe. With a multi-machine config, bringing up the whole cluster of machines can become more involved for the user, due to differences in how vagrant up and vagrant provision handle parallelism.

vagrant up will optionally run operations in parallel, including provisioning, which happens as soon as that specific VM is ready (started).

Alternatively, vagrant up --no-parallel will boot, and then attempt to provision each machine in order, more akin to vagrant provision which has no parallel ability, and processes each host one after the other.

When a provisioning step(s) require all the machines be 'up' to succeed (i.e. doing an SSH keyscan of other members) there is currently no built in way to have vagrant up first boot all the machines, and then run the provisioning.

Describe the solution you'd like An ideal solution here would be a parameter in the Vagrantfile (e.g. perhaps config.vagrant.defer_provisioners = true or similar) to tell Vagrant that provisioning should wait till all machines being affected, are up.

Describe alternatives you've considered