endpoint protocols: flexibility in OpenStack services

Allow some OpenStack services to specify either HTTP or HTTPS to connect
each others.

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi
2014-06-24 00:50:59 +02:00
parent b4e18e6b1e
commit 74e5cbbd58
19 changed files with 141 additions and 111 deletions

View File

@@ -2,7 +2,7 @@ fixtures:
repositories: repositories:
'cinder': 'cinder':
repo: 'git://github.com/enovance/puppet-cinder' repo: 'git://github.com/enovance/puppet-cinder'
ref: '131108aa089fdd66dcd0c46a2acf99c3d21548d7' ref: '9b33d7e1a7b88109e2b85c281534450bc6e53998'
'keystone': 'keystone':
repo: 'git://github.com/enovance/puppet-keystone.git' repo: 'git://github.com/enovance/puppet-keystone.git'
ref: 'cf77bb23c059416b2d00a37f96a339f06d8c1e2c' ref: 'cf77bb23c059416b2d00a37f96a339f06d8c1e2c'
@@ -11,7 +11,7 @@ fixtures:
ref: 'ca16cbf55cfa3d2b62c7a78431fa75aadae97af4' ref: 'ca16cbf55cfa3d2b62c7a78431fa75aadae97af4'
'glance': 'glance':
repo: 'git://github.com/enovance/puppet-glance.git' repo: 'git://github.com/enovance/puppet-glance.git'
ref: '3bf6ea5b3e21a72230cbadf4c8722850f6389bfe' ref: '7f439210b1197efc55ec148074a598b1cb1e3816'
'horizon': 'horizon':
repo: 'git://github.com/enovance/puppet-horizon' repo: 'git://github.com/enovance/puppet-horizon'
ref: '36383e90d1c4013d7989561b00ffcb08c76908de' ref: '36383e90d1c4013d7989561b00ffcb08c76908de'

View File

@@ -22,10 +22,10 @@ mod 'ceilometer',
:ref => '166b00a773bb2830175bd61a451294d757453eb3' :ref => '166b00a773bb2830175bd61a451294d757453eb3'
mod 'cinder', mod 'cinder',
:git => 'git://github.com/enovance/puppet-cinder.git', :git => 'git://github.com/enovance/puppet-cinder.git',
:ref => '131108aa089fdd66dcd0c46a2acf99c3d21548d7' :ref => '9b33d7e1a7b88109e2b85c281534450bc6e53998'
mod 'glance', mod 'glance',
:git => 'git://github.com/enovance/puppet-glance.git', :git => 'git://github.com/enovance/puppet-glance.git',
:ref => '3bf6ea5b3e21a72230cbadf4c8722850f6389bfe' :ref => '7f439210b1197efc55ec148074a598b1cb1e3816'
mod 'heat', mod 'heat',
:git => 'git://github.com/enovance/puppet-heat.git', :git => 'git://github.com/enovance/puppet-heat.git',
:ref => '025b8cb830d7fa476c4ab1a0b0228b88b5ba10c3' :ref => '025b8cb830d7fa476c4ab1a0b0228b88b5ba10c3'

View File

@@ -69,23 +69,24 @@
# #
class cloud::compute( class cloud::compute(
$nova_db_host = '127.0.0.1', $nova_db_host = '127.0.0.1',
$nova_db_user = 'nova', $nova_db_user = 'nova',
$nova_db_password = 'novapassword', $nova_db_password = 'novapassword',
$rabbit_hosts = ['127.0.0.1:5672'], $rabbit_hosts = ['127.0.0.1:5672'],
$rabbit_password = 'rabbitpassword', $rabbit_password = 'rabbitpassword',
$ks_glance_internal_host = '127.0.0.1', $ks_glance_internal_host = '127.0.0.1',
$glance_api_port = 9292, $ks_glance_internal_proto = 'http',
$verbose = true, $glance_api_port = 9292,
$debug = true, $verbose = true,
$use_syslog = true, $debug = true,
$log_facility = 'LOG_LOCAL0', $use_syslog = true,
$neutron_endpoint = '127.0.0.1', $log_facility = 'LOG_LOCAL0',
$neutron_protocol = 'http', $neutron_endpoint = '127.0.0.1',
$neutron_password = 'neutronpassword', $neutron_protocol = 'http',
$neutron_region_name = 'RegionOne', $neutron_password = 'neutronpassword',
$memcache_servers = ['127.0.0.1:11211'], $neutron_region_name = 'RegionOne',
$availability_zone = 'RegionOne' $memcache_servers = ['127.0.0.1:11211'],
$availability_zone = 'RegionOne'
) { ) {
if !defined(Resource['nova_config']) { if !defined(Resource['nova_config']) {
@@ -109,7 +110,7 @@ class cloud::compute(
rabbit_userid => 'nova', rabbit_userid => 'nova',
rabbit_hosts => $rabbit_hosts, rabbit_hosts => $rabbit_hosts,
rabbit_password => $rabbit_password, rabbit_password => $rabbit_password,
glance_api_servers => "http://${ks_glance_internal_host}:${glance_api_port}", glance_api_servers => "${ks_glance_internal_proto}://${ks_glance_internal_host}:${glance_api_port}",
memcached_servers => $memcache_servers, memcached_servers => $memcache_servers,
verbose => $verbose, verbose => $verbose,
debug => $debug, debug => $debug,

View File

@@ -18,6 +18,7 @@
class cloud::compute::api( class cloud::compute::api(
$ks_keystone_internal_host = '127.0.0.1', $ks_keystone_internal_host = '127.0.0.1',
$ks_keystone_internal_proto = 'http',
$ks_nova_password = 'novapassword', $ks_nova_password = 'novapassword',
$neutron_metadata_proxy_shared_secret = 'metadatapassword', $neutron_metadata_proxy_shared_secret = 'metadatapassword',
$api_eth = '127.0.0.1', $api_eth = '127.0.0.1',
@@ -31,6 +32,7 @@ class cloud::compute::api(
class { 'nova::api': class { 'nova::api':
enabled => true, enabled => true,
auth_host => $ks_keystone_internal_host, auth_host => $ks_keystone_internal_host,
auth_protocol => $ks_keystone_internal_proto,
admin_password => $ks_nova_password, admin_password => $ks_nova_password,
api_bind_address => $api_eth, api_bind_address => $api_eth,
metadata_listen => $api_eth, metadata_listen => $api_eth,

View File

@@ -69,24 +69,26 @@
# #
class cloud::image::api( class cloud::image::api(
$glance_db_host = '127.0.0.1', $glance_db_host = '127.0.0.1',
$glance_db_user = 'glance', $glance_db_user = 'glance',
$glance_db_password = 'glancepassword', $glance_db_password = 'glancepassword',
$ks_keystone_internal_host = '127.0.0.1', $ks_keystone_internal_host = '127.0.0.1',
$ks_glance_internal_host = '127.0.0.1', $ks_keystone_internal_proto = 'http',
$ks_glance_api_internal_port = '9292', $ks_glance_internal_host = '127.0.0.1',
$ks_glance_registry_internal_port = '9191', $ks_glance_api_internal_port = '9292',
$ks_glance_password = 'glancepassword', $ks_glance_registry_internal_port = '9191',
$rabbit_password = 'rabbit_password', $ks_glance_registry_internal_proto = 'http',
$rabbit_host = '127.0.0.1', $ks_glance_password = 'glancepassword',
$api_eth = '127.0.0.1', $rabbit_password = 'rabbit_password',
$openstack_vip = '127.0.0.1', $rabbit_host = '127.0.0.1',
$glance_rbd_pool = 'images', $api_eth = '127.0.0.1',
$glance_rbd_user = 'glance', $openstack_vip = '127.0.0.1',
$verbose = true, $glance_rbd_pool = 'images',
$debug = true, $glance_rbd_user = 'glance',
$log_facility = 'LOG_LOCAL0', $verbose = true,
$use_syslog = true $debug = true,
$log_facility = 'LOG_LOCAL0',
$use_syslog = true
) { ) {
# Disable twice logging if syslog is enabled # Disable twice logging if syslog is enabled
@@ -104,22 +106,24 @@ class cloud::image::api(
$encoded_glance_password = uriescape($glance_db_password) $encoded_glance_password = uriescape($glance_db_password)
class { 'glance::api': class { 'glance::api':
database_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance?charset=utf8", database_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance?charset=utf8",
registry_host => $openstack_vip, registry_host => $openstack_vip,
registry_port => $ks_glance_registry_internal_port, registry_port => $ks_glance_registry_internal_port,
verbose => $verbose, verbose => $verbose,
debug => $debug, debug => $debug,
auth_host => $ks_keystone_internal_host, auth_host => $ks_keystone_internal_host,
keystone_password => $ks_glance_password, auth_protocol => $ks_keystone_internal_proto,
keystone_tenant => 'services', registry_client_protocol => $ks_glance_registry_internal_proto,
keystone_user => 'glance', keystone_password => $ks_glance_password,
show_image_direct_url => true, keystone_tenant => 'services',
log_dir => $log_dir, keystone_user => 'glance',
log_file => $log_file_api, show_image_direct_url => true,
log_facility => $log_facility, log_dir => $log_dir,
bind_host => $api_eth, log_file => $log_file_api,
bind_port => $ks_glance_api_internal_port, log_facility => $log_facility,
use_syslog => $use_syslog, bind_host => $api_eth,
bind_port => $ks_glance_api_internal_port,
use_syslog => $use_syslog,
} }
# TODO(EmilienM) Disabled for now # TODO(EmilienM) Disabled for now
@@ -131,7 +135,7 @@ class cloud::image::api(
# rabbit_host => $rabbit_host, # rabbit_host => $rabbit_host,
# } # }
glance_api_config { glance_api_config {
'DEFAULT/notifier_driver': value => 'noop'; 'DEFAULT/notifier_driver': value => 'noop';
} }
class { 'glance::backend::rbd': class { 'glance::backend::rbd':

View File

@@ -61,6 +61,7 @@ class cloud::image::registry(
$glance_db_user = 'glance', $glance_db_user = 'glance',
$glance_db_password = 'glancepassword', $glance_db_password = 'glancepassword',
$ks_keystone_internal_host = '127.0.0.1', $ks_keystone_internal_host = '127.0.0.1',
$ks_keystone_internal_proto = 'http',
$ks_glance_internal_host = '127.0.0.1', $ks_glance_internal_host = '127.0.0.1',
$ks_glance_registry_internal_port = '9191', $ks_glance_registry_internal_port = '9191',
$ks_glance_password = 'glancepassword', $ks_glance_password = 'glancepassword',
@@ -90,6 +91,7 @@ class cloud::image::registry(
verbose => $verbose, verbose => $verbose,
debug => $debug, debug => $debug,
auth_host => $ks_keystone_internal_host, auth_host => $ks_keystone_internal_host,
auth_protocol => $ks_keystone_internal_proto,
keystone_password => $ks_glance_password, keystone_password => $ks_glance_password,
keystone_tenant => 'services', keystone_tenant => 'services',
keystone_user => 'glance', keystone_user => 'glance',

View File

@@ -22,6 +22,7 @@ class cloud::network::controller(
$neutron_db_password = 'neutronpassword', $neutron_db_password = 'neutronpassword',
$ks_neutron_password = 'neutronpassword', $ks_neutron_password = 'neutronpassword',
$ks_keystone_admin_host = '127.0.0.1', $ks_keystone_admin_host = '127.0.0.1',
$ks_keystone_admin_proto = 'http',
$ks_keystone_public_port = 5000, $ks_keystone_public_port = 5000,
$ks_neutron_public_port = 9696, $ks_neutron_public_port = 9696,
$api_eth = '127.0.0.1', $api_eth = '127.0.0.1',
@@ -42,6 +43,7 @@ class cloud::network::controller(
class { 'neutron::server': class { 'neutron::server':
auth_password => $ks_neutron_password, auth_password => $ks_neutron_password,
auth_host => $ks_keystone_admin_host, auth_host => $ks_keystone_admin_host,
auth_protocol => $ks_keystone_admin_proto,
auth_port => $ks_keystone_public_port, auth_port => $ks_keystone_public_port,
database_connection => "mysql://${encoded_user}:${encoded_password}@${neutron_db_host}/neutron?charset=utf8", database_connection => "mysql://${encoded_user}:${encoded_password}@${neutron_db_host}/neutron?charset=utf8",
api_workers => $::processorcount, api_workers => $::processorcount,

View File

@@ -27,6 +27,7 @@ class cloud::network::metadata(
$ks_keystone_admin_port = 35357, $ks_keystone_admin_port = 35357,
$ks_keystone_admin_host = '127.0.0.1', $ks_keystone_admin_host = '127.0.0.1',
$auth_region = 'RegionOne', $auth_region = 'RegionOne',
$ks_nova_internal_proto = 'http'
) { ) {
include 'cloud::network' include 'cloud::network'
@@ -42,9 +43,9 @@ class cloud::network::metadata(
metadata_workers => $::processorcount metadata_workers => $::processorcount
} }
# TODO(EmilienM) need to be deleted hen https://review.openstack.org/98633 got merged
neutron_metadata_agent_config { neutron_metadata_agent_config {
'DEFAULT/metadata_backlog': value => '4096'; 'DEFAULT/metadata_backlog': value => '4096';
'DEFAULT/nova_metadata_protocol': value => $ks_nova_internal_proto;
} }
} }

View File

@@ -23,6 +23,8 @@ class cloud::object::controller(
$ks_keystone_internal_port = 5000, $ks_keystone_internal_port = 5000,
$ks_swift_dispersion_password = 'dispersion', $ks_swift_dispersion_password = 'dispersion',
$ks_swift_internal_port = 8080, $ks_swift_internal_port = 8080,
$ks_keystone_internal_proto = 'http',
$ks_keystone_admin_proto = 'http',
$ks_swift_password = 'swiftpassword', $ks_swift_password = 'swiftpassword',
$statsd_host = '127.0.0.1', $statsd_host = '127.0.0.1',
$statsd_port = 4125, $statsd_port = 4125,
@@ -81,6 +83,7 @@ log_statsd_default_sample_rate = 1
admin_password => $ks_swift_password, admin_password => $ks_swift_password,
auth_host => $ks_keystone_admin_host, auth_host => $ks_keystone_admin_host,
auth_port => $ks_keystone_admin_port, auth_port => $ks_keystone_admin_port,
auth_protocol => $ks_keystone_admin_proto,
delay_auth_decision => inline_template('1 delay_auth_decision => inline_template('1
cache = swift.cache') cache = swift.cache')
} }
@@ -90,10 +93,11 @@ cache = swift.cache')
class { 'swift::proxy::s3token': class { 'swift::proxy::s3token':
auth_host => $ks_keystone_admin_host, auth_host => $ks_keystone_admin_host,
auth_port => $ks_keystone_admin_port, auth_port => $ks_keystone_admin_port,
auth_protocol => $ks_keystone_internal_proto
} }
class { 'swift::dispersion': class { 'swift::dispersion':
auth_url => "http://${ks_keystone_internal_host}:${ks_keystone_internal_port}/v2.0", auth_url => "${ks_keystone_internal_proto}://${ks_keystone_internal_host}:${ks_keystone_internal_port}/v2.0",
swift_dir => '/etc/swift', swift_dir => '/etc/swift',
auth_pass => $ks_swift_dispersion_password, auth_pass => $ks_swift_dispersion_password,
endpoint_type => 'internalURL' endpoint_type => 'internalURL'

View File

@@ -92,12 +92,7 @@ class cloud::volume(
log_dir => $log_dir, log_dir => $log_dir,
log_facility => $log_facility, log_facility => $log_facility,
use_syslog => $use_syslog, use_syslog => $use_syslog,
# https://review.openstack.org/#/c/92993/ storage_availability_zone => $storage_availability_zone
# storage_availability_zone => $storage_availability_zone
}
cinder_config {
'DEFAULT/storage_availability_zone': value => $storage_availability_zone
} }
class { 'cinder::ceilometer': } class { 'cinder::ceilometer': }

View File

@@ -20,9 +20,11 @@ class cloud::volume::api(
$ks_cinder_internal_port = 8776, $ks_cinder_internal_port = 8776,
$ks_cinder_password = 'cinderpassword', $ks_cinder_password = 'cinderpassword',
$ks_keystone_internal_host = '127.0.0.1', $ks_keystone_internal_host = '127.0.0.1',
$ks_keystone_internal_proto = 'http',
$ks_glance_internal_host = '127.0.0.1', $ks_glance_internal_host = '127.0.0.1',
$ks_glance_api_internal_port = 9292, $ks_glance_api_internal_port = 9292,
$api_eth = '127.0.0.1', $api_eth = '127.0.0.1',
$ks_glance_internal_proto = 'http',
$default_volume_type = undef, $default_volume_type = undef,
# Maintain backward compatibility for multi-backend # Maintain backward compatibility for multi-backend
$volume_multi_backend = false $volume_multi_backend = false
@@ -41,14 +43,15 @@ class cloud::volume::api(
} }
class { 'cinder::api': class { 'cinder::api':
keystone_password => $ks_cinder_password, keystone_password => $ks_cinder_password,
keystone_auth_host => $ks_keystone_internal_host, keystone_auth_host => $ks_keystone_internal_host,
bind_host => $api_eth, keystone_auth_protocol => $ks_keystone_internal_proto,
default_volume_type => $default_volume_type_real bind_host => $api_eth,
default_volume_type => $default_volume_type_real
} }
class { 'cinder::glance': class { 'cinder::glance':
glance_api_servers => "${ks_glance_internal_host}:${ks_glance_api_internal_port}", glance_api_servers => "${ks_glance_internal_proto}://${ks_glance_internal_host}:${ks_glance_api_internal_port}",
glance_request_timeout => '10', glance_request_timeout => '10',
glance_num_retries => '10' glance_num_retries => '10'
} }

View File

@@ -20,6 +20,7 @@ class cloud::volume::controller(
$ks_cinder_internal_port = 8776, $ks_cinder_internal_port = 8776,
$ks_cinder_password = 'cinderpassword', $ks_cinder_password = 'cinderpassword',
$ks_keystone_internal_host = '127.0.0.1', $ks_keystone_internal_host = '127.0.0.1',
$ks_keystone_internal_proto = 'http',
$ks_glance_internal_host = '127.0.0.1', $ks_glance_internal_host = '127.0.0.1',
$ks_glance_api_internal_port = 9292, $ks_glance_api_internal_port = 9292,
$api_eth = '127.0.0.1', $api_eth = '127.0.0.1',
@@ -37,6 +38,7 @@ class cloud::volume::controller(
ks_cinder_internal_port => $ks_cinder_internal_port, ks_cinder_internal_port => $ks_cinder_internal_port,
ks_cinder_password => $ks_cinder_password, ks_cinder_password => $ks_cinder_password,
ks_keystone_internal_host => $ks_keystone_internal_host, ks_keystone_internal_host => $ks_keystone_internal_host,
ks_keystone_internal_proto => $ks_keystone_internal_proto,
ks_glance_internal_host => $ks_glance_internal_host, ks_glance_internal_host => $ks_glance_internal_host,
ks_glance_api_internal_port => $ks_glance_api_internal_port, ks_glance_api_internal_port => $ks_glance_api_internal_port,
api_eth => $api_eth, api_eth => $api_eth,

View File

@@ -45,6 +45,7 @@ describe 'cloud::compute::api' do
let :params do let :params do
{ :ks_keystone_internal_host => '127.0.0.1', { :ks_keystone_internal_host => '127.0.0.1',
:ks_keystone_internal_proto => 'https',
:ks_nova_password => 'novapassword', :ks_nova_password => 'novapassword',
:api_eth => '127.0.0.1', :api_eth => '127.0.0.1',
:ks_ec2_public_port => '8773', :ks_ec2_public_port => '8773',
@@ -96,6 +97,7 @@ describe 'cloud::compute::api' do
should contain_class('nova::api').with( should contain_class('nova::api').with(
:enabled => true, :enabled => true,
:auth_host => '127.0.0.1', :auth_host => '127.0.0.1',
:auth_protocol => 'https',
:admin_password => 'novapassword', :admin_password => 'novapassword',
:api_bind_address => '127.0.0.1', :api_bind_address => '127.0.0.1',
:metadata_listen => '127.0.0.1', :metadata_listen => '127.0.0.1',

View File

@@ -20,24 +20,26 @@ require 'spec_helper'
describe 'cloud::image::api' do describe 'cloud::image::api' do
let :params do let :params do
{ :glance_db_host => '10.0.0.1', { :glance_db_host => '10.0.0.1',
:glance_db_user => 'glance', :glance_db_user => 'glance',
:glance_db_password => 'secrete', :glance_db_password => 'secrete',
:ks_keystone_internal_host => '10.0.0.1', :ks_keystone_internal_host => '10.0.0.1',
:ks_glance_internal_host => '10.0.0.1', :ks_keystone_internal_proto => 'https',
:openstack_vip => '10.0.0.42', :ks_glance_internal_host => '10.0.0.1',
:ks_glance_api_internal_port => '9292', :openstack_vip => '10.0.0.42',
:ks_glance_registry_internal_port => '9191', :ks_glance_api_internal_port => '9292',
:ks_glance_password => 'secrete', :ks_glance_registry_internal_port => '9191',
:rabbit_host => '10.0.0.1', :ks_glance_registry_internal_proto => 'https',
:rabbit_password => 'secrete', :ks_glance_password => 'secrete',
:glance_rbd_user => 'glance', :rabbit_host => '10.0.0.1',
:glance_rbd_pool => 'images', :rabbit_password => 'secrete',
:debug => true, :glance_rbd_user => 'glance',
:verbose => true, :glance_rbd_pool => 'images',
:use_syslog => true, :debug => true,
:log_facility => 'LOG_LOCAL0', :verbose => true,
:api_eth => '10.0.0.1' :use_syslog => true,
:log_facility => 'LOG_LOCAL0',
:api_eth => '10.0.0.1'
} }
end end
@@ -45,22 +47,24 @@ describe 'cloud::image::api' do
it 'configure glance-api' do it 'configure glance-api' do
should contain_class('glance::api').with( should contain_class('glance::api').with(
:database_connection => 'mysql://glance:secrete@10.0.0.1/glance?charset=utf8', :database_connection => 'mysql://glance:secrete@10.0.0.1/glance?charset=utf8',
:keystone_password => 'secrete', :keystone_password => 'secrete',
:registry_host => '10.0.0.42', :registry_host => '10.0.0.42',
:registry_port => '9191', :registry_port => '9191',
:keystone_tenant => 'services', :registry_client_protocol => 'https',
:keystone_user => 'glance', :keystone_tenant => 'services',
:show_image_direct_url => true, :keystone_user => 'glance',
:verbose => true, :show_image_direct_url => true,
:debug => true, :verbose => true,
:auth_host => '10.0.0.1', :debug => true,
:log_facility => 'LOG_LOCAL0', :auth_host => '10.0.0.1',
:bind_host => '10.0.0.1', :auth_protocol => 'https',
:bind_port => '9292', :log_facility => 'LOG_LOCAL0',
:use_syslog => true, :bind_host => '10.0.0.1',
:log_dir => false, :bind_port => '9292',
:log_file => false :use_syslog => true,
:log_dir => false,
:log_file => false
) )
end end

View File

@@ -24,6 +24,7 @@ describe 'cloud::image::registry' do
:glance_db_user => 'glance', :glance_db_user => 'glance',
:glance_db_password => 'secrete', :glance_db_password => 'secrete',
:ks_keystone_internal_host => '10.0.0.1', :ks_keystone_internal_host => '10.0.0.1',
:ks_keystone_internal_proto => 'https',
:ks_glance_internal_host => '10.0.0.1', :ks_glance_internal_host => '10.0.0.1',
:ks_glance_registry_internal_port => '9191', :ks_glance_registry_internal_port => '9191',
:ks_glance_password => 'secrete', :ks_glance_password => 'secrete',
@@ -46,6 +47,7 @@ describe 'cloud::image::registry' do
:verbose => true, :verbose => true,
:debug => true, :debug => true,
:auth_host => '10.0.0.1', :auth_host => '10.0.0.1',
:auth_protocol => 'https',
:log_facility => 'LOG_LOCAL0', :log_facility => 'LOG_LOCAL0',
:bind_host => '10.0.0.1', :bind_host => '10.0.0.1',
:bind_port => '9191', :bind_port => '9191',

View File

@@ -46,6 +46,7 @@ describe 'cloud::network::controller' do
:neutron_db_password => 'secrete', :neutron_db_password => 'secrete',
:ks_neutron_password => 'secrete', :ks_neutron_password => 'secrete',
:ks_keystone_admin_host => '10.0.0.1', :ks_keystone_admin_host => '10.0.0.1',
:ks_keystone_admin_proto => 'https',
:ks_keystone_public_port => '5000', :ks_keystone_public_port => '5000',
:nova_url => 'http://127.0.0.1:8774/v2', :nova_url => 'http://127.0.0.1:8774/v2',
:nova_admin_auth_url => 'http://127.0.0.1:5000/v2.0', :nova_admin_auth_url => 'http://127.0.0.1:5000/v2.0',
@@ -99,6 +100,7 @@ describe 'cloud::network::controller' do
:auth_password => 'secrete', :auth_password => 'secrete',
:auth_host => '10.0.0.1', :auth_host => '10.0.0.1',
:auth_port => '5000', :auth_port => '5000',
:auth_protocol => 'https',
:database_connection => 'mysql://neutron:secrete@10.0.0.1/neutron?charset=utf8', :database_connection => 'mysql://neutron:secrete@10.0.0.1/neutron?charset=utf8',
:api_workers => '2', :api_workers => '2',
:agent_down_time => '60' :agent_down_time => '60'

View File

@@ -49,6 +49,7 @@ describe 'cloud::network::metadata' do
:nova_metadata_server => '10.0.0.1', :nova_metadata_server => '10.0.0.1',
:ks_keystone_admin_proto => 'http', :ks_keystone_admin_proto => 'http',
:ks_keystone_admin_port => '35357', :ks_keystone_admin_port => '35357',
:ks_nova_internal_proto => 'https',
:ks_keystone_admin_host => '10.0.0.1' } :ks_keystone_admin_host => '10.0.0.1' }
end end
@@ -102,6 +103,7 @@ describe 'cloud::network::metadata' do
:metadata_workers => '8' :metadata_workers => '8'
) )
should contain_neutron_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => '4096') should contain_neutron_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => '4096')
should contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_protocol').with(:value => 'https')
end end
context 'when using provider external network' do context 'when using provider external network' do

View File

@@ -40,6 +40,7 @@ describe 'cloud::volume::controller' do
{ :ks_cinder_password => 'secrete', { :ks_cinder_password => 'secrete',
:ks_cinder_internal_port => '8776', :ks_cinder_internal_port => '8776',
:ks_keystone_internal_host => '10.0.0.1', :ks_keystone_internal_host => '10.0.0.1',
:ks_keystone_internal_proto => 'https',
:ks_glance_internal_host => '10.0.0.2', :ks_glance_internal_host => '10.0.0.2',
:ks_glance_api_internal_port => '9292', :ks_glance_api_internal_port => '9292',
:volume_multi_backend => false, :volume_multi_backend => false,
@@ -60,7 +61,7 @@ describe 'cloud::volume::controller' do
:log_facility => 'LOG_LOCAL0', :log_facility => 'LOG_LOCAL0',
:use_syslog => true, :use_syslog => true,
:log_dir => false, :log_dir => false,
# :storage_availability_zone => 'nova' :storage_availability_zone => 'nova'
) )
should contain_class('cinder::ceilometer') should contain_class('cinder::ceilometer')
end end
@@ -109,7 +110,7 @@ describe 'cloud::volume::controller' do
it 'configure cinder glance backend' do it 'configure cinder glance backend' do
should contain_class('cinder::glance').with( should contain_class('cinder::glance').with(
:glance_api_servers => '10.0.0.2:9292', :glance_api_servers => 'http://10.0.0.2:9292',
:glance_request_timeout => '10', :glance_request_timeout => '10',
:glance_num_retries => '10' :glance_num_retries => '10'
) )
@@ -117,9 +118,10 @@ describe 'cloud::volume::controller' do
it 'configure cinder api' do it 'configure cinder api' do
should contain_class('cinder::api').with( should contain_class('cinder::api').with(
:keystone_password => 'secrete', :keystone_password => 'secrete',
:keystone_auth_host => '10.0.0.1', :keystone_auth_host => '10.0.0.1',
:bind_host => '10.0.0.1' :keystone_auth_protocol => 'https',
:bind_host => '10.0.0.1'
) )
should contain_cinder_config('DEFAULT/default_volume_type').with(:ensure => 'absent') should contain_cinder_config('DEFAULT/default_volume_type').with(:ensure => 'absent')
end end

View File

@@ -74,7 +74,7 @@ describe 'cloud::volume::storage' do
:log_facility => 'LOG_LOCAL0', :log_facility => 'LOG_LOCAL0',
:use_syslog => true, :use_syslog => true,
:log_dir => false, :log_dir => false,
# :storage_availability_zone => 'nova' :storage_availability_zone => 'nova'
) )
should contain_cinder_config('DEFAULT/notification_driver').with('value' => 'cinder.openstack.common.notifier.rpc_notifier') should contain_cinder_config('DEFAULT/notification_driver').with('value' => 'cinder.openstack.common.notifier.rpc_notifier')