summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Potter <nathaniel.potter@intel.com>2016-03-08 17:31:59 +0000
committerNate Potter <nathaniel.potter@intel.com>2016-03-08 17:37:12 +0000
commitef344c3d40063a9c91939f0e56bf58715d077ac4 (patch)
tree68d91b95c2018aab6360cca11276ccfdb888cc03
parentcda71192de9be99b8b68fa592a63c263ff38f48f (diff)
Add glance multi/single store declaration examples
This patch adds examples to explain the new multiple store backend declaration feature and how to use it. It covers both the case where the user wants to declare multiple backends as well as just one. Change-Id: Ief8fea9d57422d05d36bf9b6946695249958aad9 Depends-on: I28a79ae36e673a3537ea16910d338666b65c80f7
Notes
Notes (review): Code-Review+2: Alex Schultz <aschultz@mirantis.com> Code-Review+2: Emilien Macchi <emilien@redhat.com> Workflow+1: Emilien Macchi <emilien@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 09 Mar 2016 00:00:05 +0000 Reviewed-on: https://review.openstack.org/290033 Project: openstack/puppet-glance Branch: refs/heads/master
-rw-r--r--examples/glance_multi_store.pp25
-rw-r--r--examples/glance_single_store.pp18
2 files changed, 43 insertions, 0 deletions
diff --git a/examples/glance_multi_store.pp b/examples/glance_multi_store.pp
new file mode 100644
index 0000000..4983f28
--- /dev/null
+++ b/examples/glance_multi_store.pp
@@ -0,0 +1,25 @@
1# Example: Declaring multiple backend stores
2#
3# To declare multiple glance::backend::* classes, each declaration must include
4# the parameter multi_store set to true. This prevents each individual backend from
5# setting itself as the default store as soon as it is declared. Rather, the
6# default store can be chosen by the user when declaring glance::api (if no
7# default_store is set at that point, then the first store in the list 'stores'
8# provided will be made the default).
9
10class { '::glance::backend::file':
11 multi_store => true,
12}
13
14class { '::glance::backend::swift':
15 swift_store_user => 'demo',
16 swift_store_key => 'secrete',
17 multi_store => true,
18}
19
20class { '::glance::api':
21 keystone_password => 'a_big_secret',
22 stores => ['file', 'swift'],
23 default_store => 'swift',
24 multi_store => true,
25}
diff --git a/examples/glance_single_store.pp b/examples/glance_single_store.pp
new file mode 100644
index 0000000..2ca2d3f
--- /dev/null
+++ b/examples/glance_single_store.pp
@@ -0,0 +1,18 @@
1# Example: Declaring a single backend store
2#
3# To declare only one glance::backend::* class, all you need to do is declare
4# it without the multi_store parameter. This way, multi_store will default to false
5# and the glance::backend::* class will automatically set itself as the default backend.
6# After doing this, you must not declare glance::api with multi_store set to true,
7# or it will attempt to override the default set by the backend class and result
8# in an error.
9
10class { '::glance::backend::swift':
11 swift_store_user => 'demo',
12 swift_store_key => 'secrete',
13}
14
15class { '::glance::api':
16 keystone_password => 'a_big_secret',
17 stores => ['swift'],
18}