Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,24 @@ jobs:

# - name: Kind sanity checks
# run: make kind-sanity

vagrant:
name: Vagrant sanity
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Vagrant
run: |
brew install vagrant
vagrant up --version

- name: Install Libvirt
run: |
brew install libvirt
vagrant plugin install vagrant-libvirt

- name: Vagrant sanity checks
run: make vagrant-sanity
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ vagrant-up:

vagrant-down:
vagrant destroy -f

vagrant-sanity:
make vagrant-up vagrant-down
10 changes: 9 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# - https://www.itwonderlab.com/en/ansible-kubernetes-vagrant-tutorial/
# - https://www.tigera.io/learn/guides/kubernetes-networking/kubernetes-cni/
# - https://kubevious.io/blog/post/comparing-kubernetes-container-network-interface-cni-providers
# - https://github.com/actions/virtual-environments/issues/2999
# - https://github.com/actions/virtual-environments/issues/433
# - https://github.com/actions/virtual-environments/issues/183
# - https://blog.wikichoon.com/2016/01/qemusystem-vs-qemusession.html

N = 2
NET = "192.168.56"
Expand All @@ -21,6 +25,9 @@ Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt|
libvirt.cpus = 2
libvirt.memory = 4096

libvirt.uri = "qemu:///session"
libvirt.driver = "qemu"
end

config.vm.synced_folder ".", "/vagrant", disabled: true
Expand All @@ -32,7 +39,8 @@ Vagrant.configure("2") do |config|
config.vm.define "node-#{i}" do |node|
node_ip = "#{NET}.#{100 + i}"

node.vm.network "private_network", ip: node_ip
#node.vm.network "private_network", ip: node_ip
node.vm.network "public_network", :type => "user"
node.vm.hostname = "node-#{i}"

node.vm.provision "ansible" do |ansible|
Expand Down