Created
July 25, 2021 17:51
-
-
Save DSdatsme/5efa99d840e8deb340ea3f5f0c48cdd6 to your computer and use it in GitHub Desktop.
basic config to setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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