diff --git a/README.md b/README.md index 03f6f9e91..6d0f003e1 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ scenario](#all-in-one). | ceilometer | X | X | | | | | | aodh | X | X | | | | | | designate | | | bind | | | | -| backup | | swift | | | | | +| backup | ceph | swift | | | | | | gnocchi | rbd | swift | | | | | | ec2api | | X | | | | | | heat | X | | X | | | | diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index fbdbbc3d5..6197e7673 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -73,7 +73,8 @@ class { 'openstack_integration::nova': cinder_enabled => true, } class { 'openstack_integration::cinder': - backend => 'rbd', + backend => 'rbd', + cinder_backup => 'ceph', } include openstack_integration::ceilometer class { 'openstack_integration::aodh': @@ -94,11 +95,12 @@ class { 'openstack_integration::gnocchi': } class { 'openstack_integration::tempest': - cinder => true, - gnocchi => true, - ceilometer => true, - aodh => true, - heat => true, - vitrage => true, - image_format => 'raw', + cinder => true, + cinder_backup => true, + gnocchi => true, + ceilometer => true, + aodh => true, + heat => true, + vitrage => true, + image_format => 'raw', } diff --git a/manifests/ceph.pp b/manifests/ceph.pp index 250e55a3c..94efb70f1 100644 --- a/manifests/ceph.pp +++ b/manifests/ceph.pp @@ -91,7 +91,7 @@ test -b /dev/ceph_vg/lv_data 'secret' => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', 'mode' => '0644', 'cap_mon' => 'profile rbd', - 'cap_osd' => 'profile rbd pool=cinder, profile rbd pool=nova, profile rbd pool=glance, profile rbd pool=gnocchi', + 'cap_osd' => 'profile rbd pool=cinder, profile rbd pool=nova, profile rbd pool=glance, profile rbd pool=gnocchi, profile rbd pool=backups', }, 'client.manila' => { 'secret' => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', @@ -111,7 +111,7 @@ test -b /dev/ceph_vg/lv_data rbd_default_features => '15', } - $ceph_pools = ['glance', 'nova', 'cinder', 'gnocchi'] + $ceph_pools = ['glance', 'nova', 'cinder', 'gnocchi', 'backups'] ceph::pool { $ceph_pools: pg_num => $pg_num, } diff --git a/manifests/cinder.pp b/manifests/cinder.pp index 7fd04dbf5..f61433635 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -11,8 +11,8 @@ # # [*cinder_backup*] # (optional) Set type of cinder backup -# Possible values: false, swift -# defaults to false. +# Possible values: undef, swift, ceph +# defaults to undef # # [*notification_topics*] # (optional) AMQP topic used for OpenStack notifications @@ -21,7 +21,7 @@ class openstack_integration::cinder ( $backend = 'iscsi', $volume_encryption = false, - $cinder_backup = false, + $cinder_backup = undef, $notification_topics = $facts['os_service_default'], ) { @@ -162,8 +162,7 @@ class openstack_integration::cinder ( rbd_secret_uuid => '7200aea0-2ddd-4a32-aa2a-d49f66ab554c', manage_volume_type => true, } - # make sure ceph pool exists before running Cinder API & Volume - Exec['create-cinder'] -> Service['httpd'] + # make sure ceph pool exists before running Cinder Volume Exec['create-cinder'] -> Service['cinder-volume'] } default: { @@ -174,8 +173,17 @@ class openstack_integration::cinder ( enabled_backends => ['BACKEND_1'], } - if $cinder_backup == swift { - class { 'cinder::backup::swift': } + case $cinder_backup { + 'swift': { + class { 'cinder::backup::swift': } + } + 'ceph': { + class { 'cinder::backup::ceph': + backup_ceph_user => 'openstack', + } + # make sure ceph pool exists before running Cinder Backup + Exec['create-backups'] -> Service['cinder-backup'] + } + default: {} } - }