Files
inception-of-things/vm/Vagrantfile
2025-12-17 01:27:04 +01:00

35 lines
1.6 KiB
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/bookworm64"
config.vm.network "public_network"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "../", "/home/vagrant/iot", owner: "vagrant", group: "vagrant"
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 4
vb.gui = false
end
config.vm.provision "shell", inline: <<-SHELL
apt update
apt install gnupg git wget curl -y
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | tee /etc/apt/sources.list.d/virtualbox.list
wget -O- -q https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpg
apt update && apt install virtualbox-7.0 -y
usermod -aG vboxusers vagrant
# export _VBVER=$(VBoxManage --version | cut -dr -f1)
# wget https://download.virtualbox.org/virtualbox/$_VBVER/Oracle_VM_VirtualBox_Extension_Pack-$_VBVER.vbox-extpack
# yes | VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$_VBVER.vbox-extpack
#
# wget -O - https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list
# apt update && apt install vagrant -y
SHELL
end