scenario001: deploy Glance with RBD backend
* Allow glance.pp to configure RBD backend. * Switch scenario001 to run Glance with RBD backend. * Update README with more documentation about Glance backends. Change-Id: Ib2dd8a83b5b6a3c39030c44f5e6a0ae7db31c12c
This commit is contained in:
parent
f0d678b642
commit
7c2ff7daf3
@ -34,7 +34,7 @@ scenario](#All-In-One).
|
||||
| - | scenario001 | scenario002 | scenario003 |
|
||||
|:----------:|:-----------:|:-----------:|:-----------:|
|
||||
| keystone | X | X | X |
|
||||
| glance | X | X | X |
|
||||
| glance | rbd | file | file |
|
||||
| nova | X | X | X |
|
||||
| neutron | X | X | X |
|
||||
| cinder | X | | X |
|
||||
|
@ -18,7 +18,9 @@ include ::openstack_integration
|
||||
include ::openstack_integration::rabbitmq
|
||||
include ::openstack_integration::mysql
|
||||
include ::openstack_integration::keystone
|
||||
include ::openstack_integration::glance
|
||||
class { '::openstack_integration::glance':
|
||||
backend => 'rbd',
|
||||
}
|
||||
include ::openstack_integration::neutron
|
||||
include ::openstack_integration::nova
|
||||
include ::openstack_integration::cinder
|
||||
|
@ -1,4 +1,13 @@
|
||||
class openstack_integration::glance {
|
||||
# Configure the Glance service
|
||||
#
|
||||
# [*backend*]
|
||||
# (optional) Glance backend to use.
|
||||
# Can be 'file' or 'rbd'.
|
||||
# Defaults to 'file'.
|
||||
#
|
||||
class openstack_integration::glance (
|
||||
$backend = 'file',
|
||||
) {
|
||||
|
||||
rabbitmq_user { 'glance':
|
||||
admin => true,
|
||||
@ -18,17 +27,37 @@ class openstack_integration::glance {
|
||||
password => 'glance',
|
||||
}
|
||||
include ::glance
|
||||
include ::glance::backend::file
|
||||
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']
|
||||
}
|
||||
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,
|
||||
known_stores => $glance_stores,
|
||||
}
|
||||
class { '::glance::registry':
|
||||
debug => true,
|
||||
|
Loading…
Reference in New Issue
Block a user