From 655dfb06d31b04752009a92711433500f795205d Mon Sep 17 00:00:00 2001 From: Maciej Sypien Date: Sun, 22 Sep 2024 17:16:05 +0200 Subject: [PATCH] wip: test vagrant locally on macOS --- .gitignore | 6 ++++++ README.md | 14 ++++++++++++++ Vagrantfile | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index bdf0598..5f5c1ba 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,9 @@ uncommited/ # macOS **/.DS_Store + +# vagrant +.vagrant/ + +# logs +**/*.log diff --git a/README.md b/README.md index ff5426d..a8dff17 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,20 @@ To keep the files clean we use few program to help us achieve it: 2. Markdown (prettier/prettierd) 3. Shell (shellcheck, shfmt) +## Tests + +local requires Vagrant + +Example setup of for macOS: + +- `brew` not yet support virtualbox@7.1 -> install from [virtualbox page](https://www.virtualbox.org/wiki/Downloads). + +```bash +vagrant init hashicorp/bionic64 +vagrant box add hashicorp/bionic64 +vagrant up +``` + ## License GPLv3 - Maciej Sypień diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..019e5aa --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,32 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# All Vagrant configuration is done below. The "2" in Vagrant.configure +# configures the configuration version (we support older styles for +# backwards compatibility). Please don't change it unless you know what +# you're doing. +Vagrant.configure("2") do |config| + # config.vm.box = "hashicorp/bionic64" + # config.vm.box = "ubuntu/jammy64" + # config.vm.box_version = "1.0.282" + config.vm.box = "teak/bullseye_arm64" + + config.vm.provider "virtualbox" do |vb| + # display the virtualbox gui when booting the machine + vb.gui = true + + # customize the amount of memory on the vm: + vb.memory = "1024" + + # custom CPU + vb.cpus = 6 + end + + # Enable provisioning with a shell script. Additional provisioners such as + # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the + # documentation for more information about their specific syntax and use. + config.vm.provision "shell", inline: <<-SHELL + apt-get update + apt-get install -y tmux git + SHELL +end