feat(Initial commit): Add minimal Vagrant configuration and idea

This commit is contained in:
Tanguy Herbron 2023-10-22 00:22:23 +02:00
commit 89dd98738b
3 changed files with 48 additions and 0 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# Homelab
## TODO
- Write start script
- Write stop script
- Add Makefile for easy control
## Script
- Detect WSL or Linux
- Detect default network interface
- Inject network interface
- Gather IPs (vagrant ssh-config)
- Deploy Ansible playbook
- Download kubeconfig
- Ping cluster (kubectl get nodes)

25
Vagrantfile vendored Normal file
View File

@ -0,0 +1,25 @@
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.provision :shell, path: "https://git.halis.io/athens-school/ISO-repository/raw/branch/master/quick-installer.sh", run: "always"
config.vm.network "public_network", bridge: "Intel(R) I211 Gigabit Network Connection"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 1
end
(1..3).each do |i|
config.vm.define "hb-slim-#{i}"
end
(1..2).each do |i|
config.vm.define "hb-wide-#{i}" do |wide|
wide.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
end
end
end
end

8
start.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# Check if running environment is WSL
if [ -f /proc/sys/fs/binfmt_misc/WSLInterop ]; then
bridges=$(VBoxManage.exe list bridgedifs | grep ^Name: -A 11)
echo $bridges
fi