Skip to content

Commit

Permalink
Update Vagrantfile
Browse files Browse the repository at this point in the history
add additional storage to worker node for rook
  • Loading branch information
zufardhiyaulhaq committed Dec 22, 2020
1 parent a3b2fc7 commit 2eda35a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Vagrant.configure('2') do |config|

$ansible_script = <<-'SCRIPT'
sudo apt update -y
sudo apt install ansible sshpass -y
sudo apt install ansible sshpass lvm2 -y
SCRIPT

### cluster name configuration
Expand Down Expand Up @@ -86,6 +86,17 @@ Vagrant.configure('2') do |config|
vb.memory = 4096
vb.cpus = 4
vb.customize ['modifyvm', :id, '--nicpromisc2', 'allow-all']

unless File.exist?("./#{cluster_name}-worker-#{i}-disk-02.vdi")
vb.customize ['createhd', '--filename', "./#{cluster_name}-worker-#{i}-disk-02.vdi", '--variant', 'Fixed', '--size', 10 * 1024]
end

unless File.exist?("./#{cluster_name}-worker-#{i}-disk-03.vdi")
vb.customize ['createhd', '--filename', "./#{cluster_name}-worker-#{i}-disk-03.vdi", '--variant', 'Fixed', '--size', 10 * 1024]
end

vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', "./#{cluster_name}-worker-#{i}-disk-02.vdi"]
vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 2, '--device', 0, '--type', 'hdd', '--medium', "./#{cluster_name}-worker-#{i}-disk-03.vdi"]
end
end
end
Expand Down

0 comments on commit 2eda35a

Please sign in to comment.