
The patch to implement multiple stores configuration changed the way that the known_stores variable works, raplacing it with stores (a list of each store) and default_store (the default backend store). This patch updates these parameters to reflect that change. Change-Id: Ia0838be44a6d91e8b9b38517262c27b8bc1ded08 Depends-on: I28a79ae36e673a3537ea16910d338666b65c80f7
91 lines
2.7 KiB
Puppet
91 lines
2.7 KiB
Puppet
# Configure the Glance service
|
|
#
|
|
# [*backend*]
|
|
# (optional) Glance backend to use.
|
|
# Can be 'file', 'swift' or 'rbd'.
|
|
# Defaults to 'file'.
|
|
#
|
|
class openstack_integration::glance (
|
|
$backend = 'file',
|
|
) {
|
|
|
|
include ::openstack_integration::config
|
|
|
|
rabbitmq_user { 'glance':
|
|
admin => true,
|
|
password => 'an_even_bigger_secret',
|
|
provider => 'rabbitmqctl',
|
|
require => Class['::rabbitmq'],
|
|
}
|
|
rabbitmq_user_permissions { 'glance@/':
|
|
configure_permission => '.*',
|
|
write_permission => '.*',
|
|
read_permission => '.*',
|
|
provider => 'rabbitmqctl',
|
|
require => Class['::rabbitmq'],
|
|
}
|
|
|
|
class { '::glance::db::mysql':
|
|
password => 'glance',
|
|
}
|
|
include ::glance
|
|
include ::glance::client
|
|
class { '::glance::keystone::auth':
|
|
password => 'a_big_secret',
|
|
}
|
|
case $backend {
|
|
'file': {
|
|
include ::glance::backend::file
|
|
$backend_store = ['file']
|
|
}
|
|
'rbd': {
|
|
class { '::glance::backend::rbd':
|
|
rbd_store_user => 'openstack',
|
|
rbd_store_pool => 'glance',
|
|
}
|
|
$backend_store = ['rbd']
|
|
# make sure ceph pool exists before running Glance API
|
|
Exec['create-glance'] -> Service['glance-api']
|
|
}
|
|
'swift': {
|
|
Service<| tag == 'swift-service' |> -> Service['glance-api']
|
|
$backend_store = ['swift']
|
|
class { '::glance::backend::swift':
|
|
swift_store_user => 'services:glance',
|
|
swift_store_key => 'a_big_secret',
|
|
swift_store_create_container_on_put => 'True',
|
|
}
|
|
}
|
|
default: {
|
|
fail("Unsupported backend (${backend})")
|
|
}
|
|
}
|
|
$http_store = ['http']
|
|
$glance_stores = concat($http_store, $backend_store)
|
|
class { '::glance::api':
|
|
debug => true,
|
|
verbose => true,
|
|
database_connection => 'mysql+pymysql://glance:glance@127.0.0.1/glance?charset=utf8',
|
|
keystone_password => 'a_big_secret',
|
|
workers => 2,
|
|
stores => $glance_stores,
|
|
default_store => $backend,
|
|
}
|
|
class { '::glance::registry':
|
|
debug => true,
|
|
verbose => true,
|
|
database_connection => 'mysql+pymysql://glance:glance@127.0.0.1/glance?charset=utf8',
|
|
keystone_password => 'a_big_secret',
|
|
workers => 2,
|
|
}
|
|
class { '::glance::notify::rabbitmq':
|
|
rabbit_userid => 'glance',
|
|
rabbit_password => 'an_even_bigger_secret',
|
|
rabbit_host => $::openstack_integration::config::rabbit_host,
|
|
rabbit_port => $::openstack_integration::config::rabbit_port,
|
|
notification_driver => 'messagingv2',
|
|
rabbit_use_ssl => $::openstack_integration::config::ssl,
|
|
}
|
|
|
|
}
|