-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
53 lines (45 loc) · 1.56 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 :
unless Vagrant.has_plugin?('vagrant-persistent-storage')
system('vagrant plugin install vagrant-persistent-storage') || raise
warn 'Restarting...'
exec($0, *ARGV)
end
require_relative 'vbox_volumes'
module VagrantPlugins::ProviderVirtualBox::Driver
class Base
prepend DiskIDWriter
end
end
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# https://docs.vagrantup.com
config.vm.box = 'ubuntu/xenial64'
config.vm.network 'forwarded_port', guest: 80, host: 8181
config.vm.network 'private_network', ip: '192.168.33.10'
config.persistent_storage.enabled = true
config.persistent_storage.location = VBox.volume
config.persistent_storage.size = 32 # Megabytes
config.persistent_storage.use_lvm = false
config.persistent_storage.format = false
config.persistent_storage.mount = false
# This doesn't actually do shit.
config.persistent_storage.diskdevice = VBox.medium_by_id(VBox.volume)
config.vm.provider 'virtualbox' do |v|
v.memory = 2048
v.cpus = 4
end
config.vm.provision 'chef_zero' do |chef|
chef.version = '13'
chef.cookbooks_path = %w(cookbooks site-cookbooks)
chef.roles_path = 'roles'
chef.nodes_path = 'vagrant-nodes'
chef.data_bags_path = 'data_bags'
chef.add_role 'jenkins-master'
chef.add_recipe 'nci-disk'
chef.log_level = 'info'
end
end