Merge "Add swift as gnocchi storage option"

This commit is contained in:
Zuul 2018-09-25 14:36:14 +00:00 committed by Gerrit Code Review
commit da0904c28d
4 changed files with 26 additions and 2 deletions

View File

@ -660,8 +660,9 @@ panko_database_type: "mysql"
#################
# Gnocchi options
#################
# Valid options are [file, ceph]
gnocchi_backend_storage: "{{ 'ceph' if enable_ceph|bool else 'file' }}"
# Valid options are [ file, ceph, swift ]
# Defaults to file if ceph and swift are enabled; explicitly set to either if required.
gnocchi_backend_storage: "{% if enable_ceph | bool and not enable_swift | bool %}ceph{% elif enable_swift | bool and not enable_ceph | bool %}swift{% else %}file{% endif %}"
# Valid options are [redis, '']
gnocchi_incoming_storage: "{{ 'redis' if enable_redis | bool else '' }}"

View File

@ -59,6 +59,13 @@ ceph_client_gnocchi_keyring_caps:
allow rwx pool={{ ceph_gnocchi_pool_name }}-cache
####################
# Swift
####################
swift_keystone_user: "swift"
swift_admin_tenant_name: "admin"
####################
# Database
####################

View File

@ -76,6 +76,13 @@ ceph_pool = {{ gnocchi_pool_name }}
ceph_username = gnocchi
ceph_keyring = /etc/ceph/ceph.client.gnocchi.keyring
ceph_conffile = /etc/ceph/ceph.conf
{% elif gnocchi_backend_storage == 'swift' %}
driver = swift
swift_authurl = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3
swift_auth_version = 3
swift_user = service:{{ swift_keystone_user }}
swift_key = {{ swift_keystone_password }}
swift_project_name = {{ swift_admin_tenant_name }}
{% endif %}
{% if enable_grafana | bool %}

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
Added swift as gnocchi storage option.
Here is the list of storage options for gnocchi-
a) Uses swift if swift is enabled.
b) Uses ceph if ceph is enabled.
c) Defaults to file if swift and ceph are enabled.
User has to explicitly set to swift or ceph if both enabled.