Closed Bug 1173409 Opened 9 years ago Closed 9 years ago

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

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

Details

Attachments

(1 file)

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.
Attachment #8620411 - Flags: review?(mdoglio)
Attachment #8620411 - Flags: review?(mdoglio) → review+
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/a4798aa8403f8073d308dfe6bcb02db458022ec2
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
time.

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:
http://docs.vagrantup.com/v2/multi-machine/
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: Treeherder: Docs & Development → TreeHerder
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: