diff --git a/manifests/glance.pp b/manifests/glance.pp index b06674a85..820eff2a4 100644 --- a/manifests/glance.pp +++ b/manifests/glance.pp @@ -51,42 +51,43 @@ class openstack_integration::glance ( } case $backend { 'file': { - include glance::backend::file - $backend_store = ['file'] + glance::backend::multistore::file { 'file1': } + $default_backend = 'file1' } 'rbd': { - class { 'glance::backend::rbd': + glance::backend::multistore::rbd { 'rbd1': 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_backend = 'rbd1' } 'swift': { - $backend_store = ['swift'] - class { 'glance::backend::swift': + glance::backend::multistore::swift { 'swift1': swift_store_user => 'services:glance', swift_store_key => 'a_big_secret', swift_store_create_container_on_put => 'True', swift_store_auth_address => "${::openstack_integration::config::keystone_auth_uri}/v3", swift_store_auth_version => '3', } + $default_backend = 'swift1' } default: { fail("Unsupported backend (${backend})") } } - $http_store = ['http'] - $glance_stores = concat($http_store, $backend_store) + + $enabled_backends = ["${default_backend}:${backend}"] + class { 'glance::api::logging': debug => true, } class { 'glance::api': database_connection => 'mysql+pymysql://glance:glance@127.0.0.1/glance?charset=utf8', workers => 2, - stores => $glance_stores, - default_store => $backend, + enabled_backends => $enabled_backends, + default_backend => $default_backend, bind_host => $::openstack_integration::config::host, cert_file => $crt_file, key_file => $key_file,