Add swift as gnocchi storage option

- Uses swift if swift is enabled.
 - Uses ceph if ceph is enabled.
 - Defaults to file if swift and ceph are enabled.
   Explicitly set to swift or ceph when both are enabled.
 - Include swift client detail in storage section of gnocchi conf

Change-Id: I78df9a2fbe546038e1d6df350d8db0fd9b6f6d49
This commit is contained in:
Mick Thompson 2017-08-24 10:35:22 +01:00 committed by Murali Annamneni
parent d03b6daf77
commit 331d2f053f
4 changed files with 26 additions and 2 deletions

View File

@ -658,8 +658,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.