blob: 869f393410cbd241c3b9f2dd1f5e03366a68ed20 [file] [log] [blame]
{% set agent = salt['grains.filter_by']({
'Debian': {
'pkgs': ['ceilometer-agent-compute'],
'services': ['ceilometer-agent-compute'],
'logging': {
'log_appender': false,
'log_handlers': {
'watchedfile': {
'enabled': true
}
},
},
},
'RedHat': {
'pkgs': ['openstack-ceilometer-compute'],
'services': ['openstack-ceilometer-compute'],
'logging': {
'log_appender': false,
'log_handlers': {
'watchedfile': {
'enabled': true
}
},
},
},
}, merge=salt['pillar.get']('ceilometer:agent')) %}
# Server initialization
{% set pkgs = salt['grains.filter_by']({
'Debian': {
'alarm': ['ceilometer-alarm-evaluator', 'ceilometer-alarm-notifier'],
'collector': ['ceilometer-collector'],
'basic': ['ceilometer-api', 'ceilometer-agent-central', 'python-ceilometerclient', 'ceilometer-agent-notification'],
'db_drivers': ['python-elasticsearch', 'python-influxdb', 'python-pymongo'],
},
'RedHat': {
'alarm': ['openstack-ceilometer-alarm-evaluator', 'openstack-ceilometer-alarm-notifier'],
'basic':[ 'openstack-ceilometer-api', 'openstack-ceilometer-central', 'python-ceilometerclient'],
'collector':['openstack-ceilometer-collector'],
'db_drivers': ['python-elasticsearch', 'python-influxdb', 'python-pymongo'],
},
}) %}
{% 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']({
'default': {
'logging': {
'log_appender': false,
'log_handlers': {
'watchedfile': {
'enabled': true
}
},
},
}
}, merge=salt['pillar.get']('ceilometer:server')) %}
# 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 newer is served by webserver.
{%- if salt['pillar.get']('ceilometer:server:version', 'mitaka') in ['liberty', 'juno', 'kilo'] %}
{%- do server.update({'pkgs': pkgs.basic + pkgs.collector + pkgs.alarm}) %}
{%- do server.update({'services': services.basic + services.collector + services.alarm + services.webserved}) %}
{%- else %}
{%- do server.update({'pkgs': pkgs.basic + pkgs.db_drivers}) %}
{%- if salt['pillar.get']('ceilometer:server:version', 'ocata') in ['mitaka'] %}
{%- do server.update({'services': services.basic + services.webserved}) %}
{%- else %}
# Newton and Ocata versions of ceilometer api are served by webserver
{%- do server.update({'services': services.basic}) %}
{%- endif %}
{%- endif %}