forked from manarth/oscar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
53 lines (39 loc) · 1.45 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- mode: ruby -*-
# vi: set ft=ruby :
###
# This is the Vagrantfile used by Oscar instances.
###
Vagrant::Config.run do |config|
build_box = "oscar"
# Get the path to this box instance.
# TODO: Validate this lookup is correct.
instance_path = File.expand_path("")
# The directory name is used to build the host-names.
# E.g. the directory "foobar" will produce the boxes:
# * vm-foobar-drupaldev
# * vm-foobar-drupalsvcs
# * vm-foobar-drupaltest
directory = File.basename(instance_path)
# Hostname labels are 1-63 characters.
# NETBIOS (Samba) limits the name length to 15 characters
# Define the primary Drupal box.
# This is the primary VM box, which means that it'll be the one acted-upon,
# unless a box-name parameter is passed.
config.vm.define :drupal, :primary => true do |drupal_config|
drupal_config.vm.box = build_box
drupal_config.vm.host_name = "vm-" + directory + "-drupaldev"
drupal_config.vm.network :hostonly, "192.168.1.10"
end
# Define the Services box.
config.vm.define :services do |services_config|
services_config.vm.box = build_box
services_config.vm.host_name = "vm-" + directory + "-drupalsvcs"
services_config.vm.network :hostonly, "192.168.1.11"
end
# Define the Test box.
config.vm.define :test do |test_config|
test_config.vm.box = build_box
test_config.vm.host_name = "vm-" + directory + "-drupaltest"
test_config.vm.network :hostonly, "192.168.1.12"
end
end