improve docs and user experience for setting vagrant bridge
bridge interface can now be overriden using an environment variable but will try common interface names if not entered. Change-Id: I11cbac1044dc493ba20a8ae7fb300545c12df73f
This commit is contained in:
parent
481af2f96a
commit
b41e6d6e89
23
allinone.rb
23
allinone.rb
@ -1,5 +1,18 @@
|
|||||||
require 'chef/provisioning'
|
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
|
controller_config = <<-ENDCONFIG
|
||||||
config.vm.network "forwarded_port", guest: 443, host: 9443
|
config.vm.network "forwarded_port", guest: 443, host: 9443
|
||||||
config.vm.network "forwarded_port", guest: 4002, host: 4002
|
config.vm.network "forwarded_port", guest: 4002, host: 4002
|
||||||
@ -15,15 +28,7 @@ controller_config = <<-ENDCONFIG
|
|||||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||||
end
|
end
|
||||||
config.vm.network "public_network",
|
config.vm.network "public_network",
|
||||||
bridge: ["en0: USB Ethernet",
|
bridge: #{bridge}
|
||||||
"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"]
|
|
||||||
ENDCONFIG
|
ENDCONFIG
|
||||||
|
|
||||||
env = 'allinone-ubuntu14'
|
env = 'allinone-ubuntu14'
|
||||||
|
@ -8,9 +8,13 @@ Changes need to be made to the allinone.rb file.
|
|||||||
|
|
||||||
### Device interface
|
### Device interface
|
||||||
|
|
||||||
The device interface must be is specified by name in the aio-neutron.rb file.
|
OVS needs to bridge in an adaptor for internet access. An attempt
|
||||||
There is one place to change, look for `bridge: [....]`. If your interface is not in the list, add it.
|
has been made to work out of the box, however it is quite probable
|
||||||
This is because of OVS needing to slurp up an adapter for internet access.
|
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:
|
Note: To see a list of virtualbox network interface names use:
|
||||||
`$ vboxmanage list bridgedifs`
|
`$ vboxmanage list bridgedifs`
|
||||||
|
Loading…
Reference in New Issue
Block a user