Add first Vagrantfile

master
Davide Polonio 2021-04-05 23:23:40 +02:00
parent 910f6956c8
commit 58d386549a
2 changed files with 38 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vagrant/

37
Vagrantfile vendored Normal file
View File

@ -0,0 +1,37 @@
# -*- 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