Fix interface selection to be automatic
Added a list of possible interfaces for which the vagrant provisioner will choose the first one that is available. No more editing the test recipes. Cleaned up the os selection to hide the version specific stuff to be consistent with the environment logic. Fixed up some file modes. Forced the chef client config directory as it can search in bad places in some scenarios. Change-Id: I38a7a86b58893b912af99fabf04ca9052f914346
This commit is contained in:
committed by
Jan Klare
parent
5d3119c0dd
commit
7fd2cde5a4
0
.chef/encrypted_data_bag_secret
Executable file → Normal file
0
.chef/encrypted_data_bag_secret
Executable file → Normal file
0
.chef/knife.rb
Executable file → Normal file
0
.chef/knife.rb
Executable file → Normal file
15
Rakefile
15
Rakefile
@@ -1,3 +1,6 @@
|
||||
current_dir = File.dirname(__FILE__)
|
||||
client_opts = "--force-formatter -z --config #{current_dir}/.chef/knife.rb"
|
||||
|
||||
task default: ["test"]
|
||||
|
||||
desc "Default gate tests to run"
|
||||
@@ -18,7 +21,7 @@ end
|
||||
|
||||
desc "Destroy machines"
|
||||
task :destroy_machines do
|
||||
run_command('chef-client --force-formatter -z destroy_all.rb')
|
||||
run_command("chef-client #{client_opts} destroy_all.rb")
|
||||
end
|
||||
|
||||
desc "Vendor your cookbooks/"
|
||||
@@ -36,22 +39,22 @@ end
|
||||
|
||||
desc "All-in-One Neutron build"
|
||||
task :aio_neutron => :create_key do
|
||||
run_command('chef-client --force-formatter -z vagrant_linux.rb aio-neutron.rb')
|
||||
run_command("chef-client #{client_opts} vagrant_linux.rb aio-neutron.rb")
|
||||
end
|
||||
|
||||
desc "All-in-One Nova-networking build"
|
||||
task :aio_nova => :create_key do
|
||||
run_command('chef-client --force-formatter -z vagrant_linux.rb aio-nova.rb')
|
||||
run_command("chef-client #{client_opts} vagrant_linux.rb aio-nova.rb")
|
||||
end
|
||||
|
||||
desc "Multi-Neutron build"
|
||||
task :multi_neutron => :create_key do
|
||||
run_command('chef-client --force-formatter -z vagrant_linux.rb multi-neutron.rb')
|
||||
run_command("chef-client #{client_opts} vagrant_linux.rb multi-neutron.rb")
|
||||
end
|
||||
|
||||
desc "Multi-Nova-networking build"
|
||||
task :multi_nova => :create_key do
|
||||
run_command('chef-client --force-formatter -z vagrant_linux.rb multi-nova.rb')
|
||||
run_command("chef-client #{client_opts} vagrant_linux.rb multi-nova.rb")
|
||||
end
|
||||
|
||||
desc "Blow everything away"
|
||||
@@ -157,7 +160,7 @@ task :integration => [:create_key, :berks_vendor] do
|
||||
for i in 1..3
|
||||
puts "####### Pass #{i}"
|
||||
# Kick off chef client in local mode, will converge OpenStack right on the gate job "in place"
|
||||
sh %(sudo chef-client --force-formatter -z -E integration-aio-neutron -r 'role[allinone-compute]','role[os-image-upload]','recipe[openstack-integration-test::setup]')
|
||||
sh %(sudo chef-client #{client_opts} -E integration-aio-neutron -r 'role[allinone-compute]','role[os-image-upload]','recipe[openstack-integration-test::setup]')
|
||||
_setup_local_network if i == 1
|
||||
_run_basic_queries
|
||||
_setup_cinder_volume
|
||||
|
||||
@@ -15,7 +15,15 @@ controller_config = <<-ENDCONFIG
|
||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
end
|
||||
config.vm.network "public_network",
|
||||
bridge: '<put your interface device name here>'
|
||||
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"]
|
||||
ENDCONFIG
|
||||
|
||||
env = 'vagrant-aio-neutron'
|
||||
|
||||
10
aio-nova.rb
10
aio-nova.rb
@@ -15,7 +15,15 @@ controller_config = <<-ENDCONFIG
|
||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
end
|
||||
config.vm.network "public_network",
|
||||
bridge: '<put your interface device name here>'
|
||||
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"]
|
||||
ENDCONFIG
|
||||
|
||||
env = 'vagrant-aio-nova'
|
||||
|
||||
@@ -10,7 +10,9 @@ Changes need to be made to the multi-nova.rb and the environments\vagrant-multi-
|
||||
|
||||
Should be empty. With OVS which is what we support at the moment, OVS requires you not to have an IP associated with the NIC. If you do have DHCP enabled and the machine gains an IP you should delete it via something like: `sudo ip addr del 172.16.100.17/24 dev eth1` where `172.16.100.17` was the DHCP leased address.
|
||||
|
||||
### 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.
|
||||
|
||||
The device interface must be is specified by name in the multi-neutron.rb file.
|
||||
There one place to change, look for `<put your interface device name here>`, this is because of OVS and it needing to slurp up an adapter for internet access.
|
||||
|
||||
@@ -6,8 +6,8 @@ Note: Default operating system is Ubuntu. If you would like CentOS, set env var
|
||||
|
||||
### Device interface
|
||||
|
||||
The device interface must be is specified by name in the multi-nova.rb file.
|
||||
There are is one place to change, look for `<put your interface device name here>`.
|
||||
The device interface must be is specified by name in the aio-nova.rb file.
|
||||
There is one place to change, look for `bridge: [....]`. If your interface is not in the list, add it.
|
||||
This is for an extra network adapter to your network, this is good practise for the
|
||||
more advance setups.
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ For example, on my home network, my laptop has an IP of 192.168.1.xxx, so I set
|
||||
### Device interface
|
||||
|
||||
The device interface must be is specified by name in the multi-nova.rb file.
|
||||
There are two places to change, look for `<put your interface device name here>`.
|
||||
There are two places to change, look for `bridge: [....]`. If your interface is not in the list, add it.
|
||||
|
||||
+ For Windows 7, open the Control Panel, Network and Internet, Network Connections. Look in the Connectivity column for a row with "Internet access", and use the "Device Name". For example, 'Intel(R) Centrino(R) Advanced-N 6205'.
|
||||
+ For Mac, this works from some: 'en0: Wi-Fi (AirPort)'
|
||||
+ For Mac, this works from some: 'en0: Wi-Fi (AirPort)' or 'en3: USB Ethernet'
|
||||
+ For Linux, ...TODO...
|
||||
|
||||
@@ -16,7 +16,15 @@ controller_config = <<-ENDCONFIG
|
||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
end
|
||||
config.vm.network "public_network", ip: "172.16.100.60",
|
||||
bridge: '<put your interface device name here>'
|
||||
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"]
|
||||
ENDCONFIG
|
||||
|
||||
env = 'vagrant-multi-nova'
|
||||
@@ -46,7 +54,15 @@ config.vm.provider "virtualbox" do |v|
|
||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
end
|
||||
config.vm.network "public_network", ip: "172.16.100.#{ip_suff}",
|
||||
bridge: '<put your interface device name here>'
|
||||
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"]
|
||||
ENDCONFIG
|
||||
role 'os-compute-worker'
|
||||
chef_environment env
|
||||
|
||||
0
roles/os-object-storage-setup.json
Executable file → Normal file
0
roles/os-object-storage-setup.json
Executable file → Normal file
@@ -8,7 +8,8 @@ vagrant_box 'ubuntu14' do
|
||||
url 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box'
|
||||
end
|
||||
|
||||
os = ENV['REPO_OS'] || 'ubuntu14'
|
||||
os = 'ubuntu14'
|
||||
os = 'centos7.1' if ENV['REPO_OS'].to_s.include?('centos')
|
||||
|
||||
with_driver "vagrant:#{File.dirname(__FILE__)}/vms"
|
||||
with_machine_options vagrant_options: {
|
||||
|
||||
Reference in New Issue
Block a user