diff --git a/templates/Vagrantfile.template b/templates/Vagrantfile.template index 4a8dff5..5304945 100644 --- a/templates/Vagrantfile.template +++ b/templates/Vagrantfile.template @@ -12,6 +12,7 @@ Vagrant.configure("2") do |config| num_webserver = #{numWebserver} num_loadbalancer = #{numLoadbalancers} + num_postgresql = #{numPostgresql} (1..num_webserver).each do |nth| machine_id = "#{customerName}-bloated-debian-web%d" % [nth] @@ -36,6 +37,25 @@ Vagrant.configure("2") do |config| machine_id = "#{customerName}-bloated-debian-lb%d" % [nth] machine_ip = increment_ip() + config.vm.define machine_id do |web| + web.vm.box = "ubuntu/focal64" + web.vm.hostname = machine_id + + web.vm.network "private_network", ip: machine_ip + web.vm.provision "file", source: "./.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys" + + web.vm.provider "virtualbox" do |vb| + vb.memory = "1024" + vb.gui = false + vb.name = machine_id + end + end + end + + (1..num_postgresql).each do |nth| + machine_id = "#{customerName}-bloated-debian-db%d" % [nth] + machine_ip = increment_ip() + config.vm.define machine_id do |web| web.vm.box = "ubuntu/focal64" web.vm.hostname = machine_id