All, I think this is a quick fix and I am just missing something stupid. Below is my code, what is weird is the MongoDB node AND Registry node, is running the Kubernetes-Setup.sh script and not the appropriate scripts. Any clue on what I am doing wrong?
-- mode: ruby --
vi: set ft=ruby :
Define variables for this environment
NUM_MASTER_NODE = 1
NUM_WORKER_NODE = 2
MASTER_NODE_NAME_PREFIX = “master0”
WORKER_NODE_NAME_PREFIX = “worker0”
IP_NW = “192.168.31.”
MASTER_IP_START = 9
NODE_IP_START = 19
Vagrant.configure(“2”) do |config|
#config.vm.box = “generic/ubuntu2204”
config.vm.box = “hashicorp/bionic64”
config.vm.synced_folder “Vagrant/”, “/vagrant”
Provision Master Nodes
(1…NUM_MASTER_NODE).each do |i|
master_node_name = MASTER_NODE_NAME_PREFIX + i.to_s
config.vm.define master_node_name do |node|
# Configure non vendor specific provider settings
node.vm.hostname = master_node_name
# Verify this is only for VMware
node.vm.provider "vmware_desktop" do |vb|
vb.vmx["displayName"] = "MASTER0" + i.to_s
vb.vmx["memsize"] = 16384
vb.vmx["numvcpus"] = 4
end
end
config.vm.provision :shell, :path => "vagrant/Kubernetes-Setup.sh"
end
Provision Worker Nodes
(1…NUM_WORKER_NODE).each do |i|
worker_node_name = WORKER_NODE_NAME_PREFIX + i.to_s
config.vm.define worker_node_name do |node|
# Configure non vendor specific provider settings
node.vm.hostname = worker_node_name
# Verify this is only for VMware
node.vm.provider "vmware_desktop" do |vb|
vb.vmx["displayName"] = "WORKER0" + i.to_s
vb.vmx["memsize"] = 32768
vb.vmx["numvcpus"] = 4
end
end
config.vm.provision :shell, :path => "vagrant/Kubernetes-Setup.sh"
end
Provision MongoDB 1-node
config.vm.hostname = “mongodb”
config.vm.define “mongodb” do |node|
# Configure non vendor specific provider settings
node.vm.provider “vmware_desktop” do |vb|
vb.vmx[“displayName”] = “MONGODB”
vb.vmx[“memsize”] = 16384
vb.vmx[“numvcpus”] = 4
end
config.vm.provision :shell, :path => "vagrant/MongoDB-Setup.sh"
end
Provision Private Registry
config.vm.hostname = “registry”
config.vm.define “registry” do |node|
# Configure non vendor specific provider settings
node.vm.provider “vmware_desktop” do |vb|
vb.vmx[“displayName”] = “REGISTRY”
vb.vmx[“memsize”] = 4096
vb.vmx[“numvcpus”] = 2
end
config.vm.provision :shell, :path => "vagrant/Registry-Setup.sh"
end
end