Skip to content

Instantly share code, notes, and snippets.

@DSdatsme
Created July 25, 2021 17:51
Show Gist options
  • Save DSdatsme/5efa99d840e8deb340ea3f5f0c48cdd6 to your computer and use it in GitHub Desktop.
Save DSdatsme/5efa99d840e8deb340ea3f5f0c48cdd6 to your computer and use it in GitHub Desktop.
basic config to setup
HOST_IMAGE = "centos/8"
$master_provision = <<-SCRIPT
echo provisioning k3s cluster...
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
echo done provisioning
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 3072
v.cpus = 2
end
config.vm.define "node" do |worker|
worker.vm.box = HOST_IMAGE
worker.vm.hostname = "k3smaster"
# basic utility setup
config.vm.provision "shell", inline: "dnf install net-tools -y"
# run setup script
config.vm.provision "shell", inline: $master_provision
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment