| # -*- mode: ruby -*- |
| # vi: set ft=ruby : |
| |
| Vagrant.configure("2") do |config| |
| |
| config.vm.provider :libvirt do |libvirt| |
| libvirt.default_prefix = "k8s_bin_versions_inspector"; |
| libvirt.driver = "kvm"; |
| libvirt.cpus = 6; |
| libvirt.memory = 12288; |
| end |
| |
| config.vm.box = "generic/ubuntu1804"; |
| config.vm.hostname = "k8s-bin-versions-inspector"; |
| config.vm.synced_folder ".", "/vagrant", disabled: true; |
| config.vm.synced_folder "..", "/home/vagrant/k8s_bin_versions_inspector", type: :sshfs; |
| |
| config.vm.provision "shell", inline: <<-end |
| export DEBIAN_FRONTEND=noninteractive &&\ |
| apt-get update &&\ |
| apt-get upgrade -y &&\ |
| apt-get dist-upgrade -y &&\ |
| apt-get install -y python3 python3-pip snap git vim net-tools htop &&\ |
| pip3 install --system -r /home/vagrant/k8s_bin_versions_inspector/env/requirements-dev.txt &&\ |
| snap install --classic microk8s &&\ |
| usermod -a -G microk8s vagrant |
| end |
| config.vm.provision :reload; |
| config.vm.provision "shell", privileged: false, inline: <<-end |
| microk8s start &&\ |
| microk8s status --wait-ready &&\ |
| microk8s config > /home/vagrant/.kube/config &&\ |
| microk8s kubectl apply -f /home/vagrant/k8s_bin_versions_inspector/env/configuration |
| end |
| end |
| |