From 58d386549a2dedfb0d8c7b18bfa914d8be051af9 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Mon, 5 Apr 2021 23:23:40 +0200 Subject: [PATCH] Add first Vagrantfile --- .gitignore | 1 + Vagrantfile | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .gitignore create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a977916 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vagrant/ diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..f066a3b --- /dev/null +++ b/Vagrantfile @@ -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 +