diff --git a/allinone.rb b/allinone.rb index 538503d..8460e04 100644 --- a/allinone.rb +++ b/allinone.rb @@ -1,5 +1,18 @@ require 'chef/provisioning' +default_bridge = '["en0: USB Ethernet","en0: Wi-Fi (AirPort)",' +default_bridge += '["en1: USB Ethernet","en1: Wi-Fi (AirPort)",' +default_bridge += '["en2: USB Ethernet","en2: Wi-Fi (AirPort)",' +default_bridge += '["en3: USB Ethernet","en4: USB Ethernet"' +default_bridge += '"eth0","wlan0",' +default_bridge += '"Intel(R) Centrino(R) Advanced-N 6205"]' + +if ENV['OS_BRIDGE'] + bridge = "\"#{ENV['OS_BRIDGE']}\"" +else + bridge = default_bridge +end + controller_config = <<-ENDCONFIG config.vm.network "forwarded_port", guest: 443, host: 9443 config.vm.network "forwarded_port", guest: 4002, host: 4002 @@ -15,15 +28,7 @@ controller_config = <<-ENDCONFIG v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] end config.vm.network "public_network", - bridge: ["en0: USB Ethernet", - "en1: USB Ethernet", - "en2: USB Ethernet", - "en3: USB Ethernet", - "en4: USB Ethernet", - "en0: Wi-Fi (AirPort)", - "en1: Wi-Fi (AirPort)", - "en2: Wi-Fi (AirPort)", - "Intel(R) Centrino(R) Advanced-N 6205"] + bridge: #{bridge} ENDCONFIG env = 'allinone-ubuntu14' diff --git a/doc/allinone.md b/doc/allinone.md index 1516008..ebbe1ce 100644 --- a/doc/allinone.md +++ b/doc/allinone.md @@ -8,9 +8,13 @@ Changes need to be made to the allinone.rb file. ### Device interface -The device interface must be is specified by name in the aio-neutron.rb file. -There is one place to change, look for `bridge: [....]`. If your interface is not in the list, add it. -This is because of OVS needing to slurp up an adapter for internet access. +OVS needs to bridge in an adaptor for internet access. An attempt +has been made to work out of the box, however it is quite probable +you'll need to specify the bridge to use. You can set the environment +variable `OS_BRIDGE` before running the vagrant command to set it. + +For example on my Ubuntu laptop I run `export OS_BRIDGE=eth0` before +running the rake commands. Note: To see a list of virtualbox network interface names use: `$ vboxmanage list bridgedifs`