1
1
Vagrant . configure ( "2" ) do |config |
2
-
3
2
# Load config JSON.
4
3
config_json = JSON . parse ( File . read ( "config.json" ) )
5
4
6
5
# Prepare base box.
7
- config . vm . box = "precise32 "
8
- config . vm . box_url = "http ://files.vagrantup .com/precise32.box "
6
+ config . vm . box = "ubuntu/trusty64 "
7
+ config . vm . box_url = "https ://atlas.hashicorp .com/ubuntu/boxes/trusty64 "
9
8
10
9
# Configure networking.
11
10
config . vm . network :private_network , ip : config_json [ "vm" ] [ "ip" ]
12
-
13
11
# Configure forwarded ports.
14
12
config . vm . network "forwarded_port" , guest : 35729 , host : 35729 , protocol : "tcp" , auto_correct : true
15
13
config . vm . network "forwarded_port" , guest : 8983 , host : 8983 , protocol : "tcp" , auto_correct : true
@@ -18,7 +16,6 @@ Vagrant.configure("2") do |config|
18
16
config . vm . network "forwarded_port" , guest : port [ "guest_port" ] ,
19
17
host : port [ "host_port" ] , protocol : port [ "protocol" ] , auto_correct : true
20
18
end
21
-
22
19
# Customize provider.
23
20
config . vm . provider :virtualbox do |vb |
24
21
# RAM.
@@ -56,7 +53,10 @@ Vagrant.configure("2") do |config|
56
53
57
54
# Run initial shell script.
58
55
config . vm . provision :shell , :path => "chef/shell/initial.sh"
56
+ config . ssh . forward_agent = true
57
+ config . vm . boot_timeout = 120
59
58
59
+ config . vm . box_download_insecure
60
60
# Customize provisioner.
61
61
config . vm . provision :chef_solo do |chef |
62
62
chef . json = config_json
@@ -65,7 +65,6 @@ Vagrant.configure("2") do |config|
65
65
chef . roles_path = "chef/roles"
66
66
chef . add_role "vdd"
67
67
end
68
-
69
68
# Run final shell script.
70
69
config . vm . provision :shell , :path => "chef/shell/final.sh" , :args => config_json [ "vm" ] [ "ip" ]
71
70
0 commit comments