e74a84f4eb
OpenStack Infra has jobs to run this on both Ubuntu Trusty and OS7. * Add minitest to Gemfile (dependency to run beaker on centos - see http://projects.theforeman.org/issues/2650 for details) * separate nodepool files to have trusty & centos7 support in OS * infra * spec: add case for repo configuration and support RH systems. * rabbitmq: install module from source * apt: pin the module * configure device_driver for LBaaS (update in Kilo) Change-Id: If6c724243ba2e4932b1121b7b7f148d8b5a3f187 Closes-bug: #1444736
142 lines
4.4 KiB
Ruby
142 lines
4.4 KiB
Ruby
require 'spec_helper_acceptance'
|
|
|
|
describe 'basic neutron' do
|
|
|
|
context 'default parameters' do
|
|
|
|
it 'should work with no errors' do
|
|
pp= <<-EOS
|
|
Exec { logoutput => 'on_failure' }
|
|
|
|
# Common resources
|
|
case $::osfamily {
|
|
'Debian': {
|
|
include ::apt
|
|
class { '::openstack_extras::repo::debian::ubuntu':
|
|
release => 'kilo',
|
|
package_require => true,
|
|
}
|
|
$package_provider = 'apt'
|
|
}
|
|
'RedHat': {
|
|
class { '::openstack_extras::repo::redhat::redhat':
|
|
# Kilo is not GA yet, so let's use the testing repo
|
|
manage_rdo => false,
|
|
repo_hash => {
|
|
'rdo-kilo-testing' => {
|
|
'baseurl' => 'https://repos.fedorapeople.org/repos/openstack/openstack-kilo/testing/el7/',
|
|
# packages are not GA so not signed
|
|
'gpgcheck' => '0',
|
|
'priority' => 97,
|
|
},
|
|
},
|
|
}
|
|
$package_provider = 'yum'
|
|
}
|
|
default: {
|
|
fail("Unsupported osfamily (${::osfamily})")
|
|
}
|
|
}
|
|
|
|
class { '::mysql::server': }
|
|
|
|
class { '::rabbitmq':
|
|
delete_guest_user => true,
|
|
erlang_cookie => 'secrete',
|
|
package_provider => $package_provider,
|
|
}
|
|
|
|
rabbitmq_vhost { '/':
|
|
provider => 'rabbitmqctl',
|
|
require => Class['rabbitmq'],
|
|
}
|
|
|
|
rabbitmq_user { 'neutron':
|
|
admin => true,
|
|
password => 'an_even_bigger_secret',
|
|
provider => 'rabbitmqctl',
|
|
require => Class['rabbitmq'],
|
|
}
|
|
|
|
rabbitmq_user_permissions { 'neutron@/':
|
|
configure_permission => '.*',
|
|
write_permission => '.*',
|
|
read_permission => '.*',
|
|
provider => 'rabbitmqctl',
|
|
require => Class['rabbitmq'],
|
|
}
|
|
|
|
# Keystone resources, needed by Neutron to run
|
|
class { '::keystone::db::mysql':
|
|
password => 'keystone',
|
|
}
|
|
class { '::keystone':
|
|
verbose => true,
|
|
debug => true,
|
|
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
|
|
admin_token => 'admin_token',
|
|
enabled => true,
|
|
}
|
|
class { '::keystone::roles::admin':
|
|
email => 'test@example.tld',
|
|
password => 'a_big_secret',
|
|
}
|
|
class { '::keystone::endpoint':
|
|
public_url => "https://${::fqdn}:5000/",
|
|
admin_url => "https://${::fqdn}:35357/",
|
|
}
|
|
|
|
# Neutron resources
|
|
class { '::neutron':
|
|
rabbit_user => 'neutron',
|
|
rabbit_password => 'an_even_bigger_secret',
|
|
rabbit_host => '127.0.0.1',
|
|
allow_overlapping_ips => true,
|
|
core_plugin => 'ml2',
|
|
service_plugins => [
|
|
'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin',
|
|
'neutron.services.loadbalancer.plugin.LoadBalancerPlugin',
|
|
'neutron.services.metering.metering_plugin.MeteringPlugin',
|
|
],
|
|
}
|
|
class { '::neutron::db::mysql':
|
|
password => 'a_big_secret',
|
|
}
|
|
class { '::neutron::keystone::auth':
|
|
password => 'a_big_secret',
|
|
}
|
|
class { '::neutron::server':
|
|
database_connection => 'mysql://neutron:a_big_secret@127.0.0.1/neutron?charset=utf8',
|
|
auth_password => 'a_big_secret',
|
|
identity_uri => 'http://127.0.0.1:35357/',
|
|
sync_db => true,
|
|
}
|
|
class { '::neutron::client': }
|
|
class { '::neutron::quota': }
|
|
class { '::neutron::agents::dhcp': }
|
|
class { '::neutron::agents::l3': }
|
|
class { '::neutron::agents::lbaas':
|
|
device_driver => 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver',
|
|
}
|
|
class { '::neutron::agents::metering': }
|
|
class { '::neutron::agents::ml2::ovs':
|
|
enable_tunneling => true,
|
|
local_ip => '127.0.0.1',
|
|
tunnel_types => ['vxlan'],
|
|
}
|
|
class { '::neutron::plugins::ml2':
|
|
type_drivers => ['vxlan'],
|
|
tenant_network_types => ['vxlan'],
|
|
mechanism_drivers => ['openvswitch']
|
|
}
|
|
EOS
|
|
|
|
|
|
# Run it twice and test for idempotency
|
|
apply_manifest(pp, :catch_failures => true)
|
|
apply_manifest(pp, :catch_changes => true)
|
|
end
|
|
|
|
end
|
|
end
|