-
Notifications
You must be signed in to change notification settings - Fork 18
/
Vagrantfile
87 lines (70 loc) · 3.25 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "mfellows/windows2012r2"
hostname = "beanstalk.dev"
ip_address = "10.0.0.30"
host_port = 5895
config.winrm.host = "localhost"
config.winrm.port = host_port
config.winrm.guest_port = host_port
config.vm.guest = :windows
config.vm.communicator = "winrm"
config.vm.network :forwarded_port, guest: 3389, host: 3399, id: "rdp", auto_correct: false
config.vm.network :forwarded_port, guest: 5985, host: host_port, id: "winrm", auto_correct: false
config.vm.network :forwarded_port, guest: 80, host: 8000, id: "web" # Port forward for IIS
config.vm.network :forwarded_port, guest: 443, host: 8443, id: "ssl" # Port forward for SSL IIS
config.vm.network "private_network", ip: ip_address
config.vm.provider "virtualbox" do |v|
v.gui = true
end
if Vagrant.has_plugin?("vagrant-multi-hostsupdater")
config.multihostsupdater.aliases = {ip_address => [hostname]}
end
# Install prerequisites
config.vm.provision "shell", path: "./scripts/provision.ps1"
# Run DSC
config.vm.provision "dsc", run: "always" do |dsc|
# Set of module paths relative to the Vagrantfile dir.
#
# These paths are added to the DSC Configuration running
# environment to enable local modules to be addressed.
#
# @return [Array] Set of relative module paths.
dsc.module_path = ["modules"]
# The path relative to `dsc.manifests_path` pointing to the Configuration file
dsc.configuration_file = "Beanstalk.ps1"
# The path relative to Vagrantfile pointing to the Configuration Data file
dsc.configuration_data_file = "manifests/BeanstalkConfig.psd1"
# The Configuration Command to run. Assumed to be the same as the `dsc.configuration_file`
# (sans extension) if not provided.
dsc.configuration_name = "Beanstalk"
# Relative path to a pre-generated MOF file.
#
# Path is relative to the folder containing the Vagrantfile.
# dsc.mof_path = "mof"
# Relative path to the folder containing the root Configuration manifest file.
# Defaults to 'manifests'.
#
# Path is relative to the folder containing the Vagrantfile.
dsc.manifests_path = "manifests"
# Commandline arguments to the Configuration run
#
# Set of Parameters to pass to the DSC Configuration.
dsc.configuration_params = {"-MachineName" => "localhost", "-WebAppPath" => "c:\\tmp", "-HostName" => hostname}
# The type of synced folders to use when sharing the data
# required for the provisioner to work properly.
#
# By default this will use the default synced folder type.
# For example, you can set this to "nfs" to use NFS synced folders.
# dsc.synced_folder_type = ""
# Temporary working directory on the guest machine.
# dsc.temp_dir = "c:/tmp/vagrant-dsc"
end
end