try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / manifests / backup / ceph.pp
1 #
2 # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
3 #
4 # Author: Emilien Macchi <emilien.macchi@enovance.com>
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License"); you may
7 # not use this file except in compliance with the License. You may obtain
8 # a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 # License for the specific language governing permissions and limitations
16 # under the License.
17 #
18 # == Class: cinder::backup::ceph
19 #
20 # Setup Cinder to backup volumes into Ceph
21 #
22 # === Parameters
23 #
24 # [*backup_driver*]
25 #   (optional) Which cinder backup driver to use
26 #   Defaults to 'cinder.backup.drivers.ceph'
27 #
28 # [*backup_ceph_conf*]
29 #   (optional) Ceph config file to use.
30 #   Should be a valid ceph configuration file
31 #   Defaults to '/etc/ceph/ceph.conf'
32 #
33 # [*backup_ceph_user*]
34 #   (optional) The Ceph user to connect with.
35 #   Should be a valid user
36 #   Defaults to 'cinder'
37 #
38 # [*backup_ceph_chunk_size*]
39 #   (optional) The chunk size in bytes that a backup will be broken into
40 #   before transfer to backup store.
41 #   Should be a valid integer
42 #   Defaults to '134217728'
43 #
44 # [*backup_ceph_pool*]
45 #   (optional) The Ceph pool to backup to.
46 #   Should be a valid ceph pool
47 #   Defaults to 'backups'
48 #
49 # [*backup_ceph_stripe_unit*]
50 #   (optional) RBD stripe unit to use when creating a backup image.
51 #   Should be a valid integer
52 #   Defaults to '0'
53 #
54 # [*backup_ceph_stripe_count*]
55 #   (optional) RBD stripe count to use when creating a backup image.
56 #   Should be a valid integer
57 #   Defaults to '0'
58 #
59
60 class cinder::backup::ceph (
61   $backup_driver            = 'cinder.backup.drivers.ceph',
62   $backup_ceph_conf         = '/etc/ceph/ceph.conf',
63   $backup_ceph_user         = 'cinder',
64   $backup_ceph_chunk_size   = '134217728',
65   $backup_ceph_pool         = 'backups',
66   $backup_ceph_stripe_unit  = '0',
67   $backup_ceph_stripe_count = '0'
68 ) {
69
70   cinder_config {
71     'DEFAULT/backup_driver':            value => $backup_driver;
72     'DEFAULT/backup_ceph_conf':         value => $backup_ceph_conf;
73     'DEFAULT/backup_ceph_user':         value => $backup_ceph_user;
74     'DEFAULT/backup_ceph_chunk_size':   value => $backup_ceph_chunk_size;
75     'DEFAULT/backup_ceph_pool':         value => $backup_ceph_pool;
76     'DEFAULT/backup_ceph_stripe_unit':  value => $backup_ceph_stripe_unit;
77     'DEFAULT/backup_ceph_stripe_count': value => $backup_ceph_stripe_count;
78   }
79
80 }