Skip to content

Commit

Permalink
More Vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
marius committed May 20, 2024
1 parent ab61194 commit da760d0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ a bunch of convenience functions. Feel free to use all the Ruby you want.
## Usage

```
sudo apt -y install git
sudo apt -y install build-essential git ruby-dev zlib1g-dev
sudo gem install koch
git clone [email protected]:example/machine.git
cd machine
Expand All @@ -41,7 +41,9 @@ sudo koch
## Supported platforms

- Ubuntu 22.04 (amd64)
- Ubuntu 24.04 (amd64)
- Debian 11 (amd64)
- Debian 12 (amd64)

## TODO

Expand Down
23 changes: 19 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ Vagrant.configure("2") do |config|
# boxes at https://vagrantcloud.com/search.
# config.vm.box = "generic/ubuntu2204"

config.vm.provider :libvirt do |libvirt|
libvirt.cpus = 1
libvirt.memory = 1024
# Shared memory is likely needed for virtiofs
libvirt.memorybacking :access, mode: "shared"
end

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
Expand Down Expand Up @@ -45,7 +52,7 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder ".", "/vagrant", nfs_version: 4, nfs_udp: false
config.vm.synced_folder ".", "/vagrant", type: "virtiofs"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
Expand Down Expand Up @@ -74,11 +81,19 @@ Vagrant.configure("2") do |config|
printf -- "---\\nrestic:\\n password: test123\\n" >/etc/secrets.yaml
SHELL

config.vm.define "ubuntu", primary: true do |ubuntu|
config.vm.define "ubuntu2204", primary: true do |ubuntu|
ubuntu.vm.box = "generic/ubuntu2204"
end

config.vm.define "debian" do |debian|
debian.vm.box = "debian/bullseye64"
config.vm.define "ubuntu2404" do |ubuntu|
ubuntu.vm.box = "bento/ubuntu-24.04"
end

config.vm.define "debian11" do |debian|
debian.vm.box = "generic/debian11"
end

config.vm.define "debian12" do |debian|
debian.vm.box = "generic/debian12"
end
end

0 comments on commit da760d0

Please sign in to comment.