blob: 9753a74ad999f222446d398fb4171ebf9faccd2a [file] [log] [blame]
Pawel Wieczorek30e199a2020-07-16 16:15:06 +02001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4Vagrant.configure("2") do |config|
5
6 config.vm.provider :libvirt do |libvirt|
7 libvirt.default_prefix = "k8s_bin_versions_inspector";
8 libvirt.driver = "kvm";
9 libvirt.cpus = 6;
10 libvirt.memory = 12288;
11 end
12
13 config.vm.box = "generic/ubuntu1804";
14 config.vm.hostname = "k8s-bin-versions-inspector";
15 config.vm.synced_folder ".", "/vagrant", disabled: true;
16 config.vm.synced_folder "..", "/home/vagrant/k8s_bin_versions_inspector", type: :sshfs;
17
18 config.vm.provision "shell", inline: <<-end
19 export DEBIAN_FRONTEND=noninteractive &&\
20 apt-get update &&\
21 apt-get upgrade -y &&\
22 apt-get dist-upgrade -y &&\
23 apt-get install -y python3 python3-pip snap git vim net-tools htop &&\
24 pip3 install --system -r /home/vagrant/k8s_bin_versions_inspector/env/requirements-dev.txt &&\
25 snap install --classic microk8s &&\
26 usermod -a -G microk8s vagrant
27 end
28 config.vm.provision :reload;
29 config.vm.provision "shell", privileged: false, inline: <<-end
Pawel Wieczorek782390a2020-10-29 12:04:58 +010030 microk8s start &&\
31 microk8s status --wait-ready &&\
Pawel Wieczorek30e199a2020-07-16 16:15:06 +020032 microk8s config > /home/vagrant/.kube/config &&\
33 microk8s kubectl apply -f /home/vagrant/k8s_bin_versions_inspector/env/configuration
34 end
35end
36