Skip to content
Open
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
18 changes: 9 additions & 9 deletions ansible/inventory/vagrant.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ansible inventory for vagrant-qemu VMs
# Ansible inventory for VirtualBox VMs
# This inventory is used when provisioning via 'vagrant provision'
# or when running Ansible directly against Vagrant VMs
#
Expand All @@ -14,41 +14,41 @@ all:
ansible_python_interpreter: /usr/bin/python3

# DevStack Core integration
devstack_host: 192.168.64.1
devstack_host: 192.168.56.1
vault_addr: "http://{{ devstack_host }}:8200"
postgres_host: "{{ devstack_host }}"
redis_host: "{{ devstack_host }}"
rabbitmq_host: "{{ devstack_host }}"

# Domain configuration
domain: sip.local
internal_gateway: 192.168.64.1
internal_gateway: 192.168.56.1

children:
voip:
children:
sip_proxies:
hosts:
sip-1:
ansible_host: 192.168.64.10
internal_ip: 192.168.64.10
ansible_host: 192.168.56.10
internal_ip: 192.168.56.10
has_external_interface: true
opensips_enabled: true
kamailio_enabled: false

media_servers:
hosts:
media-1:
ansible_host: 192.168.64.20
internal_ip: 192.168.64.20
ansible_host: 192.168.56.20
internal_ip: 192.168.56.20
has_external_interface: true
rtpengine_enabled: true

pbx:
hosts:
pbx-1:
ansible_host: 192.168.64.30
internal_ip: 192.168.64.30
ansible_host: 192.168.56.30
internal_ip: 192.168.56.30
has_external_interface: false
asterisk_enabled: true
freeswitch_enabled: false
18 changes: 17 additions & 1 deletion archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,26 @@

This directory contains legacy implementations that have been superseded by newer approaches.

## vagrant-failed/

**Archived**: 2025-12-30
**Replaced by**: Multipass (`scripts/multipass-vms.sh`)

The Vagrant approach failed on Apple Silicon due to:
1. **vagrant-qemu**: VMs boot but SSH never connects (cloud-init hangs)
2. **VirtualBox**: No ARM64 boxes available (x86 only)
3. **VMware**: Requires paid software

### Lesson Learned

Vagrant's ARM64 ecosystem is immature. Use native tools like Multipass instead.

---

## libvirt-legacy/

**Archived**: 2025-12-30
**Replaced by**: `vagrant/` directory with vagrant-qemu
**Replaced by**: Multipass (`scripts/multipass-vms.sh`)

The libvirt implementation was the original VM infrastructure using:
- libvirt/QEMU with socket_vmnet for networking
Expand Down
File renamed without changes.
67 changes: 36 additions & 31 deletions vagrant/Vagrantfile → archive/vagrant-failed/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
#
# voip-stack Vagrantfile
#
# Creates 3 VMs for VoIP infrastructure using vagrant-qemu on Apple Silicon:
# - sip-1: OpenSIPS SIP Proxy (192.168.64.10)
# - pbx-1: Asterisk PBX (192.168.64.30)
# - media-1: RTPEngine Media Proxy (192.168.64.20)
# Creates 3 VMs for VoIP infrastructure using VirtualBox on Apple Silicon:
# - sip-1: OpenSIPS SIP Proxy (192.168.56.10)
# - pbx-1: Asterisk PBX (192.168.56.30)
# - media-1: RTPEngine Media Proxy (192.168.56.20)
#
# Prerequisites:
# brew install qemu
# brew install --cask virtualbox
# brew install --cask vagrant
# vagrant plugin install vagrant-qemu
#
# Usage:
# vagrant up # Start all VMs
Expand All @@ -27,14 +26,13 @@
Vagrant.require_version ">= 2.3.0"

# VM Configuration
# Using generic boxes which support multiple providers including VirtualBox
VM_BOX = "generic/debian12"
VM_BOX_VERSION = "4.3.12"
VM_BOX_VERSION = ">= 0"

# Network Configuration
# Note: vagrant-qemu uses QEMU's user-mode networking by default
# We configure private_network for VM-to-VM and host-to-VM communication
NETWORK_PREFIX = "192.168.64"
GATEWAY = "192.168.64.1"
# VirtualBox uses 192.168.56.0/24 for host-only networking by default
NETWORK_PREFIX = "192.168.56"

# VM Definitions
VMS = {
Expand Down Expand Up @@ -64,14 +62,18 @@ VMS = {
}
}

# DevStack Core host IP (Mac host running Docker services)
DEVSTACK_HOST = "192.168.64.1"
# DevStack Core host IP (Mac host - accessible via host-only network)
# VirtualBox host-only adapter makes host available at 192.168.56.1
DEVSTACK_HOST = "192.168.56.1"

Vagrant.configure("2") do |config|
# Common box configuration
config.vm.box = VM_BOX
config.vm.box_version = VM_BOX_VERSION

# Default to VirtualBox provider
config.vm.provider "virtualbox"

# SSH configuration
config.ssh.insert_key = true
config.ssh.forward_agent = true
Expand All @@ -84,28 +86,31 @@ Vagrant.configure("2") do |config|
config.vm.define vm_name do |vm|
vm.vm.hostname = vm_name

# Private network for VM communication
# Private network for VM communication (host-only)
vm.vm.network "private_network",
ip: vm_config[:ip],
netmask: "255.255.255.0"

# QEMU provider configuration
vm.vm.provider "qemu" do |qe|
qe.memory = vm_config[:memory].to_s
qe.smp = vm_config[:cpus].to_s
qe.arch = "aarch64"
qe.machine = "virt,accel=hvf,highmem=on"
qe.cpu = "host"
qe.net_device = "virtio-net-pci"

# Extra QEMU arguments for Apple Silicon optimization
qe.extra_qemu_args = %w(
-cpu host
-smp 2,sockets=1,cores=2,threads=1
)

# Enable serial console for debugging
qe.extra_qemu_args += %w(-serial mon:stdio) if ENV['VAGRANT_DEBUG']
# VirtualBox provider configuration
vm.vm.provider "virtualbox" do |vb|
vb.name = "voip-#{vm_name}"
vb.memory = vm_config[:memory]
vb.cpus = vm_config[:cpus]

# Performance optimizations
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]

# Disable audio and USB for server VMs
vb.customize ["modifyvm", :id, "--audio", "none"]
vb.customize ["modifyvm", :id, "--usb", "off"]

# Don't display VirtualBox GUI
vb.gui = false

# Link clone for faster VM creation
vb.linked_clone = true
end

# VM-specific provisioning message
Expand Down
Loading