feat(vagrant/virtualbox): adds parameter to resize vbox disks (#4231)
Useful if the default 20GB is not enough in cases where you are using the local path provisioner of rancher for example
This commit is contained in:
parent
94892ab3a4
commit
f81bafa07b
1 changed files with 9 additions and 0 deletions
9
Vagrantfile
vendored
9
Vagrantfile
vendored
|
@ -50,6 +50,8 @@ $kube_node_instances = $num_instances
|
||||||
$kube_node_instances_with_disks = false
|
$kube_node_instances_with_disks = false
|
||||||
$kube_node_instances_with_disks_size = "20G"
|
$kube_node_instances_with_disks_size = "20G"
|
||||||
$kube_node_instances_with_disks_number = 2
|
$kube_node_instances_with_disks_number = 2
|
||||||
|
$override_disk_size = false
|
||||||
|
$disk_size = "20GB"
|
||||||
|
|
||||||
$playbook = "cluster.yml"
|
$playbook = "cluster.yml"
|
||||||
|
|
||||||
|
@ -97,6 +99,13 @@ Vagrant.configure("2") do |config|
|
||||||
# always use Vagrants insecure key
|
# always use Vagrants insecure key
|
||||||
config.ssh.insert_key = false
|
config.ssh.insert_key = false
|
||||||
|
|
||||||
|
if ($override_disk_size)
|
||||||
|
unless Vagrant.has_plugin?("vagrant-disksize")
|
||||||
|
system "vagrant plugin install vagrant-disksize"
|
||||||
|
end
|
||||||
|
config.disksize.size = $disk_size
|
||||||
|
end
|
||||||
|
|
||||||
(1..$num_instances).each do |i|
|
(1..$num_instances).each do |i|
|
||||||
config.vm.define vm_name = "%s-%01d" % [$instance_name_prefix, i] do |node|
|
config.vm.define vm_name = "%s-%01d" % [$instance_name_prefix, i] do |node|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue