Last active
April 29, 2024 18:04
-
-
Save dogukanturan/4e8b10130da16d723b1c9a24a319f5ee to your computer and use it in GitHub Desktop.
Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGE_NAME = "debian/bullseye64" | |
CPU = 1 | |
MEMORY = 1 | |
NODE = 3 | |
Vagrant.configure("2") do |config| | |
(1..NODE).each do |i| | |
config.vm.provision "shell", path: 'script.sh' | |
config.vm.define "node-#{i}" do |node| | |
node.vm.box = IMAGE_NAME | |
node.vm.network "private_network", ip: "10.100.50.1#{i-1}" | |
node.vm.hostname = "node-#{i}" | |
config.vm.provider "virtualbox" do |virtualbox| | |
virtualbox.cpus = CPU | |
virtualbox.memory = MEMORY * 1024 | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dogukanturan.com
Medium