Allow cinder-backup to use ceph

This change updates ceph_client and os_cinder roles to allow
cinder-backup to use ceph.  We also create a new group called
'cinder_backup' which allows us to only retreive the cinder backup key
if cinder-backup is actually in use.

To use, you would simply need to set cinder_service_backup_driver to
cinder.backup.drivers.ceph in your user_variables.yml file.

NOTE: You will need to update your
      /etc/openstack_deploy/env.d/cinder.yml in order for this change
      to execute successfully.

Change-Id: Ib94effa40208bbc8de0f78c5487316be007adcf1
Closes-Bug: #1481787
Implements: blueprint ceph-block-devices
DocImpact
This commit is contained in:
Matt Thompson 2015-08-05 15:31:46 +01:00 committed by Jesse Pretorius
parent 92a26d9c22
commit eabf6f7af6
3 changed files with 10 additions and 3 deletions

View File

@ -89,6 +89,8 @@ cinder_keystone_auth_plugin: password
## In order to enable the cinder backup you MUST set ``cinder_service_backup_program_enabled`` to "true"
cinder_service_backup_program_enabled: false
cinder_service_backup_program_name: cinder-backup
# cinder_service_backup_driver: Options include 'cinder.backup.drivers.swift' or
# 'cinder.backup.drivers.ceph'
cinder_service_backup_driver: cinder.backup.drivers.swift
# cinder_service_backup_swift_auth: Options include 'per_user' or 'single_user', we default to
# 'per_user' so that backups are saved to a user's swift account.
@ -106,6 +108,8 @@ cinder_service_backup_swift_container: volumebackups
cinder_service_backup_swift_object_size: 52428800
cinder_service_backup_swift_retry_attempts: 3
cinder_service_backup_swift_retry_backoff: 2
cinder_service_backup_ceph_user: cinder-backup
cinder_service_backup_ceph_pool: backups
cinder_service_backup_compression_algorithm: zlib
cinder_service_backup_metadata_version: 2

View File

@ -57,7 +57,7 @@
system_group: "{{ cinder_system_group_name }}"
service_home: "{{ cinder_system_home_folder }}"
when: >
inventory_hostname in groups['cinder_volume'] and
inventory_hostname in groups['cinder_backup'] and
cinder_service_backup_program_enabled == true
tags:
- upstart-init

View File

@ -23,6 +23,8 @@ enable_v2_api = {{ cinder_enable_v2_api }}
{% if cinder_service_backup_program_enabled == true %}
## Cinder Backup
backup_driver = {{ cinder_service_backup_driver }}
backup_metadata_version = {{ cinder_service_backup_metadata_version }}
backup_compression_algorithm = {{ cinder_service_backup_compression_algorithm }}
{% if cinder_service_backup_driver == 'cinder.backup.drivers.swift' %}
backup_swift_auth = {{ cinder_service_backup_swift_auth }}
{% if cinder_service_backup_swift_auth == 'single_user' %}
@ -36,9 +38,10 @@ backup_swift_container = {{ cinder_service_backup_swift_container }}
backup_swift_object_size = {{ cinder_service_backup_swift_object_size }}
backup_swift_retry_attempts = {{ cinder_service_backup_swift_retry_attempts }}
backup_swift_retry_backoff = {{ cinder_service_backup_swift_retry_backoff }}
{% elif cinder_service_backup_driver == 'cinder.backup.drivers.ceph' %}
backup_ceph_user = {{ cinder_service_backup_ceph_user }}
backup_ceph_pool = {{ cinder_service_backup_ceph_pool }}
{% endif %}
backup_compression_algorithm = {{ cinder_service_backup_compression_algorithm }}
backup_metadata_version = {{ cinder_service_backup_metadata_version }}
{% endif %}
{% endif %}