Add support for Glance RBD backend
This patch adds support for a new GlanceBackend setting which can be set to one of swift, rbd, or file to control which Glance backend is configured for use by default. Change-Id: Id6a3fbc3477e85e8e2446e3dc13d424f9535d0ff
This commit is contained in:
parent
723db1317c
commit
fd212bdd5a
|
@ -144,6 +144,13 @@ parameters:
|
|||
default: http
|
||||
description: Protocol to use when connecting to glance, set to https for SSL.
|
||||
type: string
|
||||
GlanceBackend:
|
||||
default: swift
|
||||
description: The short name of the Glance backend to use. Should be one
|
||||
of swift, rbd, or file
|
||||
type: string
|
||||
constraints:
|
||||
- allowed_values: ['swift', 'file', 'rbd']
|
||||
HeatPassword:
|
||||
default: unset
|
||||
description: The password for the Heat service account, used by the Heat services.
|
||||
|
|
|
@ -327,6 +327,13 @@ parameters:
|
|||
description: The password for the glance service account, used by the glance services.
|
||||
type: string
|
||||
hidden: true
|
||||
GlanceBackend:
|
||||
default: swift
|
||||
description: The short name of the Glance backend to use. Should be one
|
||||
of swift, rbd or file
|
||||
type: string
|
||||
constraints:
|
||||
- allowed_values: ['swift', 'file', 'rbd']
|
||||
HeatPassword:
|
||||
default: unset
|
||||
description: The password for the Heat service account, used by the Heat services.
|
||||
|
@ -563,6 +570,7 @@ resources:
|
|||
GlancePort: {get_param: GlancePort}
|
||||
GlanceProtocol: {get_param: GlanceProtocol}
|
||||
GlancePassword: {get_param: GlancePassword}
|
||||
GlanceBackend: {get_param: GlanceBackend}
|
||||
GlanceNotifierStrategy: {get_param: GlanceNotifierStrategy}
|
||||
GlanceLogFile: {get_param: GlanceLogFile}
|
||||
HeatPassword: {get_param: HeatPassword}
|
||||
|
|
|
@ -57,7 +57,7 @@ resources:
|
|||
secret: 'ADMIN_KEY',
|
||||
mode: '0644',
|
||||
cap_mon: 'allow r',
|
||||
cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms'
|
||||
cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
|
||||
}
|
||||
}"
|
||||
params:
|
||||
|
|
|
@ -144,6 +144,13 @@ parameters:
|
|||
default: http
|
||||
description: Protocol to use when connecting to glance, set to https for SSL.
|
||||
type: string
|
||||
GlanceBackend:
|
||||
default: swift
|
||||
description: The short name of the Glance backend to use. Should be one
|
||||
of swift, rbd, or file
|
||||
type: string
|
||||
constraints:
|
||||
- allowed_values: ['swift', 'file', 'rbd']
|
||||
HeatPassword:
|
||||
default: unset
|
||||
description: The password for the Heat service account, used by the Heat services.
|
||||
|
@ -491,6 +498,7 @@ resources:
|
|||
glance_port: {get_param: GlancePort}
|
||||
glance_protocol: {get_param: GlanceProtocol}
|
||||
glance_password: {get_param: GlancePassword}
|
||||
glance_backend: {get_param: GlanceBackend}
|
||||
glance_swift_store_auth_address: {list_join: ['', ['http://', {get_param: VirtualIP} , ':5000/v2.0']]}
|
||||
glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
|
||||
glance_log_file: {get_param: GlanceLogFile}
|
||||
|
@ -708,6 +716,7 @@ resources:
|
|||
glance::backend::swift::swift_store_auth_address: {get_input: glance_swift_store_auth_address}
|
||||
glance::backend::swift::swift_store_user: service:glance
|
||||
glance::backend::swift::swift_store_key: {get_input: glance_password}
|
||||
glance_backend: {get_input: glance_backend}
|
||||
|
||||
# Heat
|
||||
heat_stack_domain_admin_password: {get_input: heat_stack_domain_admin_password}
|
||||
|
|
|
@ -9,3 +9,4 @@ ceph::profile::params::authentication_type: cephx
|
|||
ceph_pools:
|
||||
- volumes
|
||||
- vms
|
||||
- images
|
||||
|
|
|
@ -48,12 +48,10 @@ swift::proxy::account_autocreate: true
|
|||
|
||||
# glance
|
||||
glance::api::pipeline: 'keystone'
|
||||
glance::api::known_stores:
|
||||
- glance.store.filesystem.Store
|
||||
- glance.store.swift.Store
|
||||
glance::registry::pipeline: 'keystone'
|
||||
glance::registry::manage_service: true
|
||||
glance::backend::swift::swift_store_create_container_on_put: true
|
||||
glance::backend::rbd::rbd_store_user: 'openstack'
|
||||
|
||||
# neutron
|
||||
neutron::core_plugin: 'ml2'
|
||||
|
|
|
@ -249,11 +249,21 @@ if hiera('step') >= 3 {
|
|||
require => File['/etc/keystone/ssl/certs'],
|
||||
}
|
||||
|
||||
$glance_backend = downcase(hiera('glance_backend', 'swift'))
|
||||
case $glance_backend {
|
||||
swift: { $glance_store = 'glance.store.swift.Store' }
|
||||
file: { $glance_store = 'glance.store.filesystem.Store' }
|
||||
rbd: { $glance_store = 'glance.store.rbd.Store' }
|
||||
default: { fail('Unrecognized glance_backend parameter.') }
|
||||
}
|
||||
|
||||
# TODO: notifications, scrubber, etc.
|
||||
include ::glance
|
||||
include ::glance::api
|
||||
class { 'glance::api':
|
||||
known_stores => [$glance_store]
|
||||
}
|
||||
include ::glance::registry
|
||||
include ::glance::backend::swift
|
||||
include join(['::glance::backend::', $glance_backend])
|
||||
|
||||
class { 'nova':
|
||||
glance_api_servers => join([hiera('glance_protocol'), '://', hiera('controller_virtual_ip'), ':', hiera('glance_port')]),
|
||||
|
|
Loading…
Reference in New Issue