38 lines
905 B
Ruby
38 lines
905 B
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
|
|
config.vm.define "master1" do |server|
|
|
server.vm.box = "generic/arch"
|
|
server.vm.hostname = "master1.local"
|
|
# server.vm.network "private_network", type: "dhcp"
|
|
server.vm.network "public_network"
|
|
|
|
server.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "1024"
|
|
vb.cpus = "4"
|
|
end
|
|
|
|
server.vm.provision "shell", inline: <<-SHELL
|
|
export K3S_KUBECONFIG_MODE="644"
|
|
export INSTALL_K3S_EXEC=" --no-deploy servicelb --no-deploy traefik"
|
|
|
|
curl -sfL https://get.k3s.io | sh -
|
|
SHELL
|
|
end
|
|
|
|
config.vm.define "worker1" do |agent|
|
|
agent.vm.box = "generic/arch"
|
|
agent.vm.hostname = "worker1.local"
|
|
# agent.vm.network "private_network", type: "dhcp"
|
|
agent.vm.network "public_network"
|
|
|
|
agent.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "512"
|
|
vb.cpus = "2"
|
|
end
|
|
end
|
|
end
|
|
|