Vagrant: Add support for creating a second VM alongside the first



Tree Management
Treeherder: Docs & Development
3 years ago
3 years ago


(Reporter: emorley, Assigned: emorley)




(1 attachment)

Sometimes it's helpful to try something quickly in a clean Vagrant VM, or you have several bugs being worked on at the same time and want to have separate environments/DB contents for each.

Vagrant supports defining multiple machines in the Vagrantfile - which is really intended so you can do things like having a separate "web" machine and "db" machine - however we can abuse it to allow us to have multiple treeherder instances.

This will mean the workflow in bug 1172602 (ie: creating multiple treeherder clones) can be avoided.
Created attachment 8620411 [details] [review]
Add support for creating a 'scratch' VM
Attachment #8620411 - Flags: review?(mdoglio)
Attachment #8620411 - Flags: review?(mdoglio) → review+

Comment 2

3 years ago
Commit pushed to master at
Bug 1173409 - Vagrant: Add support for creating a 'scratch' VM

It's sometimes useful to be able to spin up an additional Vagrant
environment without affecting the first. To do this, we create two named
machines, both identical (since they inherit the main Vagrantfile
configuration) - one called default (to match the machine name used up
until now, so we don't force people to recreate their existing VMs when
we land this) and one called scratch.

The former is set to be the primary, so that single-machine commands
(eg `vagrant ssh`) work without having to append the machine name every

The scratch machine has autostart set to false, so that it does not spin
up without explicitly using: `vagrant up scratch`

The name `scratch` is entirely arbitrary, and we can add additional
temporary machine names later, if people wish to have more than two
environments saved simultaneously.

For more information, see:
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.