1
1
# -*- mode: ruby -*-
2
2
# vi: set ft=ruby :
3
3
4
- # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
4
VAGRANTFILE_API_VERSION = "2"
6
5
7
6
Vagrant . configure ( VAGRANTFILE_API_VERSION ) do |config |
8
- # All Vagrant configuration is done here. The most common configuration
9
- # options are documented and commented below. For a complete reference,
10
- # please see the online documentation at vagrantup.com.
11
-
12
- # Every Vagrant virtual environment requires a box to build off of.
13
- #config.vm.synced_folder ".", "/vagrant", type: "nfs"
14
7
config . vm . synced_folder "." , "/vagrant"
15
-
8
+
16
9
config . vm . define "execd2" do |execd2 |
17
10
execd2 . vm . box = "chef/centos-6.5"
18
11
execd2 . vm . hostname = "execd2"
19
12
execd2 . vm . network "private_network" , ip : "192.168.10.101"
20
13
execd2 . vm . provision "shell" , path : "hostnames.sh"
21
14
end
22
-
15
+
23
16
config . vm . define "execd1" do |execd1 |
24
17
execd1 . vm . box = "chef/centos-6.5"
25
18
execd1 . vm . hostname = "execd1"
26
19
execd1 . vm . network "private_network" , ip : "192.168.10.100"
27
20
execd1 . vm . provision "shell" , path : "hostnames.sh"
28
21
end
29
-
22
+
30
23
config . vm . define "master" do |master |
31
24
master . vm . box = "chef/centos-6.5"
32
25
master . vm . hostname = "master"
@@ -35,109 +28,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
35
28
master . vm . provision "shell" , path : "installation.sh"
36
29
end
37
30
38
- # Disable automatic box update checking. If you disable this, then
39
- # boxes will only be checked for updates when the user runs
40
- # `vagrant box outdated`. This is not recommended.
41
- # config.vm.box_check_update = false
42
-
43
- # Create a forwarded port mapping which allows access to a specific port
44
- # within the machine from a port on the host machine. In the example below,
45
- # accessing "localhost:8080" will access port 80 on the guest machine.
46
- # config.vm.network "forwarded_port", guest: 80, host: 8080
47
-
48
- # Create a private network, which allows host-only access to the machine
49
- # using a specific IP.
50
- #config.vm.network "private_network", ip: "192.168.33.10"
51
-
52
- # Create a public network, which generally matched to bridged network.
53
- # Bridged networks make the machine appear as another physical device on
54
- # your network.
55
- # config.vm.network "public_network"
56
-
57
- # If true, then any SSH connections made will enable agent forwarding.
58
- # Default value: false
59
- # config.ssh.forward_agent = true
60
-
61
- # Share an additional folder to the guest VM. The first argument is
62
- # the path on the host to the actual folder. The second argument is
63
- # the path on the guest to mount the folder. And the optional third
64
- # argument is a set of non-required options.
65
- # config.vm.synced_folder "../data", "/vagrant_data"
66
-
67
- # Provider-specific configuration so you can fine-tune various
68
- # backing providers for Vagrant. These expose provider-specific options.
69
- # Example for VirtualBox:
70
- #
71
31
config . vm . provider "virtualbox" do |vb |
72
32
vb . gui = false
73
33
vb . cpus = 4
74
34
vb . customize [ "modifyvm" , :id , "--memory" , "512" ]
75
35
end
76
- #
77
- # View the documentation for the provider you're using for more
78
- # information on available options.
79
-
80
- # Enable provisioning with CFEngine. CFEngine Community packages are
81
- # automatically installed. For example, configure the host as a
82
- # policy server and optionally a policy file to run:
83
- #
84
- # config.vm.provision "cfengine" do |cf|
85
- # cf.am_policy_hub = true
86
- # # cf.run_file = "motd.cf"
87
- # end
88
- #
89
- # You can also configure and bootstrap a client to an existing
90
- # policy server:
91
- #
92
- # config.vm.provision "cfengine" do |cf|
93
- # cf.policy_server_address = "10.0.2.15"
94
- # end
95
-
96
- # Enable provisioning with Puppet stand alone. Puppet manifests
97
- # are contained in a directory path relative to this Vagrantfile.
98
- # You will need to create the manifests directory and a manifest in
99
- # the file default.pp in the manifests_path directory.
100
- #
101
- # config.vm.provision "puppet" do |puppet|
102
- # puppet.manifests_path = "manifests"
103
- # puppet.manifest_file = "site.pp"
104
- # end
105
-
106
- # Enable provisioning with chef solo, specifying a cookbooks path, roles
107
- # path, and data_bags path (all relative to this Vagrantfile), and adding
108
- # some recipes and/or roles.
109
- #
110
- # config.vm.provision "chef_solo" do |chef|
111
- # chef.cookbooks_path = "../my-recipes/cookbooks"
112
- # chef.roles_path = "../my-recipes/roles"
113
- # chef.data_bags_path = "../my-recipes/data_bags"
114
- # chef.add_recipe "mysql"
115
- # chef.add_role "web"
116
- #
117
- # # You may also specify custom JSON attributes:
118
- # chef.json = { mysql_password: "foo" }
119
- # end
120
-
121
- # Enable provisioning with chef server, specifying the chef server URL,
122
- # and the path to the validation key (relative to this Vagrantfile).
123
- #
124
- # The Opscode Platform uses HTTPS. Substitute your organization for
125
- # ORGNAME in the URL and validation key.
126
- #
127
- # If you have your own Chef Server, use the appropriate URL, which may be
128
- # HTTP instead of HTTPS depending on your configuration. Also change the
129
- # validation key to validation.pem.
130
- #
131
- # config.vm.provision "chef_client" do |chef|
132
- # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
133
- # chef.validation_key_path = "ORGNAME-validator.pem"
134
- # end
135
- #
136
- # If you're using the Opscode platform, your validator client is
137
- # ORGNAME-validator, replacing ORGNAME with your organization name.
138
- #
139
- # If you have your own Chef Server, the default validation client name is
140
- # chef-validator, unless you changed the configuration.
141
- #
142
- # chef.validation_client_name = "ORGNAME-validator"
143
36
end
0 commit comments