include ::glance::params
if ( $glance::params::api_package_name == $glance::params::registry_package_name ) {
package { $::glance::params::api_package_name :
ensure => $package_ensure,
name => $::glance::params::api_package_name,
tag => ['openstack', 'glance-package'],
}
include '::openstacklib::openstackclient'
}
2.2 class glance::api
glance::api类用于管理以下配置:
policy\db\logging\cache
include ::glance::policy
include ::glance::api::db
include ::glance::api::logging
include ::glance::cache::logging
/etc/glance/glance-api.conf
# basic service config
glance_api_config {
'DEFAULT/bind_host': value => $bind_host;
'DEFAULT/bind_port': value => $bind_port;
'DEFAULT/backlog': value => $backlog;
'DEFAULT/show_image_direct_url': value => $show_image_direct_url;
...
'DEFAULT/image_cache_dir': value => $image_cache_dir;
'DEFAULT/auth_region': value => $auth_region;
'glance_store/os_region_name': value => $os_region_name;
}
glance_cache_config {
'DEFAULT/image_cache_stall_time': value => $image_cache_stall_time;
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;
'glance_store/os_region_name': value => $os_region_name;
}
4.glance-api服务的管理
service { 'glance-api':
ensure => $service_ensure,
name => $::glance::params::api_service_name,
enable => $enabled,
hasstatus => true,
hasrestart => true,
tag => 'glance-service',
}