From e91a66eff7e8af91edd93cf8d5c463fee9fdd62b Mon Sep 17 00:00:00 2001 From: ianballou Date: Thu, 7 May 2026 09:27:45 -0400 Subject: [PATCH 1/2] Load boxes.yaml as a way to define custom boxes - Update default disk to 50 GB --- Vagrantfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index da3af4e88..cce0a0cc1 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -26,7 +26,7 @@ Vagrant.configure("2") do |config| override.vm.provider "libvirt" do |libvirt, provider| libvirt.memory = 10240 libvirt.cpus = 4 - libvirt.machine_virtual_size = 30 + libvirt.machine_virtual_size = 50 end end @@ -47,4 +47,21 @@ Vagrant.configure("2") do |config| libvirt.memory = 2048 end end + + # Load user-local box definitions from boxes.yaml (gitignored) + boxes_yaml = File.join(__dir__, 'boxes.yaml') + if File.exist?(boxes_yaml) + user_boxes = YAML.safe_load(File.read(boxes_yaml)) || {} + user_boxes.compact.each do |name, settings| + config.vm.define name do |override| + override.vm.box = settings.fetch('box') { ENV.fetch('FOREMANCTL_BASE_BOX', 'centos/stream9') } + + override.vm.provider "libvirt" do |libvirt, _provider| + libvirt.memory = settings.fetch('memory', 3072) + libvirt.cpus = settings.fetch('cpus', 1) + libvirt.machine_virtual_size = settings.fetch('disk_size', 50) + end + end + end + end end From af44d17b31cb4eb64508291e7d1d0df532bc6106 Mon Sep 17 00:00:00 2001 From: ianballou Date: Tue, 30 Jun 2026 13:34:14 -0400 Subject: [PATCH 2/2] Add some documentation about the use of boxes.yaml --- docs/developer/development-environment.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/developer/development-environment.md b/docs/developer/development-environment.md index 74596e486..f6db26fff 100644 --- a/docs/developer/development-environment.md +++ b/docs/developer/development-environment.md @@ -48,6 +48,25 @@ You can deploy directly to a remote host using the `--target-host` parameter: ./forge deploy-dev --target-host=192.168.1.100 ``` +### Defining New Hosts + +You can define custom hosts in boxes.yaml: + +``` +--- +# User-local box definitions (this file is gitignored) +# Each entry becomes a vagrant box. Available settings: +# box: base box (default: centos/stream9) +# memory: RAM in MB (default: 3072) +# cpus: CPU count (default: 1) +# disk_size: disk in GB (default: 50) + +katello-production: + memory: 12288 + cpus: 4 + disk_size: 50 +``` + ### SSH Authentication When deploying to remote hosts that require SSH password authentication: