Switch default storage backend to file

Revert a change to allow the gnocchi_pip_requirements to be
tailored to the storage driver chosen. There is another bug
file to make that work.
This commit is contained in:
Steve Lewis 2016-03-15 11:01:17 -07:00
parent 3b0ae09867
commit 94adfd75dc
3 changed files with 42 additions and 27 deletions

View File

@ -55,7 +55,7 @@ gnocchi_galera_address: "{{ galera_address }}"
gnocchi_db_sync_options: ""
#: Storage info
gnocchi_storage_driver: swift
gnocchi_storage_driver: file
gnocchi_coordination_url: "mysql://{{ gnocchi_galera_user }}:{{ gnocchi_galera_password }}@{{ gnocchi_galera_address }}/{{ gnocchi_galera_database }}?charset=utf8&timeout=5"
#: Default Archive Policies
@ -159,7 +159,8 @@ gnocchi_requires_pip_packages:
#: Common pip packages
gnocchi_pip_packages:
- "gnocchi[mysql,{{ gnocchi_storage_driver }}]"
# FUTURE optimize after https://bugs.launchpad.net/openstack-ansible/+bug/1557682
- "gnocchi[mysql,file,swift,ceph]"
- keystonemiddleware
- gnocchiclient
- python-memcached

View File

@ -53,7 +53,7 @@
- "lxc.mount.entry=/openstack/{{ container_name }} var/lib/gnocchi none bind 0 0"
delegate_to: "{{ physical_host }}"
when: >
(not is_metal | bool) and gnocchi_storage_driver is defined and
(not is_metal | bool) and gnocchi_storage_driver is not defined or
(gnocchi_storage_driver == "file")
register: container_extra_config
tags:

View File

@ -38,6 +38,44 @@ check_revocations_for_cached = False
[storage]
driver = {{ gnocchi_storage_driver }}
coordination_url = {{ gnocchi_coordination_url }}
{% if gnocchi_storage_driver == 'file' %}
############
## File Storage
############
file_basepath = /var/lib/gnocchi
file_basepath_tmp = ${file_basepath}/tmp
{% endif %}
{% if gnocchi_storage_driver == 'swift' %}
############
## Swift Storage
############
swift_auth_version: 3
swift_authurl: "{{ keystone_service_internalurl }}"
swift_endpoint_type: internalURL
swift_user: "{{ gnocchi_service_user_name }}"
swift_key: "{{ gnocchi_service_password }}"
swift_region_name: "{{ gnocchi_service_region }}"
swift_project_domain_id: "{{ gnocchi_service_project_domain_id }}"
swift_user_domain_id: "{{ gnocchi_service_user_domain_id }}"
swift_tenant_name: "{{ gnocchi_service_project_name }}"
swift_container_prefix: gnocchi
{% endif %}
{% if gnocchi_storage_driver == 'ceph' %}
############
## Ceph Storage
############
# Ceph pool name to use. (string value)
#ceph_pool = gnocchi
# Ceph username (ie: client.admin). (string value)
#ceph_username = <None>
# Ceph keyring path. (string value)
#ceph_keyring = <None>
# Ceph configuration file. (string value)
#ceph_conffile = /etc/ceph/ceph.conf
{% endif %}
[metricd]
# Number of workers for Gnocchi metric daemons. By default the available number
@ -69,30 +107,6 @@ coordination_url = {{ gnocchi_coordination_url }}
# Delay between flushes (floating point value)
#flush_delay = <None>
{% if gnocchi_storage_driver == 'file' %}
############
## File Storage
############
file_basepath = /var/lib/gnocchi
file_basepath_tmp = ${file_basepath}/tmp
{% endif %}
{% if gnocchi_storage_driver == 'ceph' %}
############
## Ceph Storage
############
# Ceph pool name to use. (string value)
#ceph_pool = gnocchi
# Ceph username (ie: client.admin). (string value)
#ceph_username = <None>
# Ceph keyring path. (string value)
#ceph_keyring = <None>
# Ceph configuration file. (string value)
#ceph_conffile = /etc/ceph/ceph.conf
{% endif %}
############
## InfluxDB Storage
############