blob: 492afa72cd2b618e8af4a862ebfe870ed3ce5c8c [file] [log] [blame]
{%- set default_params = {
'cacert_file': salt['grains.filter_by']({
'Debian': '/etc/ssl/certs/ca-certificates.crt',
'RedHat': '/etc/pki/tls/certs/ca-bundle.crt'
})}
%}
{% set agent = salt['grains.filter_by']({
'BaseDefaults': default_params,
'Debian': {
'enabled': false,
'pkgs': ['ceilometer-agent-compute'],
'services': ['ceilometer-agent-compute'],
'notification': {
'topics': 'notifications'
},
'logging': {
'app_name': 'ceilometer',
'log_appender': false,
'log_handlers': {
'watchedfile': {
'enabled': true
}
},
},
},
'RedHat': {
'enabled': false,
'pkgs': ['openstack-ceilometer-compute'],
'services': ['openstack-ceilometer-compute'],
'notification': {
'topics': 'notifications'
},
'logging': {
'app_name': 'ceilometer',
'log_appender': false,
'log_handlers': {
'watchedfile': {
'enabled': true
}
},
},
},
}, merge=salt['pillar.get']('ceilometer:agent', {}), base='BaseDefaults') %}
# Server initialization
{% set pkgs = salt['grains.filter_by']({
'Debian': {
'alarm': ['ceilometer-alarm-evaluator', 'ceilometer-alarm-notifier'],
'collector': ['ceilometer-collector'],
'basic': ['ceilometer-agent-central', 'python-ceilometerclient', 'ceilometer-agent-notification'],
'api': ['ceilometer-api'],
'db_drivers': ['python-elasticsearch', 'python-influxdb', 'python-pymongo'],
'opendaylight': ['python-networking-odl'],
},
'RedHat': {
'alarm': ['openstack-ceilometer-alarm-evaluator', 'openstack-ceilometer-alarm-notifier'],
'basic':[ 'openstack-ceilometer-central', 'python-ceilometerclient'],
'api': ['openstack-ceilometer-api'],
'collector':['openstack-ceilometer-collector'],
'db_drivers': ['python-elasticsearch', 'python-influxdb', 'python-pymongo'],
'opendaylight': ['python-networking-odl'],
},
}) %}
{% set services = salt['grains.filter_by']({
'Debian': {
'alarm': ['ceilometer-alarm-evaluator', 'ceilometer-alarm-notifier'],
'collector': ['ceilometer-collector'],
'basic': ['ceilometer-agent-central', 'ceilometer-agent-notification'],
'webserved': ['ceilometer-api'],
},
'RedHat': {
'alarm':['openstack-ceilometer-alarm-evaluator', 'openstack-ceilometer-alarm-notifier'],
'basic':['openstack-ceilometer-central', 'openstack-ceilometer-notification'],
'collector': ['openstack-ceilometer-collector'],
'webserved': ['openstack-ceilometer-api'],
},
}) %}
{%- set server = salt['grains.filter_by']({
'BaseDefaults': default_params,
'default': {
'enabled': false,
'notification': {
'topics': 'notifications'
},
'logging': {
'app_name': 'ceilometer',
'log_appender': false,
'log_handlers': {
'watchedfile': {
'enabled': true
}
},
},
}
}, merge=salt['pillar.get']('ceilometer:server',{}), base='BaseDefaults') %}
# Mitaka and newer OpenStack releases don't need collector and alarm
# packages/services, because alarming is implemented by Aodh and collector
# stuff is implemented by the ceilometer_collector service.
# The ceilometer api for Ocata and Newton is served by webserver.
# The ceilometer api and db drivers for Pike and newer are deprecated.
{%- if salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['liberty', 'juno', 'kilo'] %}
{%- do server.update({'pkgs': pkgs.api + pkgs.basic + pkgs.collector + pkgs.alarm}) %}
{%- elif salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['mitaka', 'newton', 'ocata'] %}
{%- do server.update({'pkgs': pkgs.api + pkgs.basic + pkgs.db_drivers}) %}
{%- else %}
{%- do server.update({'pkgs': pkgs.basic}) %}
{%- endif %}
{%- do server.pkgs.extend(pkgs.opendaylight) if salt['pillar.get']('ceilometer:server:opendaylight', False) %}
{%- if salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['liberty', 'juno', 'kilo'] %}
{%- do server.update({'services': services.basic + services.collector + services.alarm + services.webserved}) %}
{%- elif salt['pillar.get']('ceilometer:server:version', 'ocata') == 'mitaka' %}
{%- do server.update({'services': services.basic + services.webserved}) %}
{%- else %}
{%- do server.update({'services': services.basic}) %}
{%- endif %}
{%- set upgrade = pillar.get('ceilometer', {}).get('upgrade', {}) %}