Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -47,4 +47,21 @@ Vagrant.configure("2") do |config|
libvirt.memory = 2048
end
end

# Load user-local box definitions from boxes.yaml (gitignored)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminds me we should clean up the gitignore as it has some forklift-isms.

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
19 changes: 19 additions & 0 deletions docs/developer/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down