Merge "Bump puppet-nova module"

This commit is contained in:
Jenkins 2016-02-16 11:35:03 +00:00 committed by Gerrit Code Review
commit d943955d06
14 changed files with 108 additions and 49 deletions

View File

@ -109,7 +109,7 @@ mod 'neutron',
# Pull in puppet-nova
mod 'nova',
:git => 'https://github.com/fuel-infra/puppet-nova.git',
:ref => '8.0.0-rc1'
:ref => '8.0.0-rc2'
# Pull in puppet-heat
mod 'heat',

View File

@ -13,7 +13,12 @@
# [keystone_admin_token] Admin token for keystone.
# [glance_db_password] Glance DB password.
# [glance_user_password] Glance service user password.
# [nova_db_user] Nova DB user
# [nova_db_dbname] Nova DB name
# [nova_api_db_user] Nova API DB user
# [nova_api_db_dbname] Nova API DB name
# [nova_db_password] Nova DB password.
# [nova_api_db_password] Nova API DB password.
# [nova_user] Nova service user.
# [nova_user_password] Nova service password.
# [nova_user_tenant] Nova service tenant.
@ -70,6 +75,7 @@
# glance_user_password => 'changeme',
# nova_db_password => 'changeme',
# nova_user_password => 'changeme',
# nova_api_db_password => 'changeme',
# secret_key => 'dummy_secret_key',
# }
#
@ -162,6 +168,9 @@ class openstack::controller (
# Nova
$nova_db_user = 'nova',
$nova_db_dbname = 'nova',
$nova_api_db_user = 'nova_api',
$nova_api_db_dbname = 'nova_api',
$nova_api_db_password = 'nova_api_pass',
$purge_nova_config = false,
$nova_report_interval = '10',
$nova_service_down_time = '60',
@ -289,6 +298,9 @@ class openstack::controller (
nova_db_password => $nova_db_password,
nova_db_user => $nova_db_user,
nova_db_dbname => $nova_db_dbname,
nova_api_db_user => $nova_api_db_user,
nova_api_db_dbname => $nova_api_db_dbname,
nova_api_db_password => $nova_api_db_password,
nova_quota_driver => $nova_quota_driver,
nova_hash => $nova_hash,
# RPC

View File

@ -11,11 +11,12 @@
# === Examples
#
# class { 'openstack::nova::controller':
# public_address => '192.168.1.1',
# db_host => '127.0.0.1',
# amqp_password => 'changeme',
# nova_user_password => 'changeme',
# nova_db_password => 'changeme',
# public_address => '192.168.1.1',
# db_host => '127.0.0.1',
# amqp_password => 'changeme',
# nova_user_password => 'changeme',
# nova_db_password => 'changeme',
# nova_api_db_password => 'changeme',
# }
#
@ -29,6 +30,7 @@ class openstack::nova::controller (
# Nova Required
$nova_user_password,
$nova_db_password,
$nova_api_db_password,
$nova_hash = {},
$primary_controller = false,
$ha_mode = false,
@ -55,6 +57,8 @@ class openstack::nova::controller (
$nova_user_tenant = 'services',
$nova_db_user = 'nova',
$nova_db_dbname = 'nova',
$nova_api_db_user = 'nova_api',
$nova_api_db_dbname = 'nova_api',
# RPC
# FIXME(bogdando) replace queue_provider for rpc_backend once all modules synced with upstream
$rpc_backend = 'nova.openstack.common.rpc.impl_kombu',
@ -126,6 +130,14 @@ class openstack::nova::controller (
'password' => $nova_db_password,
'extra' => $extra_params
})
$api_db_connection = os_database_connection({
'dialect' => $db_type,
'host' => $db_host,
'database' => $nova_api_db_dbname,
'username' => $nova_api_db_user,
'password' => $nova_api_db_password,
'extra' => $extra_params
})
}
}
@ -205,30 +217,31 @@ class openstack::nova::controller (
}
class { 'nova':
install_utilities => false,
database_connection => $sql_connection,
rpc_backend => $rpc_backend,
install_utilities => false,
database_connection => $sql_connection,
api_database_connection => $api_db_connection,
rpc_backend => $rpc_backend,
#FIXME(bogdando) we have to split amqp_hosts until all modules synced
rabbit_hosts => split($amqp_hosts, ','),
rabbit_userid => $amqp_user,
rabbit_password => $amqp_password,
kombu_reconnect_delay => '5.0',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => $glance_connection,
verbose => $verbose,
debug => $debug,
ensure_package => $ensure_package,
log_facility => $syslog_log_facility,
use_syslog => $use_syslog,
use_stderr => $use_stderr,
database_idle_timeout => $idle_timeout,
report_interval => $nova_report_interval,
service_down_time => $nova_service_down_time,
notify_on_state_change => $notify_on_state_change,
notify_api_faults => $nova_hash['notify_api_faults'],
notification_driver => $notification_driver,
memcached_servers => $memcached_addresses,
cinder_catalog_info => pick($nova_hash['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'),
rabbit_hosts => split($amqp_hosts, ','),
rabbit_userid => $amqp_user,
rabbit_password => $amqp_password,
kombu_reconnect_delay => '5.0',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => $glance_connection,
verbose => $verbose,
debug => $debug,
ensure_package => $ensure_package,
log_facility => $syslog_log_facility,
use_syslog => $use_syslog,
use_stderr => $use_stderr,
database_idle_timeout => $idle_timeout,
report_interval => $nova_report_interval,
service_down_time => $nova_service_down_time,
notify_on_state_change => $notify_on_state_change,
notify_api_faults => $nova_hash['notify_api_faults'],
notification_driver => $notification_driver,
memcached_servers => $memcached_addresses,
cinder_catalog_info => pick($nova_hash['cinder_catalog_info'], 'volumev2:cinderv2:internalURL'),
}
#NOTE(bogdando) exec update-kombu is always undef, so delete?
@ -317,6 +330,7 @@ class openstack::nova::controller (
osapi_compute_workers => $service_workers,
metadata_workers => $service_workers,
sync_db => $primary_controller,
sync_db_api => $primary_controller,
fping_path => $fping_path,
api_paste_config => '/etc/nova/api-paste.ini';
}

View File

@ -12,6 +12,7 @@ describe 'openstack::nova::controller' do
:public_address => '192.168.10.0',
:nova_db_password => 'novapass',
:nova_user_password => 'novauserpass',
:nova_api_db_password => 'novapassapi',
:private_interface => 'enp0s1',
:public_interface => 'enp0s2',
:amqp_hosts => '127.0.0.1:5672',

View File

@ -113,7 +113,7 @@ class { 'nova::compute::ironic':
class { 'nova::network::neutron':
neutron_admin_password => $neutron_config['keystone']['admin_password'],
neutron_url => "http://${neutron_endpoint}:9696",
neutron_admin_auth_url => "${admin_identity_uri}/v2.0",
neutron_admin_auth_url => "${admin_identity_uri}/v3",
}
cs_resource { "p_nova_compute_ironic":

View File

@ -9,12 +9,15 @@ $mysql_root_user = pick($mysql_hash['root_user'], 'root')
$mysql_db_create = pick($mysql_hash['db_create'], true)
$mysql_root_password = $mysql_hash['root_password']
$db_user = pick($nova_hash['db_user'], 'nova')
$db_name = pick($nova_hash['db_name'], 'nova')
$db_password = pick($nova_hash['db_password'], $mysql_root_password)
$db_user = pick($nova_hash['db_user'], 'nova')
$db_name = pick($nova_hash['db_name'], 'nova')
$db_password = pick($nova_hash['db_password'], $mysql_root_password)
$api_db_user = pick($nova_hash['db_user'], 'nova_api')
$api_db_name = pick($nova_hash['db_name'], 'nova_api')
$api_db_password = pick($nova_hash['api_db_password'], $nova_hash['db_password'], $mysql_root_password)
$db_host = pick($nova_hash['db_host'], $database_vip)
$db_create = pick($nova_hash['db_create'], $mysql_db_create)
$db_host = pick($nova_hash['db_host'], $database_vip)
$db_create = pick($nova_hash['db_create'], $mysql_db_create)
$db_root_user = pick($nova_hash['root_user'], $mysql_root_user)
$db_root_password = pick($nova_hash['root_password'], $mysql_root_password)
@ -35,6 +38,13 @@ if $db_create {
allowed_hosts => $allowed_hosts,
}
class { 'nova::db::mysql_api':
user => $api_db_user,
password => $api_db_password,
dbname => $api_db_name,
allowed_hosts => $allowed_hosts,
}
class { 'osnailyfacter::mysql_access':
db_host => $db_host,
db_user => $db_root_user,

View File

@ -65,6 +65,8 @@ if $glance_ssl {
}
$nova_db_user = pick($nova_hash['db_user'], 'nova')
$nova_api_db_user = pick($nova_hash['api_db_user'], 'nova_api')
$nova_api_db_password = pick($nova_hash['api_db_password'], $nova_hash['db_password'], $mysql_root_password)
$keystone_user = pick($nova_hash['user'], 'nova')
$keystone_tenant = pick($nova_hash['tenant'], 'services')
$region = hiera('region', 'RegionOne')
@ -142,7 +144,9 @@ class { '::openstack::controller':
primary_controller => $primary_controller,
novnc_address => $api_bind_address,
nova_db_user => $nova_db_user,
nova_api_db_user => $nova_api_db_user,
nova_db_password => $nova_hash[db_password],
nova_api_db_password => $nova_api_db_password,
nova_user => $keystone_user,
nova_user_password => $nova_hash[user_password],
nova_user_tenant => $keystone_tenant,

View File

@ -18,7 +18,7 @@ if $use_neutron {
$admin_tenant_name = try_get_value($neutron_config, 'keystone/admin_tenant', 'services')
$admin_username = try_get_value($neutron_config, 'keystone/admin_user', 'neutron')
$region_name = hiera('region', 'RegionOne')
$auth_api_version = 'v2.0'
$auth_api_version = 'v3'
$ssl_hash = hiera_hash('use_ssl', {})
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')

View File

@ -11,7 +11,7 @@ if $use_neutron {
$admin_tenant_name = try_get_value($neutron_config, 'keystone/admin_tenant', 'services')
$admin_username = try_get_value($neutron_config, 'keystone/admin_user', 'neutron')
$region_name = hiera('region', 'RegionOne')
$auth_api_version = 'v2.0'
$auth_api_version = 'v3'
$ssl_hash = hiera_hash('use_ssl', {})
$admin_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')

View File

@ -4,10 +4,14 @@ manifest = 'openstack-controller/db.pp'
describe manifest do
shared_examples 'catalog' do
nova_db_user = 'nova'
nova_db_password = Noop.hiera_structure 'nova/db_password'
nova_db_dbname = 'nova'
allowed_hosts = [Noop.hostname,'localhost','127.0.0.1','%']
nova_hash = Noop.hiera_structure 'nova'
nova_db_user = nova_hash.fetch('db_user', 'nova')
nova_db_dbname = nova_hash.fetch('db_name', 'nova')
nova_db_password = nova_hash['db_password']
nova_api_db_user = nova_hash.fetch('api_db_user', 'nova_api')
nova_api_db_dbname = nova_hash.fetch('api_db_name', 'nova_api')
nova_api_db_password = Noop.puppet_function 'pick', nova_hash['api_db_password'], nova_hash['db_password']
allowed_hosts = [Noop.hostname,'localhost','127.0.0.1','%']
it 'should install proper mysql-client' do
if facts[:osfamily] == 'RedHat'
@ -21,9 +25,17 @@ describe manifest do
end
it 'should declare nova::db::mysql class with user,password,dbname' do
should contain_class('nova::db::mysql').with(
'user' => nova_db_user,
'password' => nova_db_password,
'dbname' => nova_db_dbname,
'user' => nova_db_user,
'password' => nova_db_password,
'dbname' => nova_db_dbname,
'allowed_hosts' => allowed_hosts,
)
end
it 'should declare nova::db::mysql_api class with user,password,dbname' do
should contain_class('nova::db::mysql_api').with(
'user' => nova_api_db_user,
'password' => nova_api_db_password,
'dbname' => nova_api_db_dbname,
'allowed_hosts' => allowed_hosts,
)
end

View File

@ -116,7 +116,7 @@ describe manifest do
end
it 'nova config should contain right memcached servers list' do
should contain_nova_config('DEFAULT/memcached_servers').with(
should contain_nova_config('keystone_authtoken/memcached_servers').with(
'value' => memcache_servers,
)
end
@ -237,6 +237,12 @@ describe manifest do
:provider => provider
)
}
it 'should declare class nova::api with sync_db and sync_db_api' do
should contain_class('nova::api').with(
'sync_db' => true,
'sync_db_api' => true,
)
end
end
end # end of shared_examples

View File

@ -79,7 +79,7 @@ describe manifest do
admin_tenant_name = ks.fetch('admin_tenant', 'services')
admin_username = ks.fetch('admin_user', 'neutron')
region_name = Noop.hiera('region', 'RegionOne')
auth_api_version = 'v2.0'
auth_api_version = 'v3'
admin_identity_uri = "http://#{service_endpoint}:35357"
admin_auth_url = "#{admin_identity_uri}/#{auth_api_version}"
neutron_url = "http://#{neutron_endpoint}:9696"
@ -140,7 +140,7 @@ describe manifest do
admin_identity_address = Noop.hiera_structure('use_ssl/keystone_admin_hostname')
neutron_internal_address = Noop.hiera_structure('use_ssl/neutron_internal_hostname')
it { expect(subject).to contain_class('nova::network::neutron').with(
:neutron_admin_auth_url => "https://#{admin_identity_address}:35357/v2.0",
:neutron_admin_auth_url => "https://#{admin_identity_address}:35357/v3",
:neutron_url => "https://#{neutron_internal_address}:9696",
)}
else

View File

@ -18,7 +18,7 @@ describe manifest do
management_vip = Noop.hiera('management_vip')
service_endpoint = Noop.hiera('service_endpoint', management_vip)
neutron_endpoint = Noop.hiera('neutron_endpoint', management_vip)
auth_api_version = 'v2.0'
auth_api_version = 'v3'
admin_identity_uri = "http://#{service_endpoint}:35357"
admin_auth_url = "#{admin_identity_uri}/#{auth_api_version}"
neutron_url = "http://#{neutron_endpoint}:9696"

View File

@ -134,7 +134,7 @@ describe manifest do
)
end
it 'nova config should contain right memcached servers list' do
should contain_nova_config('DEFAULT/memcached_servers').with(
should contain_nova_config('keystone_authtoken/memcached_servers').with(
'value' => memcache_servers,
)
end