Merge tag '2016.4.1' into debian/unstable
2016.4.1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1bfce6e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+tests/build/
+*.swp
+*.pyc
+.ropeproject
\ No newline at end of file
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..ab9b9c9
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=review.openstack.org
+port=29418
+project=openstack/salt-formula-ceilometer.git
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 0000000..d906449
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,10 @@
+ceilometer formula
+==================
+
+2016.4.1 (2016-04-15)
+
+- second release
+
+0.0.1 (2015-08-03)
+
+- Initial formula setup
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8d968b6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fc83783
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+DESTDIR=/
+SALTENVDIR=/usr/share/salt-formulas/env
+RECLASSDIR=/usr/share/salt-formulas/reclass
+FORMULANAME=$(shell grep name: metadata.yml|head -1|cut -d : -f 2|grep -Eo '[a-z0-9\-]*')
+
+all:
+ @echo "make install - Install into DESTDIR"
+ @echo "make test - Run tests"
+ @echo "make clean - Cleanup after tests run"
+
+install:
+ # Formula
+ [ -d $(DESTDIR)/$(SALTENVDIR) ] || mkdir -p $(DESTDIR)/$(SALTENVDIR)
+ cp -a $(FORMULANAME) $(DESTDIR)/$(SALTENVDIR)/
+ [ ! -d _modules ] || cp -a _modules $(DESTDIR)/$(SALTENVDIR)/
+ [ ! -d _states ] || cp -a _states $(DESTDIR)/$(SALTENVDIR)/ || true
+ # Metadata
+ [ -d $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME) ] || mkdir -p $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
+ cp -a metadata/service/* $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
+
+test:
+ [ ! -d tests ] || (cd tests; ./run_tests.sh)
+
+clean:
+ [ ! -d tests/build ] || rm -rf tests/build
+ [ ! -d build ] || rm -rf build
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..8ffe648
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,119 @@
+
+==========
+Ceilometer
+==========
+
+The ceilometer project aims to deliver a unique point of contact for billing systems to acquire all of the measurements they need to establish customer billing, across all current OpenStack core components with work underway to support future OpenStack components.
+
+Sample pillars
+==============
+
+Ceilometer API/controller node
+
+.. code-block:: yaml
+
+ ceilometer:
+ server:
+ enabled: true
+ version: havana
+ cluster: true
+ secret: pwd
+ bind:
+ host: 127.0.0.1
+ port: 8777
+ identity:
+ engine: keystone
+ host: 127.0.0.1
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: pwd
+ message_queue:
+ engine: rabbitmq
+ host: 127.0.0.1
+ port: 5672
+ user: openstack
+ password: pwd
+ virtual_host: '/openstack'
+ rabbit_ha_queues: true
+ database:
+ engine: mongodb
+ host: 127.0.0.1
+ port: 27017
+ name: ceilometer
+ user: ceilometer
+ password: pwd
+
+Ceilometer Graphite publisher
+
+.. code-block:: yaml
+
+ ceilometer:
+ server:
+ enabled: true
+ publisher:
+ graphite:
+ enabled: true
+ host: 10.0.0.1
+ port: 2003
+
+Ceilometer compute agent
+
+.. code-block:: yaml
+
+ ceilometer:
+ agent:
+ enabled: true
+ version: havana
+ secret: pwd
+ identity:
+ engine: keystone
+ host: 127.0.0.1
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: pwd
+ message_queue:
+ engine: rabbitmq
+ host: 127.0.0.1
+ port: 5672
+ user: openstack
+ password: pwd
+ virtual_host: '/openstack'
+ rabbit_ha_queues: true
+
+Read more
+=========
+
+* https://wiki.openstack.org/wiki/Ceilometer
+* http://docs.openstack.org/developer/ceilometer/install/manual.html
+* http://docs.openstack.org/developer/ceilometer/
+* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
+* https://github.com/spilgames/ceilometer_graphite_publisher
+* http://engineering.spilgames.com/using-ceilometer-graphite/
+
+Things to improve/consider
+==========================
+
+* Graphite publisher http://engineering.spilgames.com/using-ceilometer-graphite/
+* Juno additions - Split Events/Meters and Alarms databases, Polling angets are HA now, active/Activr Workload partitioning to central agents
+* Kilo additions - Splint Events - Meters - Agents, notification agents are HA now (everything is HA now), events - elastic search
+* User notifier publisher vs rpc publisher (Juno+)
+* Enable jittering (rendom delay) to polling. (Kilo+)
+* Collect what you need - pipeline.yaml, tweak polling interval (Icehouse+)
+* add more agents as load inceases (Juno+)
+* Avoid open-ended queries - query on a time range
+* Install api behind mod_wsgi, tweak wsgi daemon - threads and processes
+* Set TTL - expire data to minimise database size
+* Run Mongodb on separate node - use sharding and replica-sets
+
+Deployment scenarios
+--------------------
+
+* Lambda design - use short term and long term databases in the same time
+* Data segragation - separatem
+* JSON files - Apache spark
+* Fraud detection - proprietary alarming system
+* Custom consumers - kafka - Apache Storm (kilo+)
+* Debugging - Collecttions - Elastic serach - Kibana
+* Noisy services - Multiple notification buses
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..1bad316
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+2016.4.1
diff --git a/ceilometer/agent.sls b/ceilometer/agent.sls
new file mode 100644
index 0000000..d59a5d4
--- /dev/null
+++ b/ceilometer/agent.sls
@@ -0,0 +1,43 @@
+{%- from "ceilometer/map.jinja" import agent with context %}
+{%- if agent.enabled %}
+
+ceilometer_agent_packages:
+ pkg.installed:
+ - names: {{ agent.pkgs }}
+
+/etc/ceilometer/ceilometer.conf:
+ file.managed:
+ - source: salt://ceilometer/files/{{ agent.version }}/ceilometer-agent.conf.{{ grains.os_family }}
+ - template: jinja
+ - require:
+ - pkg: ceilometer_agent_packages
+
+{%- for publisher_name, publisher in agent.get('publisher', {}).iteritems() %}
+
+{%- if publisher_name != "default" %}
+
+ceilometer_publisher_{{ publisher_name }}_pkg:
+ pkg.latest:
+ - name: ceilometer-publisher-{{ publisher_name }}
+
+{%- endif %}
+
+{%- endfor %}
+
+/etc/ceilometer/pipeline.yaml:
+ file.managed:
+ - source: salt://ceilometer/files/{{ agent.version }}/pipeline.yaml
+ - template: jinja
+ - require:
+ - pkg: ceilometer_agent_packages
+
+
+ceilometer_agent_services:
+ service.running:
+ - names: {{ agent.services }}
+ - enable: true
+ - watch:
+ - file: /etc/ceilometer/ceilometer.conf
+ - file: /etc/ceilometer/pipeline.yaml
+
+{%- endif %}
diff --git a/ceilometer/files/heka.toml b/ceilometer/files/heka.toml
new file mode 100644
index 0000000..a96b26e
--- /dev/null
+++ b/ceilometer/files/heka.toml
@@ -0,0 +1,15 @@
+{%- if pillar.ceilometer.server is defined %}
+[logstreamer_ceilometer]
+type = "LogstreamerInput"
+log_directory = "/var/log/ceilometer"
+file_match = '(?P<Service>.+)\.log\.?(?P<Seq>\d*)$'
+differentiator = ["'ceilometer','_','Service'"]
+priority = ["^Index"]
+decoder = "openstack"
+
+[openstack]
+type = "SandboxDecoder"
+filename = "lua_modules/decoders/openstack.lua"
+module_directory = "/usr/share/heka/lua_modules;/usr/share/heka/lua_modules/common"
+
+{% endif %}
diff --git a/ceilometer/files/juno/ceilometer-agent.conf.Debian b/ceilometer/files/juno/ceilometer-agent.conf.Debian
new file mode 100644
index 0000000..3e65504
--- /dev/null
+++ b/ceilometer/files/juno/ceilometer-agent.conf.Debian
@@ -0,0 +1,1017 @@
+{%- from "ceilometer/map.jinja" import agent with context %}
+[DEFAULT]
+
+#
+# Options defined in oslo.messaging
+#
+
+# Use durable queues in amqp. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_durable_queues
+#amqp_durable_queues=false
+
+# Auto-delete queues in amqp. (boolean value)
+#amqp_auto_delete=false
+
+# Size of RPC connection pool. (integer value)
+#rpc_conn_pool_size=30
+
+# Modules of exceptions that are permitted to be recreated
+# upon receiving exception data from an rpc call. (list value)
+#allowed_rpc_exception_modules=oslo.messaging.exceptions,nova.exception,cinder.exception,exceptions
+
+# Qpid broker hostname. (string value)
+#qpid_hostname=localhost
+
+# Qpid broker port. (integer value)
+#qpid_port=5672
+
+# Qpid HA cluster host:port pairs. (list value)
+#qpid_hosts=$qpid_hostname:$qpid_port
+
+# Username for Qpid connection. (string value)
+#qpid_username=
+
+# Password for Qpid connection. (string value)
+#qpid_password=
+
+# Space separated list of SASL mechanisms to use for auth.
+# (string value)
+#qpid_sasl_mechanisms=
+
+# Seconds between connection keepalive heartbeats. (integer
+# value)
+#qpid_heartbeat=60
+
+# Transport to use, either 'tcp' or 'ssl'. (string value)
+#qpid_protocol=tcp
+
+# Whether to disable the Nagle algorithm. (boolean value)
+#qpid_tcp_nodelay=true
+
+# The qpid topology version to use. Version 1 is what was
+# originally used by impl_qpid. Version 2 includes some
+# backwards-incompatible changes that allow broker federation
+# to work. Users should update to version 2 when they are
+# able to take everything down, as it requires a clean break.
+# (integer value)
+#qpid_topology_version=1
+
+# SSL version to use (valid only if SSL enabled). valid values
+# are TLSv1, SSLv23 and SSLv3. SSLv2 may be available on some
+# distributions. (string value)
+#kombu_ssl_version=
+
+# SSL key file (valid only if SSL enabled). (string value)
+#kombu_ssl_keyfile=
+
+# SSL cert file (valid only if SSL enabled). (string value)
+#kombu_ssl_certfile=
+
+# SSL certification authority file (valid only if SSL
+# enabled). (string value)
+#kombu_ssl_ca_certs=
+
+# How long to wait before reconnecting in response to an AMQP
+# consumer cancel notification. (floating point value)
+#kombu_reconnect_delay=1.0
+
+# The RabbitMQ broker address where a single node is used.
+# (string value)
+#rabbit_host=localhost
+
+# The RabbitMQ broker port where a single node is used.
+# (integer value)
+#rabbit_port=5672
+
+#Rabbit
+kombu_reconnect_delay=5.0
+rpc_backend=ceilometer.openstack.common.rpc.impl_kombu
+
+rabbit_host = {{ agent.message_queue.host }}
+rabbit_port = {{ agent.message_queue.port }}
+rabbit_userid = {{ agent.message_queue.user }}
+rabbit_password = {{ agent.message_queue.password }}
+rabbit_virtual_host = {{ agent.message_queue.virtual_host }}
+
+{%- if agent.message_queue.rpc_thread_pool_size is defined %}
+rpc_thread_pool_size = {{ agent.message_queue.rpc_thread_pool_size }}
+{%- endif %}
+
+
+notification_topics=notifications
+
+# If passed, use a fake RabbitMQ provider. (boolean value)
+#fake_rabbit=false
+
+# ZeroMQ bind address. Should be a wildcard (*), an ethernet
+# interface, or IP. The "host" option should point or resolve
+# to this address. (string value)
+#rpc_zmq_bind_address=*
+
+# MatchMaker driver. (string value)
+#rpc_zmq_matchmaker=oslo.messaging._drivers.matchmaker.MatchMakerLocalhost
+
+# ZeroMQ receiver listening port. (integer value)
+#rpc_zmq_port=9501
+
+# Number of ZeroMQ contexts, defaults to 1. (integer value)
+#rpc_zmq_contexts=1
+
+# Maximum number of ingress messages to locally buffer per
+# topic. Default is unlimited. (integer value)
+#rpc_zmq_topic_backlog=<None>
+
+# Directory for holding IPC sockets. (string value)
+#rpc_zmq_ipc_dir=/var/run/openstack
+
+# Name of this node. Must be a valid hostname, FQDN, or IP
+# address. Must match "host" option, if running Nova. (string
+# value)
+#rpc_zmq_host=ceilometer
+
+# Seconds to wait before a cast expires (TTL). Only supported
+# by impl_zmq. (integer value)
+#rpc_cast_timeout=30
+
+# Heartbeat frequency. (integer value)
+#matchmaker_heartbeat_freq=300
+
+# Heartbeat time-to-live. (integer value)
+#matchmaker_heartbeat_ttl=600
+
+# Host to locate redis. (string value)
+#host=127.0.0.1
+
+# Use this port to connect to redis host. (integer value)
+#port=6379
+
+# Password for Redis server (optional). (string value)
+#password=<None>
+
+# Size of RPC greenthread pool. (integer value)
+#rpc_thread_pool_size=64
+
+# Driver or drivers to handle sending notifications. (multi
+# valued)
+#notification_driver=
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+#notification_topics=notifications
+
+
+# Seconds to wait for a response from a call. (integer value)
+#rpc_response_timeout=60
+
+# A URL representing the messaging driver to use and its full
+# configuration. If not set, we fall back to the rpc_backend
+# option and driver specific configuration. (string value)
+#transport_url=<None>
+
+# The messaging driver to use, defaults to rabbit. Other
+# drivers include qpid and zmq. (string value)
+#rpc_backend=rabbit
+
+
+# The default exchange under which topics are scoped. May be
+# overridden by an exchange name specified in the
+# transport_url option. (string value)
+#control_exchange=openstack
+
+
+#
+# Options defined in ceilometer.middleware
+#
+
+# Exchanges name to listen for notifications. (multi valued)
+#http_control_exchanges=nova
+#http_control_exchanges=glance
+#http_control_exchanges=neutron
+#http_control_exchanges=cinder
+
+
+#
+# Options defined in ceilometer.pipeline
+#
+
+# Configuration file for pipeline definition. (string value)
+#pipeline_cfg_file=pipeline.yaml
+
+
+#
+# Options defined in ceilometer.sample
+#
+
+# Source for samples emitted on this instance. (string value)
+# Deprecated group/name - [DEFAULT]/counter_source
+#sample_source=openstack
+
+
+#
+# Options defined in ceilometer.service
+#
+
+# Name of this node, which must be valid in an AMQP key. Can
+# be an opaque identifier. For ZeroMQ only, must be a valid
+# host name, FQDN, or IP address. (string value)
+#host=ceilometer
+
+# Number of workers for collector service. A single collector
+# is enabled by default. (integer value)
+#collector_workers=1
+
+# Number of workers for notification service. A single
+# notification agent is enabled by default. (integer value)
+#notification_workers=1
+
+
+#
+# Options defined in ceilometer.api.app
+#
+
+# Configuration file for WSGI definition of API. (string
+# value)
+#api_paste_config=api_paste.ini
+
+
+#
+# Options defined in ceilometer.compute.notifications
+#
+
+# Exchange name for Nova notifications. (string value)
+#nova_control_exchange=nova
+
+
+#
+# Options defined in ceilometer.compute.util
+#
+
+# List of metadata prefixes reserved for metering use. (list
+# value)
+#reserved_metadata_namespace=metering.
+
+# Limit on length of reserved metadata values. (integer value)
+#reserved_metadata_length=256
+
+
+#
+# Options defined in ceilometer.compute.virt.inspector
+#
+
+# Inspector to use for inspecting the hypervisor layer.
+# (string value)
+#hypervisor_inspector=libvirt
+
+
+#
+# Options defined in ceilometer.compute.virt.libvirt.inspector
+#
+
+# Libvirt domain type (valid options are: kvm, lxc, qemu, uml,
+# xen). (string value)
+#libvirt_type=kvm
+
+# Override the default libvirt URI (which is dependent on
+# libvirt_type). (string value)
+#libvirt_uri=
+
+
+#
+# Options defined in ceilometer.dispatcher
+#
+
+# Dispatcher to process data. (multi valued)
+#dispatcher=database
+
+
+#
+# Options defined in ceilometer.image.notifications
+#
+
+# Exchange name for Glance notifications. (string value)
+#glance_control_exchange=glance
+
+
+#
+# Options defined in ceilometer.network.notifications
+#
+
+# Exchange name for Neutron notifications. (string value)
+# Deprecated group/name - [DEFAULT]/quantum_control_exchange
+#neutron_control_exchange=neutron
+
+
+#
+# Options defined in ceilometer.objectstore.swift
+#
+
+# Swift reseller prefix. Must be on par with reseller_prefix
+# in proxy-server.conf. (string value)
+#reseller_prefix=AUTH_
+
+
+#
+# Options defined in ceilometer.openstack.common.eventlet_backdoor
+#
+
+# Enable eventlet backdoor. Acceptable values are 0, <port>,
+# and <start>:<end>, where 0 results in listening on a random
+# tcp port number; <port> results in listening on the
+# specified port number (and not enabling backdoor if that
+# port is in use); and <start>:<end> results in listening on
+# the smallest unused port number within the specified range
+# of port numbers. The chosen port is displayed in the
+# service's log file. (string value)
+#backdoor_port=<None>
+
+
+#
+# Options defined in ceilometer.openstack.common.lockutils
+#
+
+# Enables or disables inter-process locks. (boolean value)
+#disable_process_locking=false
+
+# Directory to use for lock files. (string value)
+#lock_path=<None>
+
+
+#
+# Options defined in ceilometer.openstack.common.log
+#
+
+# Print debugging output (set logging level to DEBUG instead
+# of default WARNING level). (boolean value)
+#debug=false
+debug=False
+
+# Print more verbose output (set logging level to INFO instead
+# of default WARNING level). (boolean value)
+#verbose=false
+verbose=True
+
+# Log output to standard error. (boolean value)
+#use_stderr=true
+
+# Format string to use for log messages with context. (string
+# value)
+#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
+
+# Format string to use for log messages without context.
+# (string value)
+#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s
+
+# Data to append to log format when level is DEBUG. (string
+# value)
+#logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d
+
+# Prefix each line of exception output with this format.
+# (string value)
+#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s
+
+# List of logger=LEVEL pairs. (list value)
+#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN
+
+# Enables or disables publication of error events. (boolean
+# value)
+#publish_errors=false
+
+# Enables or disables fatal status of deprecations. (boolean
+# value)
+#fatal_deprecations=false
+
+# The format for an instance that is passed with the log
+# message. (string value)
+#instance_format="[instance: %(uuid)s] "
+
+# The format for an instance UUID that is passed with the log
+# message. (string value)
+#instance_uuid_format="[instance: %(uuid)s] "
+
+# The name of a logging configuration file. This file is
+# appended to any existing logging configuration files. For
+# details about logging configuration files, see the Python
+# logging module documentation. (string value)
+# Deprecated group/name - [DEFAULT]/log_config
+#log_config_append=<None>
+
+# DEPRECATED. A logging.Formatter log message format string
+# which may use any of the available logging.LogRecord
+# attributes. This option is deprecated. Please use
+# logging_context_format_string and
+# logging_default_format_string instead. (string value)
+#log_format=<None>
+
+# Format string for %%(asctime)s in log records. Default:
+# %(default)s . (string value)
+#log_date_format=%Y-%m-%d %H:%M:%S
+
+# (Optional) Name of log file to output to. If no default is
+# set, logging will go to stdout. (string value)
+# Deprecated group/name - [DEFAULT]/logfile
+#log_file=<None>
+
+# (Optional) The base directory used for relative --log-file
+# paths. (string value)
+# Deprecated group/name - [DEFAULT]/logdir
+#log_dir=<None>
+log_dir=/var/log/ceilometer
+
+# Use syslog for logging. Existing syslog format is DEPRECATED
+# during I, and will change in J to honor RFC5424. (boolean
+# value)
+#use_syslog=false
+
+# (Optional) Enables or disables syslog rfc5424 format for
+# logging. If enabled, prefixes the MSG part of the syslog
+# message with APP-NAME (RFC5424). The format without the APP-
+# NAME is deprecated in I, and will be removed in J. (boolean
+# value)
+#use_syslog_rfc_format=false
+
+
+# Syslog facility to receive log lines. (string value)
+#syslog_log_facility=LOG_USER
+
+
+#
+# Options defined in ceilometer.openstack.common.middleware.sizelimit
+#
+
+# The maximum body size for each request, in bytes. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/osapi_max_request_body_size
+#max_request_body_size=114688
+
+
+#
+# Options defined in ceilometer.openstack.common.policy
+#
+
+# The JSON file that defines policies. (string value)
+#policy_file=policy.json
+
+# Default rule. Enforced when a requested rule is not found.
+# (string value)
+#policy_default_rule=default
+
+
+#
+# Options defined in ceilometer.orchestration.notifications
+#
+
+# Exchange name for Heat notifications (string value)
+#heat_control_exchange=heat
+
+
+#
+# Options defined in ceilometer.storage
+#
+
+# DEPRECATED - Database connection string. (string value)
+#database_connection=<None>
+
+
+#
+# Options defined in ceilometer.volume.notifications
+#
+
+# Exchange name for Cinder notifications. (string value)
+#cinder_control_exchange=cinder
+
+
+[alarm]
+
+#
+# Options defined in ceilometer.cli
+#
+
+# Class to launch as alarm evaluation service. (string value)
+#evaluation_service=ceilometer.alarm.service.SingletonAlarmService
+
+
+
+#
+# Options defined in ceilometer.alarm.notifier.rest
+#
+
+# SSL Client certificate for REST notifier. (string value)
+#rest_notifier_certificate_file=
+
+# SSL Client private key for REST notifier. (string value)
+#rest_notifier_certificate_key=
+
+# Whether to verify the SSL Server certificate when calling
+# alarm action. (boolean value)
+#rest_notifier_ssl_verify=true
+
+
+#
+# Options defined in ceilometer.alarm.rpc
+#
+
+# The topic that ceilometer uses for alarm notifier messages.
+# (string value)
+#notifier_rpc_topic=alarm_notifier
+
+# The topic that ceilometer uses for alarm partition
+# coordination messages. (string value)
+#partition_rpc_topic=alarm_partition_coordination
+
+
+
+#
+# Options defined in ceilometer.alarm.service
+#
+
+# Period of evaluation cycle, should be >= than configured
+# pipeline interval for collection of underlying metrics.
+# (integer value)
+# Deprecated group/name - [alarm]/threshold_evaluation_interval
+#evaluation_interval=60
+
+
+
+#
+# Options defined in ceilometer.api.controllers.v2
+#
+
+# Record alarm change events. (boolean value)
+#record_history=true
+
+
+
+[api]
+
+#
+# Options defined in ceilometer.api
+#
+
+# The port for the ceilometer API server. (integer value)
+# Deprecated group/name - [DEFAULT]/metering_api_port
+#port=8777
+
+
+# The listen IP for the ceilometer API server. (string value)
+#host=0.0.0.0
+
+
+# Set it to False if your environment does not need or have
+# dns server, otherwise it will delay the response from api.
+# (boolean value)
+#enable_reverse_dns_lookup=false
+
+
+[collector]
+
+#
+# Options defined in ceilometer.collector
+#
+
+# Address to which the UDP socket is bound. Set to an empty
+# string to disable. (string value)
+#udp_address=0.0.0.0
+
+# Port to which the UDP socket is bound. (integer value)
+#udp_port=4952
+
+
+[database]
+
+#
+# Options defined in ceilometer.openstack.common.db.options
+#
+
+# The file name to use with SQLite (string value)
+#sqlite_db=ceilometer.sqlite
+
+# If True, SQLite uses synchronous mode (boolean value)
+#sqlite_synchronous=true
+
+# The backend to use for db (string value)
+# Deprecated group/name - [DEFAULT]/db_backend
+#backend=sqlalchemy
+
+# The SQLAlchemy connection string used to connect to the
+# database (string value)
+# Deprecated group/name - [DEFAULT]/sql_connection
+# Deprecated group/name - [DATABASE]/sql_connection
+# Deprecated group/name - [sql]/connection
+#connection=<None>
+#connection=mongodb://ceilometer:WR69Fn0L@192.168.0.4,192.168.0.5,192.168.0.6/ceilometer
+
+
+# The SQL mode to be used for MySQL sessions. This option,
+# including the default, overrides any server-set SQL mode. To
+# use whatever SQL mode is set by the server configuration,
+# set this to no value. Example: mysql_sql_mode= (string
+# value)
+#mysql_sql_mode=TRADITIONAL
+
+# Timeout before idle sql connections are reaped (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_idle_timeout
+# Deprecated group/name - [DATABASE]/sql_idle_timeout
+# Deprecated group/name - [sql]/idle_timeout
+#idle_timeout=3600
+
+# Minimum number of SQL connections to keep open in a pool
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_min_pool_size
+# Deprecated group/name - [DATABASE]/sql_min_pool_size
+#min_pool_size=1
+
+# Maximum number of SQL connections to keep open in a pool
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_pool_size
+# Deprecated group/name - [DATABASE]/sql_max_pool_size
+#max_pool_size=<None>
+
+# Maximum db connection retries during startup. (setting -1
+# implies an infinite retry count) (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_retries
+# Deprecated group/name - [DATABASE]/sql_max_retries
+#max_retries=10
+
+# Interval between retries of opening a sql connection
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_retry_interval
+# Deprecated group/name - [DATABASE]/reconnect_interval
+#retry_interval=10
+
+# If set, use this value for max_overflow with sqlalchemy
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_overflow
+# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow
+#max_overflow=<None>
+
+# Verbosity of SQL debugging information. 0=None,
+# 100=Everything (integer value)
+# Deprecated group/name - [DEFAULT]/sql_connection_debug
+#connection_debug=0
+
+# Add python stack traces to SQL as comment strings (boolean
+# value)
+# Deprecated group/name - [DEFAULT]/sql_connection_trace
+#connection_trace=false
+
+# If set, use this value for pool_timeout with sqlalchemy
+# (integer value)
+# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout
+#pool_timeout=<None>
+
+# Enable the experimental use of database reconnect on
+# connection lost (boolean value)
+#use_db_reconnect=false
+
+# seconds between db connection retries (integer value)
+#db_retry_interval=1
+
+# Whether to increase interval between db connection retries,
+# up to db_max_retry_interval (boolean value)
+#db_inc_retry_interval=true
+
+# max seconds between db connection retries, if
+# db_inc_retry_interval is enabled (integer value)
+#db_max_retry_interval=10
+
+# maximum db connection retries before error is raised.
+# (setting -1 implies an infinite retry count) (integer value)
+#db_max_retries=20
+
+
+#
+# Options defined in ceilometer.storage
+#
+
+# Number of seconds that samples are kept in the database for
+# (<= 0 means forever). (integer value)
+#time_to_live=-1
+
+
+[dispatcher_file]
+
+#
+# Options defined in ceilometer.dispatcher.file
+#
+
+# Name and the location of the file to record meters. (string
+# value)
+#file_path=<None>
+
+# The max size of the file. (integer value)
+#max_bytes=0
+
+# The max number of the files to keep. (integer value)
+#backup_count=0
+
+
+[event]
+
+#
+# Options defined in ceilometer.event.converter
+#
+
+# Configuration file for event definitions. (string value)
+#definitions_cfg_file=event_definitions.yaml
+
+# Drop notifications if no event definition matches.
+# (Otherwise, we convert them with just the default traits)
+# (boolean value)
+#drop_unmatched_notifications=false
+
+
+[keystone_authtoken]
+
+#
+# Options defined in keystoneclient.middleware.auth_token
+#
+
+# Prefix to prepend at the beginning of the path. Deprecated,
+# use identity_uri. (string value)
+#auth_admin_prefix=
+
+auth_host={{ agent.identity.host }}
+
+# Port of the admin Identity API endpoint (integer value)
+#auth_port=35357
+auth_port={{ agent.identity.port }}
+
+# Protocol of the admin Identity API endpoint(http or https)
+# (string value)
+#auth_protocol=https
+auth_protocol=http
+
+# Complete public Identity API endpoint (string value)
+#auth_uri=<None>
+auth_uri=http://{{ agent.identity.host }}:5000/
+
+# Complete admin Identity API endpoint. This should specify
+# the unversioned root endpoint e.g. https://localhost:35357/
+# (string value)
+#identity_uri=<None>
+
+# API version of the admin Identity API endpoint (string
+# value)
+#auth_version=<None>
+
+# Do not handle authorization requests within the middleware,
+# but delegate the authorization decision to downstream WSGI
+# components (boolean value)
+#delay_auth_decision=false
+
+# Request timeout value for communicating with Identity API
+# server. (boolean value)
+#http_connect_timeout=<None>
+
+# How many times are we trying to reconnect when communicating
+# with Identity API Server. (integer value)
+#http_request_max_retries=3
+
+# This option is deprecated and may be removed in a future
+# release. Single shared secret with the Keystone
+# configuration used for bootstrapping a Keystone
+# installation, or otherwise bypassing the normal
+# authentication process. This option should not be used, use
+# `admin_user` and `admin_password` instead. (string value)
+#admin_token=<None>
+
+# Keystone account username (string value)
+#admin_user=<None>
+admin_user={{ agent.identity.user }}
+
+# Keystone account password (string value)
+#admin_password=<None>
+admin_password={{ agent.identity.password }}
+
+# Keystone service account tenant name to validate user tokens
+# (string value)
+#admin_tenant_name=admin
+admin_tenant_name={{ agent.identity.tenant }}
+
+# Env key for the swift cache (string value)
+#cache=<None>
+
+# Required if Keystone server requires client certificate
+# (string value)
+#certfile=<None>
+
+# Required if Keystone server requires client certificate
+# (string value)
+#keyfile=<None>
+
+# A PEM encoded Certificate Authority to use when verifying
+# HTTPs connections. Defaults to system CAs. (string value)
+#cafile=<None>
+
+# Verify HTTPS connections. (boolean value)
+#insecure=false
+
+# Directory used to cache files related to PKI tokens (string
+# value)
+#signing_dir=<None>
+
+# Optionally specify a list of memcached server(s) to use for
+# caching. If left undefined, tokens will instead be cached
+# in-process. (list value)
+# Deprecated group/name - [DEFAULT]/memcache_servers
+#memcached_servers=<None>
+
+# In order to prevent excessive effort spent validating
+# tokens, the middleware caches previously-seen tokens for a
+# configurable duration (in seconds). Set to -1 to disable
+# caching completely. (integer value)
+#token_cache_time=300
+
+# Determines the frequency at which the list of revoked tokens
+# is retrieved from the Identity service (in seconds). A high
+# number of revocation events combined with a low cache
+# duration may significantly reduce performance. (integer
+# value)
+#revocation_cache_time=10
+
+# (optional) if defined, indicate whether token data should be
+# authenticated or authenticated and encrypted. Acceptable
+# values are MAC or ENCRYPT. If MAC, token data is
+# authenticated (with HMAC) in the cache. If ENCRYPT, token
+# data is encrypted and authenticated in the cache. If the
+# value is not one of these options or empty, auth_token will
+# raise an exception on initialization. (string value)
+#memcache_security_strategy=<None>
+
+# (optional, mandatory if memcache_security_strategy is
+# defined) this string is used for key derivation. (string
+# value)
+#memcache_secret_key=<None>
+
+# (optional) indicate whether to set the X-Service-Catalog
+# header. If False, middleware will not ask for service
+# catalog on token validation and will not set the X-Service-
+# Catalog header. (boolean value)
+#include_service_catalog=true
+
+# Used to control the use and type of token binding. Can be
+# set to: "disabled" to not check token binding. "permissive"
+# (default) to validate binding information if the bind type
+# is of a form known to the server and ignore it if not.
+# "strict" like "permissive" but if the bind type is unknown
+# the token will be rejected. "required" any form of token
+# binding is needed to be allowed. Finally the name of a
+# binding method that must be present in tokens. (string
+# value)
+#enforce_token_bind=permissive
+
+# If true, the revocation list will be checked for cached
+# tokens. This requires that PKI tokens are configured on the
+# Keystone server. (boolean value)
+#check_revocations_for_cached=false
+
+# Hash algorithms to use for hashing PKI tokens. This may be a
+# single algorithm or multiple. The algorithms are those
+# supported by Python standard hashlib.new(). The hashes will
+# be tried in the order given, so put the preferred one first
+# for performance. The result of the first hash will be stored
+# in the cache. This will typically be set to multiple values
+# only while migrating from a less secure algorithm to a more
+# secure one. Once all the old tokens are expired this option
+# should be set to a single value for better performance.
+# (list value)
+#hash_algorithms=md5
+
+[matchmaker_ring]
+
+#
+# Options defined in oslo.messaging
+#
+
+# Matchmaker ring file (JSON). (string value)
+# Deprecated group/name - [DEFAULT]/matchmaker_ringfile
+#ringfile=/etc/oslo/matchmaker_ring.json
+
+
+[notification]
+
+#
+# Options defined in ceilometer.notification
+#
+
+# Acknowledge message when event persistence fails. (boolean
+# value)
+#ack_on_event_error=true
+
+# Save event details. (boolean value)
+#store_events=false
+
+# Messaging URLs to listen for notifications. Example:
+# transport://user:pass@host1:port[,hostN:portN]/virtual_host
+# (DEFAULT/transport_url is used if empty) (multi valued)
+#messaging_urls=
+
+
+[publisher]
+
+#
+# Options defined in ceilometer.publisher.utils
+#
+
+# Secret value for signing metering messages. (string value)
+# Deprecated group/name - [DEFAULT]/metering_secret
+# Deprecated group/name - [publisher_rpc]/metering_secret
+#metering_secret=change this or be hacked
+metering_secret={{ agent.secret }}
+
+
+
+
+[publisher_rpc]
+
+#
+# Options defined in ceilometer.publisher.rpc
+#
+
+# The topic that ceilometer uses for metering messages.
+# (string value)
+#metering_topic=metering
+
+
+[service_credentials]
+
+#
+# Options defined in ceilometer.service
+#
+
+# User name to use for OpenStack service access. (string
+# value)
+#os_username=ceilometer
+os_username={{ agent.identity.user }}
+
+# Password to use for OpenStack service access. (string value)
+#os_password=admin
+os_password={{ agent.identity.password }}
+
+# Tenant ID to use for OpenStack service access. (string
+# value)
+#os_tenant_id=
+
+# Tenant name to use for OpenStack service access. (string
+# value)
+#os_tenant_name=admin
+os_tenant_name={{ agent.identity.tenant }}
+
+# Certificate chain for SSL validation. (string value)
+#os_cacert=<None>
+
+# Auth URL to use for OpenStack service access. (string value)
+#os_auth_url=http://localhost:5000/v2.0
+os_auth_url=http://{{ agent.identity.host }}:5000/v2.0
+
+# Region name to use fo OpenStack service endpoints. (string
+# value)
+#os_region_name=<None>
+os_region_name=RegionOne
+
+# Type of endpoint in Identity service catalog to use for
+# communication with OpenStack services. (string value)
+#os_endpoint_type=publicURL
+os_endpoint_type=internalURL
+
+# Disables X.509 certificate validation when an SSL connection
+# to Identity Service is established. (boolean value)
+#insecure=false
+
+
+[vmware]
+
+#
+# Options defined in ceilometer.compute.virt.vmware.inspector
+#
+
+# IP address of the VMware Vsphere host (string value)
+#host_ip=
+
+# Username of VMware Vsphere (string value)
+#host_username=
+
+# Password of VMware Vsphere (string value)
+#host_password=
+
+# Number of times a VMware Vsphere API must be retried
+# (integer value)
+#api_retry_count=10
+
+# Sleep time in seconds for polling an ongoing async task
+# (floating point value)
+#task_poll_interval=0.5
+
+# Optional vim service WSDL location e.g
+# http://<server>/vimService.wsdl. Optional over-ride to
+# default location for bug work-arounds (string value)
+#wsdl_location=<None>
+
+{%- if agent.publisher.graphite is defined %}
+
+[graphite]
+prefix = {{ agent.publisher.graphite.get('prefix', 'ceilometer') }}.
+append_hostname = true
+
+{%- endif %}
diff --git a/ceilometer/files/juno/ceilometer-server.conf.Debian b/ceilometer/files/juno/ceilometer-server.conf.Debian
new file mode 100644
index 0000000..51d71a0
--- /dev/null
+++ b/ceilometer/files/juno/ceilometer-server.conf.Debian
@@ -0,0 +1,1023 @@
+{%- from "ceilometer/map.jinja" import server with context %}
+[DEFAULT]
+
+#
+# Options defined in oslo.messaging
+#
+
+# Use durable queues in amqp. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_durable_queues
+#amqp_durable_queues=false
+
+# Auto-delete queues in amqp. (boolean value)
+#amqp_auto_delete=false
+
+# Size of RPC connection pool. (integer value)
+#rpc_conn_pool_size=30
+
+# Modules of exceptions that are permitted to be recreated
+# upon receiving exception data from an rpc call. (list value)
+#allowed_rpc_exception_modules=oslo.messaging.exceptions,nova.exception,cinder.exception,exceptions
+
+# Qpid broker hostname. (string value)
+#qpid_hostname=localhost
+
+# Qpid broker port. (integer value)
+#qpid_port=5672
+
+# Qpid HA cluster host:port pairs. (list value)
+#qpid_hosts=$qpid_hostname:$qpid_port
+
+# Username for Qpid connection. (string value)
+#qpid_username=
+
+# Password for Qpid connection. (string value)
+#qpid_password=
+
+# Space separated list of SASL mechanisms to use for auth.
+# (string value)
+#qpid_sasl_mechanisms=
+
+# Seconds between connection keepalive heartbeats. (integer
+# value)
+#qpid_heartbeat=60
+
+# Transport to use, either 'tcp' or 'ssl'. (string value)
+#qpid_protocol=tcp
+
+# Whether to disable the Nagle algorithm. (boolean value)
+#qpid_tcp_nodelay=true
+
+# The qpid topology version to use. Version 1 is what was
+# originally used by impl_qpid. Version 2 includes some
+# backwards-incompatible changes that allow broker federation
+# to work. Users should update to version 2 when they are
+# able to take everything down, as it requires a clean break.
+# (integer value)
+#qpid_topology_version=1
+
+# SSL version to use (valid only if SSL enabled). valid values
+# are TLSv1, SSLv23 and SSLv3. SSLv2 may be available on some
+# distributions. (string value)
+#kombu_ssl_version=
+
+# SSL key file (valid only if SSL enabled). (string value)
+#kombu_ssl_keyfile=
+
+# SSL cert file (valid only if SSL enabled). (string value)
+#kombu_ssl_certfile=
+
+# SSL certification authority file (valid only if SSL
+# enabled). (string value)
+#kombu_ssl_ca_certs=
+
+# How long to wait before reconnecting in response to an AMQP
+# consumer cancel notification. (floating point value)
+#kombu_reconnect_delay=1.0
+
+# The RabbitMQ broker address where a single node is used.
+# (string value)
+#rabbit_host=localhost
+
+# The RabbitMQ broker port where a single node is used.
+# (integer value)
+#rabbit_port=5672
+
+#Rabbit
+kombu_reconnect_delay=5.0
+rpc_backend=ceilometer.openstack.common.rpc.impl_kombu
+
+rabbit_host = {{ server.message_queue.host }}
+rabbit_port = {{ server.message_queue.port }}
+rabbit_userid = {{ server.message_queue.user }}
+rabbit_password = {{ server.message_queue.password }}
+rabbit_virtual_host = {{ server.message_queue.virtual_host }}
+rabbit_ha_queues={{ server.message_queue.ha_queues }}
+
+{%- if server.message_queue.rpc_thread_pool_size is defined %}
+rpc_thread_pool_size = {{ server.message_queue.rpc_thread_pool_size }}
+{%- endif %}
+
+notification_topics=notifications
+
+# If passed, use a fake RabbitMQ provider. (boolean value)
+#fake_rabbit=false
+
+# ZeroMQ bind address. Should be a wildcard (*), an ethernet
+# interface, or IP. The "host" option should point or resolve
+# to this address. (string value)
+#rpc_zmq_bind_address=*
+
+# MatchMaker driver. (string value)
+#rpc_zmq_matchmaker=oslo.messaging._drivers.matchmaker.MatchMakerLocalhost
+
+# ZeroMQ receiver listening port. (integer value)
+#rpc_zmq_port=9501
+
+# Number of ZeroMQ contexts, defaults to 1. (integer value)
+#rpc_zmq_contexts=1
+
+# Maximum number of ingress messages to locally buffer per
+# topic. Default is unlimited. (integer value)
+#rpc_zmq_topic_backlog=<None>
+
+# Directory for holding IPC sockets. (string value)
+#rpc_zmq_ipc_dir=/var/run/openstack
+
+# Name of this node. Must be a valid hostname, FQDN, or IP
+# address. Must match "host" option, if running Nova. (string
+# value)
+#rpc_zmq_host=ceilometer
+
+# Seconds to wait before a cast expires (TTL). Only supported
+# by impl_zmq. (integer value)
+#rpc_cast_timeout=30
+
+# Heartbeat frequency. (integer value)
+#matchmaker_heartbeat_freq=300
+
+# Heartbeat time-to-live. (integer value)
+#matchmaker_heartbeat_ttl=600
+
+# Host to locate redis. (string value)
+#host=127.0.0.1
+
+# Use this port to connect to redis host. (integer value)
+#port=6379
+
+# Password for Redis server (optional). (string value)
+#password=<None>
+
+# Size of RPC greenthread pool. (integer value)
+#rpc_thread_pool_size=64
+
+# Driver or drivers to handle sending notifications. (multi
+# valued)
+#notification_driver=
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+#notification_topics=notifications
+
+
+# Seconds to wait for a response from a call. (integer value)
+#rpc_response_timeout=60
+
+# A URL representing the messaging driver to use and its full
+# configuration. If not set, we fall back to the rpc_backend
+# option and driver specific configuration. (string value)
+#transport_url=<None>
+
+# The messaging driver to use, defaults to rabbit. Other
+# drivers include qpid and zmq. (string value)
+#rpc_backend=rabbit
+
+
+# The default exchange under which topics are scoped. May be
+# overridden by an exchange name specified in the
+# transport_url option. (string value)
+#control_exchange=openstack
+
+
+#
+# Options defined in ceilometer.middleware
+#
+
+# Exchanges name to listen for notifications. (multi valued)
+#http_control_exchanges=nova
+#http_control_exchanges=glance
+#http_control_exchanges=neutron
+#http_control_exchanges=cinder
+
+
+#
+# Options defined in ceilometer.pipeline
+#
+
+# Configuration file for pipeline definition. (string value)
+#pipeline_cfg_file=pipeline.yaml
+
+
+#
+# Options defined in ceilometer.sample
+#
+
+# Source for samples emitted on this instance. (string value)
+# Deprecated group/name - [DEFAULT]/counter_source
+#sample_source=openstack
+
+
+#
+# Options defined in ceilometer.service
+#
+
+# Name of this node, which must be valid in an AMQP key. Can
+# be an opaque identifier. For ZeroMQ only, must be a valid
+# host name, FQDN, or IP address. (string value)
+#host=ceilometer
+
+# Number of workers for collector service. A single collector
+# is enabled by default. (integer value)
+#collector_workers=1
+
+# Number of workers for notification service. A single
+# notification agent is enabled by default. (integer value)
+#notification_workers=1
+
+
+#
+# Options defined in ceilometer.api.app
+#
+
+# Configuration file for WSGI definition of API. (string
+# value)
+#api_paste_config=api_paste.ini
+
+
+#
+# Options defined in ceilometer.compute.notifications
+#
+
+# Exchange name for Nova notifications. (string value)
+#nova_control_exchange=nova
+
+
+#
+# Options defined in ceilometer.compute.util
+#
+
+# List of metadata prefixes reserved for metering use. (list
+# value)
+#reserved_metadata_namespace=metering.
+
+# Limit on length of reserved metadata values. (integer value)
+#reserved_metadata_length=256
+
+
+#
+# Options defined in ceilometer.compute.virt.inspector
+#
+
+# Inspector to use for inspecting the hypervisor layer.
+# (string value)
+#hypervisor_inspector=libvirt
+
+
+#
+# Options defined in ceilometer.compute.virt.libvirt.inspector
+#
+
+# Libvirt domain type (valid options are: kvm, lxc, qemu, uml,
+# xen). (string value)
+#libvirt_type=kvm
+
+# Override the default libvirt URI (which is dependent on
+# libvirt_type). (string value)
+#libvirt_uri=
+
+
+#
+# Options defined in ceilometer.dispatcher
+#
+
+# Dispatcher to process data. (multi valued)
+#dispatcher=database
+
+
+#
+# Options defined in ceilometer.image.notifications
+#
+
+# Exchange name for Glance notifications. (string value)
+#glance_control_exchange=glance
+
+
+#
+# Options defined in ceilometer.network.notifications
+#
+
+# Exchange name for Neutron notifications. (string value)
+# Deprecated group/name - [DEFAULT]/quantum_control_exchange
+#neutron_control_exchange=neutron
+
+
+#
+# Options defined in ceilometer.objectstore.swift
+#
+
+# Swift reseller prefix. Must be on par with reseller_prefix
+# in proxy-server.conf. (string value)
+#reseller_prefix=AUTH_
+
+
+#
+# Options defined in ceilometer.openstack.common.eventlet_backdoor
+#
+
+# Enable eventlet backdoor. Acceptable values are 0, <port>,
+# and <start>:<end>, where 0 results in listening on a random
+# tcp port number; <port> results in listening on the
+# specified port number (and not enabling backdoor if that
+# port is in use); and <start>:<end> results in listening on
+# the smallest unused port number within the specified range
+# of port numbers. The chosen port is displayed in the
+# service's log file. (string value)
+#backdoor_port=<None>
+
+
+#
+# Options defined in ceilometer.openstack.common.lockutils
+#
+
+# Enables or disables inter-process locks. (boolean value)
+#disable_process_locking=false
+
+# Directory to use for lock files. (string value)
+#lock_path=<None>
+
+
+#
+# Options defined in ceilometer.openstack.common.log
+#
+
+# Print debugging output (set logging level to DEBUG instead
+# of default WARNING level). (boolean value)
+#debug=false
+debug=False
+
+# Print more verbose output (set logging level to INFO instead
+# of default WARNING level). (boolean value)
+#verbose=false
+verbose=True
+
+# Log output to standard error. (boolean value)
+#use_stderr=true
+
+# Format string to use for log messages with context. (string
+# value)
+#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
+
+# Format string to use for log messages without context.
+# (string value)
+#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s
+
+# Data to append to log format when level is DEBUG. (string
+# value)
+#logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d
+
+# Prefix each line of exception output with this format.
+# (string value)
+#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s
+
+# List of logger=LEVEL pairs. (list value)
+#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN
+
+# Enables or disables publication of error events. (boolean
+# value)
+#publish_errors=false
+
+# Enables or disables fatal status of deprecations. (boolean
+# value)
+#fatal_deprecations=false
+
+# The format for an instance that is passed with the log
+# message. (string value)
+#instance_format="[instance: %(uuid)s] "
+
+# The format for an instance UUID that is passed with the log
+# message. (string value)
+#instance_uuid_format="[instance: %(uuid)s] "
+
+# The name of a logging configuration file. This file is
+# appended to any existing logging configuration files. For
+# details about logging configuration files, see the Python
+# logging module documentation. (string value)
+# Deprecated group/name - [DEFAULT]/log_config
+#log_config_append=<None>
+
+# DEPRECATED. A logging.Formatter log message format string
+# which may use any of the available logging.LogRecord
+# attributes. This option is deprecated. Please use
+# logging_context_format_string and
+# logging_default_format_string instead. (string value)
+#log_format=<None>
+
+# Format string for %%(asctime)s in log records. Default:
+# %(default)s . (string value)
+#log_date_format=%Y-%m-%d %H:%M:%S
+
+# (Optional) Name of log file to output to. If no default is
+# set, logging will go to stdout. (string value)
+# Deprecated group/name - [DEFAULT]/logfile
+#log_file=<None>
+
+# (Optional) The base directory used for relative --log-file
+# paths. (string value)
+# Deprecated group/name - [DEFAULT]/logdir
+#log_dir=<None>
+log_dir=/var/log/ceilometer
+
+# Use syslog for logging. Existing syslog format is DEPRECATED
+# during I, and will change in J to honor RFC5424. (boolean
+# value)
+#use_syslog=false
+
+# (Optional) Enables or disables syslog rfc5424 format for
+# logging. If enabled, prefixes the MSG part of the syslog
+# message with APP-NAME (RFC5424). The format without the APP-
+# NAME is deprecated in I, and will be removed in J. (boolean
+# value)
+#use_syslog_rfc_format=false
+
+
+# Syslog facility to receive log lines. (string value)
+#syslog_log_facility=LOG_USER
+
+
+#
+# Options defined in ceilometer.openstack.common.middleware.sizelimit
+#
+
+# The maximum body size for each request, in bytes. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/osapi_max_request_body_size
+#max_request_body_size=114688
+
+
+#
+# Options defined in ceilometer.openstack.common.policy
+#
+
+# The JSON file that defines policies. (string value)
+#policy_file=policy.json
+
+# Default rule. Enforced when a requested rule is not found.
+# (string value)
+#policy_default_rule=default
+
+
+#
+# Options defined in ceilometer.orchestration.notifications
+#
+
+# Exchange name for Heat notifications (string value)
+#heat_control_exchange=heat
+
+
+#
+# Options defined in ceilometer.storage
+#
+
+# DEPRECATED - Database connection string. (string value)
+#database_connection=<None>
+
+
+#
+# Options defined in ceilometer.volume.notifications
+#
+
+# Exchange name for Cinder notifications. (string value)
+#cinder_control_exchange=cinder
+
+
+[alarm]
+
+#
+# Options defined in ceilometer.cli
+#
+
+# Class to launch as alarm evaluation service. (string value)
+#evaluation_service=ceilometer.alarm.service.SingletonAlarmService
+evaluation_service=ceilometer.alarm.service.SingletonAlarmService
+
+
+#
+# Options defined in ceilometer.alarm.notifier.rest
+#
+
+# SSL Client certificate for REST notifier. (string value)
+#rest_notifier_certificate_file=
+
+# SSL Client private key for REST notifier. (string value)
+#rest_notifier_certificate_key=
+
+# Whether to verify the SSL Server certificate when calling
+# alarm action. (boolean value)
+#rest_notifier_ssl_verify=true
+
+
+#
+# Options defined in ceilometer.alarm.rpc
+#
+
+# The topic that ceilometer uses for alarm notifier messages.
+# (string value)
+#notifier_rpc_topic=alarm_notifier
+
+# The topic that ceilometer uses for alarm partition
+# coordination messages. (string value)
+#partition_rpc_topic=alarm_partition_coordination
+partition_rpc_topic=alarm_partition_coordination
+
+
+#
+# Options defined in ceilometer.alarm.service
+#
+
+# Period of evaluation cycle, should be >= than configured
+# pipeline interval for collection of underlying metrics.
+# (integer value)
+# Deprecated group/name - [alarm]/threshold_evaluation_interval
+#evaluation_interval=60
+evaluation_interval=60
+
+
+#
+# Options defined in ceilometer.api.controllers.v2
+#
+
+# Record alarm change events. (boolean value)
+#record_history=true
+record_history=True
+
+
+[api]
+
+#
+# Options defined in ceilometer.api
+#
+
+# The port for the ceilometer API server. (integer value)
+# Deprecated group/name - [DEFAULT]/metering_api_port
+#port=8777
+port={{ server.bind.port }}
+
+# The listen IP for the ceilometer API server. (string value)
+#host=0.0.0.0
+host={{ server.bind.host }}
+
+# Set it to False if your environment does not need or have
+# dns server, otherwise it will delay the response from api.
+# (boolean value)
+#enable_reverse_dns_lookup=false
+
+
+[collector]
+
+#
+# Options defined in ceilometer.collector
+#
+
+# Address to which the UDP socket is bound. Set to an empty
+# string to disable. (string value)
+#udp_address=0.0.0.0
+
+# Port to which the UDP socket is bound. (integer value)
+#udp_port=4952
+
+
+[database]
+
+#
+# Options defined in ceilometer.openstack.common.db.options
+#
+
+# The file name to use with SQLite (string value)
+#sqlite_db=ceilometer.sqlite
+
+# If True, SQLite uses synchronous mode (boolean value)
+#sqlite_synchronous=true
+
+# The backend to use for db (string value)
+# Deprecated group/name - [DEFAULT]/db_backend
+#backend=sqlalchemy
+
+# The SQLAlchemy connection string used to connect to the
+# database (string value)
+# Deprecated group/name - [DEFAULT]/sql_connection
+# Deprecated group/name - [DATABASE]/sql_connection
+# Deprecated group/name - [sql]/connection
+#connection=<None>
+#connection=mongodb://ceilometer:WR69Fn0L@192.168.0.4,192.168.0.5,192.168.0.6/ceilometer
+{%- if server.database.members is defined %}
+connection={{ server.database.engine }}://{{ server.database.user }}:{{ server.database.password }}@{% for member in server.database.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %},{% endif %}{% endfor %}/{{ server.database.name }}
+{%- else %}
+connection={{ server.database.engine }}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}:{{ server.database.port }}/{{ server.database.name }}
+{%- endif %}
+
+# The SQL mode to be used for MySQL sessions. This option,
+# including the default, overrides any server-set SQL mode. To
+# use whatever SQL mode is set by the server configuration,
+# set this to no value. Example: mysql_sql_mode= (string
+# value)
+#mysql_sql_mode=TRADITIONAL
+
+# Timeout before idle sql connections are reaped (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_idle_timeout
+# Deprecated group/name - [DATABASE]/sql_idle_timeout
+# Deprecated group/name - [sql]/idle_timeout
+#idle_timeout=3600
+
+# Minimum number of SQL connections to keep open in a pool
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_min_pool_size
+# Deprecated group/name - [DATABASE]/sql_min_pool_size
+#min_pool_size=1
+
+# Maximum number of SQL connections to keep open in a pool
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_pool_size
+# Deprecated group/name - [DATABASE]/sql_max_pool_size
+#max_pool_size=<None>
+
+# Maximum db connection retries during startup. (setting -1
+# implies an infinite retry count) (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_retries
+# Deprecated group/name - [DATABASE]/sql_max_retries
+#max_retries=10
+
+# Interval between retries of opening a sql connection
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_retry_interval
+# Deprecated group/name - [DATABASE]/reconnect_interval
+#retry_interval=10
+
+# If set, use this value for max_overflow with sqlalchemy
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_overflow
+# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow
+#max_overflow=<None>
+
+# Verbosity of SQL debugging information. 0=None,
+# 100=Everything (integer value)
+# Deprecated group/name - [DEFAULT]/sql_connection_debug
+#connection_debug=0
+
+# Add python stack traces to SQL as comment strings (boolean
+# value)
+# Deprecated group/name - [DEFAULT]/sql_connection_trace
+#connection_trace=false
+
+# If set, use this value for pool_timeout with sqlalchemy
+# (integer value)
+# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout
+#pool_timeout=<None>
+
+# Enable the experimental use of database reconnect on
+# connection lost (boolean value)
+#use_db_reconnect=false
+
+# seconds between db connection retries (integer value)
+#db_retry_interval=1
+
+# Whether to increase interval between db connection retries,
+# up to db_max_retry_interval (boolean value)
+#db_inc_retry_interval=true
+
+# max seconds between db connection retries, if
+# db_inc_retry_interval is enabled (integer value)
+#db_max_retry_interval=10
+
+# maximum db connection retries before error is raised.
+# (setting -1 implies an infinite retry count) (integer value)
+#db_max_retries=20
+
+
+#
+# Options defined in ceilometer.storage
+#
+
+# Number of seconds that samples are kept in the database for
+# (<= 0 means forever). (integer value)
+#time_to_live=-1
+time_to_live={{ server.ttl }}
+
+
+[dispatcher_file]
+
+#
+# Options defined in ceilometer.dispatcher.file
+#
+
+# Name and the location of the file to record meters. (string
+# value)
+#file_path=<None>
+
+# The max size of the file. (integer value)
+#max_bytes=0
+
+# The max number of the files to keep. (integer value)
+#backup_count=0
+
+
+[event]
+
+#
+# Options defined in ceilometer.event.converter
+#
+
+# Configuration file for event definitions. (string value)
+#definitions_cfg_file=event_definitions.yaml
+
+# Drop notifications if no event definition matches.
+# (Otherwise, we convert them with just the default traits)
+# (boolean value)
+#drop_unmatched_notifications=false
+
+
+[keystone_authtoken]
+
+#
+# Options defined in keystoneclient.middleware.auth_token
+#
+
+# Prefix to prepend at the beginning of the path. Deprecated,
+# use identity_uri. (string value)
+#auth_admin_prefix=
+
+auth_host={{ server.identity.host }}
+
+# Port of the admin Identity API endpoint (integer value)
+#auth_port=35357
+auth_port={{ server.identity.port }}
+
+# Protocol of the admin Identity API endpoint(http or https)
+# (string value)
+#auth_protocol=https
+auth_protocol=http
+
+# Complete public Identity API endpoint (string value)
+#auth_uri=<None>
+auth_uri=http://{{ server.identity.host }}:5000/
+
+# Complete admin Identity API endpoint. This should specify
+# the unversioned root endpoint e.g. https://localhost:35357/
+# (string value)
+#identity_uri=<None>
+
+# API version of the admin Identity API endpoint (string
+# value)
+#auth_version=<None>
+
+# Do not handle authorization requests within the middleware,
+# but delegate the authorization decision to downstream WSGI
+# components (boolean value)
+#delay_auth_decision=false
+
+# Request timeout value for communicating with Identity API
+# server. (boolean value)
+#http_connect_timeout=<None>
+
+# How many times are we trying to reconnect when communicating
+# with Identity API Server. (integer value)
+#http_request_max_retries=3
+
+# This option is deprecated and may be removed in a future
+# release. Single shared secret with the Keystone
+# configuration used for bootstrapping a Keystone
+# installation, or otherwise bypassing the normal
+# authentication process. This option should not be used, use
+# `admin_user` and `admin_password` instead. (string value)
+#admin_token=<None>
+
+# Keystone account username (string value)
+#admin_user=<None>
+admin_user={{ server.identity.user }}
+
+# Keystone account password (string value)
+#admin_password=<None>
+admin_password={{ server.identity.password }}
+
+# Keystone service account tenant name to validate user tokens
+# (string value)
+#admin_tenant_name=admin
+admin_tenant_name={{ server.identity.tenant }}
+
+# Env key for the swift cache (string value)
+#cache=<None>
+
+# Required if Keystone server requires client certificate
+# (string value)
+#certfile=<None>
+
+# Required if Keystone server requires client certificate
+# (string value)
+#keyfile=<None>
+
+# A PEM encoded Certificate Authority to use when verifying
+# HTTPs connections. Defaults to system CAs. (string value)
+#cafile=<None>
+
+# Verify HTTPS connections. (boolean value)
+#insecure=false
+
+# Directory used to cache files related to PKI tokens (string
+# value)
+#signing_dir=<None>
+
+# Optionally specify a list of memcached server(s) to use for
+# caching. If left undefined, tokens will instead be cached
+# in-process. (list value)
+# Deprecated group/name - [DEFAULT]/memcache_servers
+#memcached_servers=<None>
+
+# In order to prevent excessive effort spent validating
+# tokens, the middleware caches previously-seen tokens for a
+# configurable duration (in seconds). Set to -1 to disable
+# caching completely. (integer value)
+#token_cache_time=300
+
+# Determines the frequency at which the list of revoked tokens
+# is retrieved from the Identity service (in seconds). A high
+# number of revocation events combined with a low cache
+# duration may significantly reduce performance. (integer
+# value)
+#revocation_cache_time=10
+
+# (optional) if defined, indicate whether token data should be
+# authenticated or authenticated and encrypted. Acceptable
+# values are MAC or ENCRYPT. If MAC, token data is
+# authenticated (with HMAC) in the cache. If ENCRYPT, token
+# data is encrypted and authenticated in the cache. If the
+# value is not one of these options or empty, auth_token will
+# raise an exception on initialization. (string value)
+#memcache_security_strategy=<None>
+
+# (optional, mandatory if memcache_security_strategy is
+# defined) this string is used for key derivation. (string
+# value)
+#memcache_secret_key=<None>
+
+# (optional) indicate whether to set the X-Service-Catalog
+# header. If False, middleware will not ask for service
+# catalog on token validation and will not set the X-Service-
+# Catalog header. (boolean value)
+#include_service_catalog=true
+
+# Used to control the use and type of token binding. Can be
+# set to: "disabled" to not check token binding. "permissive"
+# (default) to validate binding information if the bind type
+# is of a form known to the server and ignore it if not.
+# "strict" like "permissive" but if the bind type is unknown
+# the token will be rejected. "required" any form of token
+# binding is needed to be allowed. Finally the name of a
+# binding method that must be present in tokens. (string
+# value)
+#enforce_token_bind=permissive
+
+# If true, the revocation list will be checked for cached
+# tokens. This requires that PKI tokens are configured on the
+# Keystone server. (boolean value)
+#check_revocations_for_cached=false
+
+# Hash algorithms to use for hashing PKI tokens. This may be a
+# single algorithm or multiple. The algorithms are those
+# supported by Python standard hashlib.new(). The hashes will
+# be tried in the order given, so put the preferred one first
+# for performance. The result of the first hash will be stored
+# in the cache. This will typically be set to multiple values
+# only while migrating from a less secure algorithm to a more
+# secure one. Once all the old tokens are expired this option
+# should be set to a single value for better performance.
+# (list value)
+#hash_algorithms=md5
+
+
+[matchmaker_ring]
+
+#
+# Options defined in oslo.messaging
+#
+
+# Matchmaker ring file (JSON). (string value)
+# Deprecated group/name - [DEFAULT]/matchmaker_ringfile
+#ringfile=/etc/oslo/matchmaker_ring.json
+
+
+[notification]
+
+#
+# Options defined in ceilometer.notification
+#
+
+# Acknowledge message when event persistence fails. (boolean
+# value)
+#ack_on_event_error=true
+ack_on_event_error=True
+
+# Save event details. (boolean value)
+#store_events=false
+store_events=False
+
+# Messaging URLs to listen for notifications. Example:
+# transport://user:pass@host1:port[,hostN:portN]/virtual_host
+# (DEFAULT/transport_url is used if empty) (multi valued)
+#messaging_urls=
+
+
+[publisher]
+
+#
+# Options defined in ceilometer.publisher.utils
+#
+
+# Secret value for signing metering messages. (string value)
+# Deprecated group/name - [DEFAULT]/metering_secret
+# Deprecated group/name - [publisher_rpc]/metering_secret
+#metering_secret=change this or be hacked
+metering_secret={{ server.secret }}
+
+{%- for publisher_name, publisher in server.get('publisher', {}).iteritems() %}
+{%- if publisher_name == 'graphite' %}
+
+graphite=ceilometer.publisher.graphite:GraphitePublisher
+
+{%- endif %}
+{%- endfor %}
+
+[publisher_rpc]
+
+#
+# Options defined in ceilometer.publisher.rpc
+#
+
+# The topic that ceilometer uses for metering messages.
+# (string value)
+#metering_topic=metering
+
+
+[service_credentials]
+
+#
+# Options defined in ceilometer.service
+#
+
+# User name to use for OpenStack service access. (string
+# value)
+#os_username=ceilometer
+os_username={{ server.identity.user }}
+
+# Password to use for OpenStack service access. (string value)
+#os_password=admin
+os_password={{ server.identity.password }}
+
+# Tenant ID to use for OpenStack service access. (string
+# value)
+#os_tenant_id=
+
+# Tenant name to use for OpenStack service access. (string
+# value)
+#os_tenant_name=admin
+os_tenant_name={{ server.identity.tenant }}
+
+# Certificate chain for SSL validation. (string value)
+#os_cacert=<None>
+
+# Auth URL to use for OpenStack service access. (string value)
+#os_auth_url=http://localhost:5000/v2.0
+os_auth_url=http://{{ server.identity.host }}:5000/v2.0
+
+# Region name to use for OpenStack service endpoints. (string
+# value)
+#os_region_name=<None>
+os_region_name=RegionOne
+
+# Type of endpoint in Identity service catalog to use for
+# communication with OpenStack services. (string value)
+#os_endpoint_type=publicURL
+
+# Disables X.509 certificate validation when an SSL connection
+# to Identity Service is established. (boolean value)
+#insecure=false
+
+
+[vmware]
+
+#
+# Options defined in ceilometer.compute.virt.vmware.inspector
+#
+
+# IP address of the VMware Vsphere host (string value)
+#host_ip=
+
+# Username of VMware Vsphere (string value)
+#host_username=
+
+# Password of VMware Vsphere (string value)
+#host_password=
+
+# Number of times a VMware Vsphere API must be retried
+# (integer value)
+#api_retry_count=10
+
+# Sleep time in seconds for polling an ongoing async task
+# (floating point value)
+#task_poll_interval=0.5
+
+# Optional vim service WSDL location e.g
+# http://<server>/vimService.wsdl. Optional over-ride to
+# default location for bug work-arounds (string value)
+#wsdl_location=<None>
+
+
diff --git a/ceilometer/files/juno/pipeline.yaml b/ceilometer/files/juno/pipeline.yaml
new file mode 100644
index 0000000..c387a84
--- /dev/null
+++ b/ceilometer/files/juno/pipeline.yaml
@@ -0,0 +1,113 @@
+{%- from "ceilometer/map.jinja" import server with context %}
+{%- from "ceilometer/map.jinja" import agent with context %}
+{%- if server.get('enabled', False) %}
+{%- set publisher = server.publisher %}
+{%- else %}
+{%- set publisher = agent.publisher %}
+{%- endif %}
+---
+sources:
+ - name: meter_source
+ interval: 600
+ meters:
+ - "*"
+ sinks:
+ - meter_sink
+ - name: cpu_source
+ interval: 60
+ meters:
+ - "cpu"
+ sinks:
+ - cpu_sink
+ - name: disk_source
+ interval: 600
+ meters:
+ - "disk.read.bytes"
+ - "disk.read.requests"
+ - "disk.write.bytes"
+ - "disk.write.requests"
+ sinks:
+ - disk_sink
+ - name: network_source
+ interval: 600
+ meters:
+ - "network.incoming.bytes"
+ - "network.incoming.packets"
+ - "network.outgoing.bytes"
+ - "network.outgoing.packets"
+ sinks:
+ - network_sink
+sinks:
+ - name: meter_sink
+ transformers:
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
+ - name: cpu_sink
+ transformers:
+ - name: "rate_of_change"
+ parameters:
+ target:
+ name: "cpu_util"
+ unit: "%"
+ type: "gauge"
+ scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
+ - name: disk_sink
+ transformers:
+ - name: "rate_of_change"
+ parameters:
+ source:
+ map_from:
+ name: "disk\\.(read|write)\\.(bytes|requests)"
+ unit: "(B|request)"
+ target:
+ map_to:
+ name: "disk.\\1.\\2.rate"
+ unit: "\\1/s"
+ type: "gauge"
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
+ - name: network_sink
+ transformers:
+ - name: "rate_of_change"
+ parameters:
+ source:
+ map_from:
+ name: "network\\.(incoming|outgoing)\\.(bytes|packets)"
+ unit: "(B|packet)"
+ target:
+ map_to:
+ name: "network.\\1.\\2.rate"
+ unit: "\\1/s"
+ type: "gauge"
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
diff --git a/ceilometer/files/kilo/ceilometer-agent.conf.Debian b/ceilometer/files/kilo/ceilometer-agent.conf.Debian
new file mode 100644
index 0000000..4c52ea5
--- /dev/null
+++ b/ceilometer/files/kilo/ceilometer-agent.conf.Debian
@@ -0,0 +1,518 @@
+{%- from "ceilometer/map.jinja" import agent with context %}
+[DEFAULT]
+
+#
+# From oslo.messaging
+#
+
+# Print debugging output (set logging level to DEBUG instead
+# of default WARNING level). (boolean value)
+#debug=false
+debug=False
+
+# Print more verbose output (set logging level to INFO instead
+# of default WARNING level). (boolean value)
+#verbose=false
+verbose=True
+# Size of RPC connection pool. (integer value)
+#rpc_conn_pool_size = 30
+
+auth_strategy = keystone
+
+# ZeroMQ bind address. Should be a wildcard (*), an ethernet
+# interface, or IP. The "host" option should point or resolve to this
+# address. (string value)
+#rpc_zmq_bind_address = *
+
+# MatchMaker driver. (string value)
+#rpc_zmq_matchmaker = local
+
+# ZeroMQ receiver listening port. (integer value)
+#rpc_zmq_port = 9501
+
+# Number of ZeroMQ contexts, defaults to 1. (integer value)
+#rpc_zmq_contexts = 1
+
+# Maximum number of ingress messages to locally buffer per topic.
+# Default is unlimited. (integer value)
+#rpc_zmq_topic_backlog = <None>
+
+# Directory for holding IPC sockets. (string value)
+#rpc_zmq_ipc_dir = /var/run/openstack
+
+# Name of this node. Must be a valid hostname, FQDN, or IP address.
+# Must match "host" option, if running Nova. (string value)
+#rpc_zmq_host = localhost
+
+# Seconds to wait before a cast expires (TTL). Only supported by
+# impl_zmq. (integer value)
+#rpc_cast_timeout = 30
+
+# Heartbeat frequency. (integer value)
+#matchmaker_heartbeat_freq = 300
+
+# Heartbeat time-to-live. (integer value)
+#matchmaker_heartbeat_ttl = 600
+
+# Size of RPC thread pool. (integer value)
+#rpc_thread_pool_size = 64
+{%- if agent.message_queue.rpc_thread_pool_size is defined %}
+rpc_thread_pool_size = {{ agent.message_queue.rpc_thread_pool_size }}
+{%- endif %}
+
+# Driver or drivers to handle sending notifications. (multi valued)
+#notification_driver =
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+#notification_topics = notifications
+notification_topics=notifications
+
+# Seconds to wait for a response from a call. (integer value)
+#rpc_response_timeout = 60
+
+# A URL representing the messaging driver to use and its full
+# configuration. If not set, we fall back to the rpc_backend option
+# and driver specific configuration. (string value)
+#transport_url = <None>
+
+# The messaging driver to use, defaults to rabbit. Other drivers
+# include qpid and zmq. (string value)
+#rpc_backend = rabbit
+rpc_backend = rabbit
+
+# The default exchange under which topics are scoped. May be
+# overridden by an exchange name specified in the transport_url
+# option. (string value)
+#control_exchange = openstack
+
+[database]
+
+#
+# From oslo.db
+#
+
+# The file name to use with SQLite. (string value)
+# Deprecated group/name - [DEFAULT]/sqlite_db
+#sqlite_db = oslo.sqlite
+
+# If True, SQLite uses synchronous mode. (boolean value)
+# Deprecated group/name - [DEFAULT]/sqlite_synchronous
+#sqlite_synchronous = true
+
+# The back end to use for the database. (string value)
+# Deprecated group/name - [DEFAULT]/db_backend
+#backend = sqlalchemy
+
+# The SQLAlchemy connection string to use to connect to the database.
+# (string value)
+# Deprecated group/name - [DEFAULT]/sql_connection
+# Deprecated group/name - [DATABASE]/sql_connection
+# Deprecated group/name - [sql]/connection
+#connection = <None>
+
+# The SQLAlchemy connection string to use to connect to the slave
+# database. (string value)
+#slave_connection = <None>
+
+# The SQL mode to be used for MySQL sessions. This option, including
+# the default, overrides any server-set SQL mode. To use whatever SQL
+# mode is set by the server configuration, set this to no value.
+# Example: mysql_sql_mode= (string value)
+#mysql_sql_mode = TRADITIONAL
+
+# Timeout before idle SQL connections are reaped. (integer value)
+# Deprecated group/name - [DEFAULT]/sql_idle_timeout
+# Deprecated group/name - [DATABASE]/sql_idle_timeout
+# Deprecated group/name - [sql]/idle_timeout
+#idle_timeout = 3600
+
+# Minimum number of SQL connections to keep open in a pool. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_min_pool_size
+# Deprecated group/name - [DATABASE]/sql_min_pool_size
+#min_pool_size = 1
+
+# Maximum number of SQL connections to keep open in a pool. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_max_pool_size
+# Deprecated group/name - [DATABASE]/sql_max_pool_size
+#max_pool_size = <None>
+
+# Maximum number of database connection retries during startup. Set to
+# -1 to specify an infinite retry count. (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_retries
+# Deprecated group/name - [DATABASE]/sql_max_retries
+#max_retries = 10
+
+# Interval between retries of opening a SQL connection. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_retry_interval
+# Deprecated group/name - [DATABASE]/reconnect_interval
+#retry_interval = 10
+
+# If set, use this value for max_overflow with SQLAlchemy. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_max_overflow
+# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow
+#max_overflow = <None>
+
+# Verbosity of SQL debugging information: 0=None, 100=Everything.
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_connection_debug
+#connection_debug = 0
+
+# Add Python stack traces to SQL as comment strings. (boolean value)
+# Deprecated group/name - [DEFAULT]/sql_connection_trace
+#connection_trace = false
+
+# If set, use this value for pool_timeout with SQLAlchemy. (integer
+# value)
+# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout
+#pool_timeout = <None>
+
+# Enable the experimental use of database reconnect on connection
+# lost. (boolean value)
+#use_db_reconnect = false
+
+# Seconds between retries of a database transaction. (integer value)
+#db_retry_interval = 1
+
+# If True, increases the interval between retries of a database
+# operation up to db_max_retry_interval. (boolean value)
+#db_inc_retry_interval = true
+
+# If db_inc_retry_interval is set, the maximum seconds between retries
+# of a database operation. (integer value)
+#db_max_retry_interval = 10
+
+# Maximum retries in case of connection error or deadlock error before
+# error is raised. Set to -1 to specify an infinite retry count.
+# (integer value)
+#db_max_retries = 20
+
+
+[keystone_authtoken]
+
+#
+# From keystonemiddleware.auth_token
+#
+
+
+# Service tenant name. (string value)
+#admin_tenant_name = admin
+auth_host={{ agent.identity.host }}
+
+# Port of the admin Identity API endpoint (integer value)
+#auth_port=35357
+auth_port={{ agent.identity.port }}
+
+# Protocol of the admin Identity API endpoint(http or https)
+# (string value)
+#auth_protocol=https
+auth_protocol=http
+
+# Complete public Identity API endpoint (string value)
+#auth_uri=<None>
+auth_uri=http://{{ agent.identity.host }}:5000/
+
+# Complete admin Identity API endpoint. This should specify
+# the unversioned root endpoint e.g. https://localhost:35357/
+# (string value)
+#identity_uri=<None>
+identity_uri=http://{{ agent.identity.host }}:35357
+
+# API version of the admin Identity API endpoint (string
+# value)
+#auth_version=<None>
+
+# Do not handle authorization requests within the middleware,
+# but delegate the authorization decision to downstream WSGI
+# components (boolean value)
+#delay_auth_decision=false
+
+# Request timeout value for communicating with Identity API
+# server. (boolean value)
+#http_connect_timeout=<None>
+
+# How many times are we trying to reconnect when communicating
+# with Identity API Server. (integer value)
+#http_request_max_retries=3
+
+# This option is deprecated and may be removed in a future
+# release. Single shared secret with the Keystone
+# configuration used for bootstrapping a Keystone
+# installation, or otherwise bypassing the normal
+# authentication process. This option should not be used, use
+# `admin_user` and `admin_password` instead. (string value)
+#admin_token=<None>
+
+# Keystone account username (string value)
+#admin_user=<None>
+admin_user={{ agent.identity.user }}
+
+# Keystone account password (string value)
+#admin_password=<None>
+admin_password={{ agent.identity.password }}
+
+# Keystone service account tenant name to validate user tokens
+# (string value)
+#admin_tenant_name=admin
+admin_tenant_name={{ agent.identity.tenant }}
+
+[matchmaker_redis]
+
+#
+# From oslo.messaging
+#
+
+# Host to locate redis. (string value)
+#host = 127.0.0.1
+
+# Use this port to connect to redis host. (integer value)
+#port = 6379
+
+# Password for Redis server (optional). (string value)
+#password = <None>
+
+
+[matchmaker_ring]
+
+#
+# From oslo.messaging
+#
+
+# Matchmaker ring file (JSON). (string value)
+# Deprecated group/name - [DEFAULT]/matchmaker_ringfile
+#ringfile = /etc/oslo/matchmaker_ring.json
+
+[oslo_messaging_amqp]
+
+#
+# From oslo.messaging
+#
+
+# address prefix used when sending to a specific server (string value)
+# Deprecated group/name - [amqp1]/server_request_prefix
+#server_request_prefix = exclusive
+
+# address prefix used when broadcasting to all servers (string value)
+# Deprecated group/name - [amqp1]/broadcast_prefix
+#broadcast_prefix = broadcast
+
+# address prefix when sending to any server in group (string value)
+# Deprecated group/name - [amqp1]/group_request_prefix
+#group_request_prefix = unicast
+
+# Name for the AMQP container (string value)
+# Deprecated group/name - [amqp1]/container_name
+#container_name = <None>
+
+# Timeout for inactive connections (in seconds) (integer value)
+# Deprecated group/name - [amqp1]/idle_timeout
+#idle_timeout = 0
+
+# Debug: dump AMQP frames to stdout (boolean value)
+# Deprecated group/name - [amqp1]/trace
+#trace = false
+
+# CA certificate PEM file for verifing server certificate (string
+# value)
+# Deprecated group/name - [amqp1]/ssl_ca_file
+#ssl_ca_file =
+
+# Identifying certificate PEM file to present to clients (string
+# value)
+# Deprecated group/name - [amqp1]/ssl_cert_file
+#ssl_cert_file =
+
+# Private key PEM file used to sign cert_file certificate (string
+# value)
+# Deprecated group/name - [amqp1]/ssl_key_file
+#ssl_key_file =
+
+# Password for decrypting ssl_key_file (if encrypted) (string value)
+# Deprecated group/name - [amqp1]/ssl_key_password
+#ssl_key_password = <None>
+
+# Accept clients using either SSL or plain TCP (boolean value)
+# Deprecated group/name - [amqp1]/allow_insecure_clients
+#allow_insecure_clients = false
+
+
+
+
+[oslo_messaging_rabbit]
+
+#
+# From oslo.messaging
+#
+
+# Use durable queues in AMQP. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_durable_queues
+#amqp_durable_queues = false
+
+# Auto-delete queues in AMQP. (boolean value)
+# Deprecated group/name - [DEFAULT]/amqp_auto_delete
+#amqp_auto_delete = false
+
+# SSL version to use (valid only if SSL enabled). Valid values are
+# TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may be
+# available on some distributions. (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_version
+#kombu_ssl_version =
+
+# SSL key file (valid only if SSL enabled). (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_keyfile
+#kombu_ssl_keyfile =
+
+# SSL cert file (valid only if SSL enabled). (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_certfile
+#kombu_ssl_certfile =
+
+# SSL certification authority file (valid only if SSL enabled).
+# (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_ca_certs
+#kombu_ssl_ca_certs =
+
+# How long to wait before reconnecting in response to an AMQP consumer
+# cancel notification. (floating point value)
+# Deprecated group/name - [DEFAULT]/kombu_reconnect_delay
+#kombu_reconnect_delay = 1.0
+kombu_reconnect_delay = 5.0
+
+# The RabbitMQ broker address where a single node is used. (string
+# value)
+# Deprecated group/name - [DEFAULT]/rabbit_host
+#rabbit_host = localhost
+rabbit_host = {{ agent.message_queue.host }}
+
+# The RabbitMQ broker port where a single node is used. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/rabbit_port
+#rabbit_port = 5672
+rabbit_port = {{ agent.message_queue.port }}
+
+# RabbitMQ HA cluster host:port pairs. (list value)
+# Deprecated group/name - [DEFAULT]/rabbit_hosts
+#rabbit_hosts = $rabbit_host:$rabbit_port
+
+# Connect over SSL for RabbitMQ. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_use_ssl
+#rabbit_use_ssl = false
+
+# The RabbitMQ userid. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_userid
+#rabbit_userid = guest
+rabbit_userid = {{ agent.message_queue.user }}
+
+# The RabbitMQ password. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_password
+#rabbit_password = guest
+rabbit_password = {{ agent.message_queue.password }}
+
+# The RabbitMQ login method. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_login_method
+#rabbit_login_method = AMQPLAIN
+
+# The RabbitMQ virtual host. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_virtual_host
+#rabbit_virtual_host = /
+rabbit_virtual_host = {{ agent.message_queue.virtual_host }}
+rabbit_ha_queues={{ agent.message_queue.ha_queues }}
+
+# How frequently to retry connecting with RabbitMQ. (integer value)
+#rabbit_retry_interval = 1
+
+# How long to backoff for between retries when connecting to RabbitMQ.
+# (integer value)
+# Deprecated group/name - [DEFAULT]/rabbit_retry_backoff
+#rabbit_retry_backoff = 2
+
+# Maximum number of RabbitMQ connection retries. Default is 0
+# (infinite retry count). (integer value)
+# Deprecated group/name - [DEFAULT]/rabbit_max_retries
+#rabbit_max_retries = 0
+
+# Use HA queues in RabbitMQ (x-ha-policy: all). If you change this
+# option, you must wipe the RabbitMQ database. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_ha_queues
+#rabbit_ha_queues = false
+
+# Number of seconds after which the Rabbit broker is considered down
+# if heartbeat's keep-alive fails (0 disable the heartbeat). (integer
+# value)
+#heartbeat_timeout_threshold = 60
+
+# How often times during the heartbeat_timeout_threshold we check the
+# heartbeat. (integer value)
+#heartbeat_rate = 2
+
+# Deprecated, use rpc_backend=kombu+memory or rpc_backend=fake
+# (boolean value)
+# Deprecated group/name - [DEFAULT]/fake_rabbit
+#fake_rabbit = false
+
+[publisher]
+
+#
+# Options defined in ceilometer.publisher.utils
+#
+
+# Secret value for signing metering messages. (string value)
+# Deprecated group/name - [DEFAULT]/metering_secret
+# Deprecated group/name - [publisher_rpc]/metering_secret
+#metering_secret=change this or be hacked
+telemetry_secret={{ agent.secret }}
+
+[service_credentials]
+
+#
+# Options defined in ceilometer.service
+#
+
+# User name to use for OpenStack service access. (string
+# value)
+#os_username=ceilometer
+os_username={{ agent.identity.user }}
+
+# Password to use for OpenStack service access. (string value)
+#os_password=admin
+os_password={{ agent.identity.password }}
+
+# Tenant ID to use for OpenStack service access. (string
+# value)
+#os_tenant_id=
+
+# Tenant name to use for OpenStack service access. (string
+# value)
+#os_tenant_name=admin
+os_tenant_name={{ agent.identity.tenant }}
+
+# Certificate chain for SSL validation. (string value)
+#os_cacert=<None>
+
+# Auth URL to use for OpenStack service access. (string value)
+#os_auth_url=http://localhost:5000/v2.0
+os_auth_url=http://{{ agent.identity.host }}:5000/v2.0
+
+# Region name to use for OpenStack service endpoints. (string
+# value)
+#os_region_name=<None>
+os_region_name=RegionOne
+
+# Type of endpoint in Identity service catalog to use for
+# communication with OpenStack services. (string value)
+#os_endpoint_type=publicURL
+
+# Disables X.509 certificate validation when an SSL connection
+# to Identity Service is established. (boolean value)
+#insecure=false
+
+{%- if agent.publisher.graphite is defined %}
+
+[graphite]
+prefix = {{ agent.publisher.graphite.get('prefix', 'ceilometer') }}.
+append_hostname = true
+
+{%- endif %}
\ No newline at end of file
diff --git a/ceilometer/files/kilo/ceilometer-server.conf.Debian b/ceilometer/files/kilo/ceilometer-server.conf.Debian
new file mode 100644
index 0000000..ca02494
--- /dev/null
+++ b/ceilometer/files/kilo/ceilometer-server.conf.Debian
@@ -0,0 +1,628 @@
+{%- from "ceilometer/map.jinja" import server with context %}
+[DEFAULT]
+
+#
+# From oslo.messaging
+#
+
+# Print debugging output (set logging level to DEBUG instead
+# of default WARNING level). (boolean value)
+#debug=false
+debug=False
+
+# Print more verbose output (set logging level to INFO instead
+# of default WARNING level). (boolean value)
+#verbose=false
+verbose=True
+# Size of RPC connection pool. (integer value)
+#rpc_conn_pool_size = 30
+
+auth_strategy = keystone
+
+# ZeroMQ bind address. Should be a wildcard (*), an ethernet
+# interface, or IP. The "host" option should point or resolve to this
+# address. (string value)
+#rpc_zmq_bind_address = *
+
+# MatchMaker driver. (string value)
+#rpc_zmq_matchmaker = local
+
+# ZeroMQ receiver listening port. (integer value)
+#rpc_zmq_port = 9501
+
+# Number of ZeroMQ contexts, defaults to 1. (integer value)
+#rpc_zmq_contexts = 1
+
+# Maximum number of ingress messages to locally buffer per topic.
+# Default is unlimited. (integer value)
+#rpc_zmq_topic_backlog = <None>
+
+# Directory for holding IPC sockets. (string value)
+#rpc_zmq_ipc_dir = /var/run/openstack
+
+# Name of this node. Must be a valid hostname, FQDN, or IP address.
+# Must match "host" option, if running Nova. (string value)
+#rpc_zmq_host = localhost
+
+# Seconds to wait before a cast expires (TTL). Only supported by
+# impl_zmq. (integer value)
+#rpc_cast_timeout = 30
+
+# Heartbeat frequency. (integer value)
+#matchmaker_heartbeat_freq = 300
+
+# Heartbeat time-to-live. (integer value)
+#matchmaker_heartbeat_ttl = 600
+
+# Size of RPC thread pool. (integer value)
+#rpc_thread_pool_size = 64
+{%- if server.message_queue.rpc_thread_pool_size is defined %}
+rpc_thread_pool_size = {{ server.message_queue.rpc_thread_pool_size }}
+{%- endif %}
+
+# Driver or drivers to handle sending notifications. (multi valued)
+#notification_driver =
+
+# AMQP topic used for OpenStack notifications. (list value)
+# Deprecated group/name - [rpc_notifier2]/topics
+#notification_topics = notifications
+notification_topics=notifications
+
+# Seconds to wait for a response from a call. (integer value)
+#rpc_response_timeout = 60
+
+# A URL representing the messaging driver to use and its full
+# configuration. If not set, we fall back to the rpc_backend option
+# and driver specific configuration. (string value)
+#transport_url = <None>
+
+# The messaging driver to use, defaults to rabbit. Other drivers
+# include qpid and zmq. (string value)
+#rpc_backend = rabbit
+rpc_backend = rabbit
+
+# The default exchange under which topics are scoped. May be
+# overridden by an exchange name specified in the transport_url
+# option. (string value)
+#control_exchange = openstack
+
+[alarm]
+
+#
+# Options defined in ceilometer.cli
+#
+
+# Class to launch as alarm evaluation service. (string value)
+#evaluation_service=ceilometer.alarm.service.SingletonAlarmService
+evaluation_service=ceilometer.alarm.service.SingletonAlarmService
+
+
+#
+# Options defined in ceilometer.alarm.notifier.rest
+#
+
+# SSL Client certificate for REST notifier. (string value)
+#rest_notifier_certificate_file=
+
+# SSL Client private key for REST notifier. (string value)
+#rest_notifier_certificate_key=
+
+# Whether to verify the SSL Server certificate when calling
+# alarm action. (boolean value)
+#rest_notifier_ssl_verify=true
+
+
+#
+# Options defined in ceilometer.alarm.rpc
+#
+
+# The topic that ceilometer uses for alarm notifier messages.
+# (string value)
+#notifier_rpc_topic=alarm_notifier
+
+# The topic that ceilometer uses for alarm partition
+# coordination messages. (string value)
+#partition_rpc_topic=alarm_partition_coordination
+partition_rpc_topic=alarm_partition_coordination
+
+
+#
+# Options defined in ceilometer.alarm.service
+#
+
+# Period of evaluation cycle, should be >= than configured
+# pipeline interval for collection of underlying metrics.
+# (integer value)
+# Deprecated group/name - [alarm]/threshold_evaluation_interval
+#evaluation_interval=60
+evaluation_interval=60
+
+
+#
+# Options defined in ceilometer.api.controllers.v2
+#
+
+# Record alarm change events. (boolean value)
+#record_history=true
+record_history=True
+
+[api]
+
+#
+# Options defined in ceilometer.api
+#
+
+# The port for the ceilometer API server. (integer value)
+# Deprecated group/name - [DEFAULT]/metering_api_port
+#port=8777
+port={{ server.bind.port }}
+
+# The listen IP for the ceilometer API server. (string value)
+#host=0.0.0.0
+host={{ server.bind.host }}
+
+# Set it to False if your environment does not need or have
+# dns server, otherwise it will delay the response from api.
+# (boolean value)
+#enable_reverse_dns_lookup=false
+
+[database]
+
+metering_time_to_live = {{ server.ttl }}
+event_time_to_live = {{ server.ttl }}
+alarm_history_time_to_live = {{ server.ttl }}
+
+#
+# From oslo.db
+#
+
+# The file name to use with SQLite. (string value)
+# Deprecated group/name - [DEFAULT]/sqlite_db
+#sqlite_db = oslo.sqlite
+
+# If True, SQLite uses synchronous mode. (boolean value)
+# Deprecated group/name - [DEFAULT]/sqlite_synchronous
+#sqlite_synchronous = true
+
+# The back end to use for the database. (string value)
+# Deprecated group/name - [DEFAULT]/db_backend
+#backend = sqlalchemy
+
+# The SQLAlchemy connection string to use to connect to the database.
+# (string value)
+# Deprecated group/name - [DEFAULT]/sql_connection
+# Deprecated group/name - [DATABASE]/sql_connection
+# Deprecated group/name - [sql]/connection
+#connection = <None>
+{%- if server.database.members is defined %}
+connection={{ server.database.engine }}://{{ server.database.user }}:{{ server.database.password }}@{% for member in server.database.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %},{% endif %}{% endfor %}/{{ server.database.name }}
+{%- else %}
+connection={{ server.database.engine }}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}:{{ server.database.port }}/{{ server.database.name }}
+{%- endif %}
+
+# The SQLAlchemy connection string to use to connect to the slave
+# database. (string value)
+#slave_connection = <None>
+
+# The SQL mode to be used for MySQL sessions. This option, including
+# the default, overrides any server-set SQL mode. To use whatever SQL
+# mode is set by the server configuration, set this to no value.
+# Example: mysql_sql_mode= (string value)
+#mysql_sql_mode = TRADITIONAL
+
+# Timeout before idle SQL connections are reaped. (integer value)
+# Deprecated group/name - [DEFAULT]/sql_idle_timeout
+# Deprecated group/name - [DATABASE]/sql_idle_timeout
+# Deprecated group/name - [sql]/idle_timeout
+#idle_timeout = 3600
+
+# Minimum number of SQL connections to keep open in a pool. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_min_pool_size
+# Deprecated group/name - [DATABASE]/sql_min_pool_size
+#min_pool_size = 1
+
+# Maximum number of SQL connections to keep open in a pool. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_max_pool_size
+# Deprecated group/name - [DATABASE]/sql_max_pool_size
+#max_pool_size = <None>
+
+# Maximum number of database connection retries during startup. Set to
+# -1 to specify an infinite retry count. (integer value)
+# Deprecated group/name - [DEFAULT]/sql_max_retries
+# Deprecated group/name - [DATABASE]/sql_max_retries
+#max_retries = 10
+
+# Interval between retries of opening a SQL connection. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_retry_interval
+# Deprecated group/name - [DATABASE]/reconnect_interval
+#retry_interval = 10
+
+# If set, use this value for max_overflow with SQLAlchemy. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/sql_max_overflow
+# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow
+#max_overflow = <None>
+
+# Verbosity of SQL debugging information: 0=None, 100=Everything.
+# (integer value)
+# Deprecated group/name - [DEFAULT]/sql_connection_debug
+#connection_debug = 0
+
+# Add Python stack traces to SQL as comment strings. (boolean value)
+# Deprecated group/name - [DEFAULT]/sql_connection_trace
+#connection_trace = false
+
+# If set, use this value for pool_timeout with SQLAlchemy. (integer
+# value)
+# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout
+#pool_timeout = <None>
+
+# Enable the experimental use of database reconnect on connection
+# lost. (boolean value)
+#use_db_reconnect = false
+
+# Seconds between retries of a database transaction. (integer value)
+#db_retry_interval = 1
+
+# If True, increases the interval between retries of a database
+# operation up to db_max_retry_interval. (boolean value)
+#db_inc_retry_interval = true
+
+# If db_inc_retry_interval is set, the maximum seconds between retries
+# of a database operation. (integer value)
+#db_max_retry_interval = 10
+
+# Maximum retries in case of connection error or deadlock error before
+# error is raised. Set to -1 to specify an infinite retry count.
+# (integer value)
+#db_max_retries = 20
+
+
+[keystone_authtoken]
+
+#
+# From keystonemiddleware.auth_token
+#
+
+
+# Service tenant name. (string value)
+#admin_tenant_name = admin
+auth_host={{ server.identity.host }}
+
+# Port of the admin Identity API endpoint (integer value)
+#auth_port=35357
+auth_port={{ server.identity.port }}
+
+# Protocol of the admin Identity API endpoint(http or https)
+# (string value)
+#auth_protocol=https
+auth_protocol=http
+
+# Complete public Identity API endpoint (string value)
+#auth_uri=<None>
+auth_uri=http://{{ server.identity.host }}:5000/
+
+# Complete admin Identity API endpoint. This should specify
+# the unversioned root endpoint e.g. https://localhost:35357/
+# (string value)
+#identity_uri=<None>
+identity_uri=http://{{ server.identity.host }}:35357
+
+# API version of the admin Identity API endpoint (string
+# value)
+#auth_version=<None>
+
+# Do not handle authorization requests within the middleware,
+# but delegate the authorization decision to downstream WSGI
+# components (boolean value)
+#delay_auth_decision=false
+
+# Request timeout value for communicating with Identity API
+# server. (boolean value)
+#http_connect_timeout=<None>
+
+# How many times are we trying to reconnect when communicating
+# with Identity API Server. (integer value)
+#http_request_max_retries=3
+
+# This option is deprecated and may be removed in a future
+# release. Single shared secret with the Keystone
+# configuration used for bootstrapping a Keystone
+# installation, or otherwise bypassing the normal
+# authentication process. This option should not be used, use
+# `admin_user` and `admin_password` instead. (string value)
+#admin_token=<None>
+
+# Keystone account username (string value)
+#admin_user=<None>
+admin_user={{ server.identity.user }}
+
+# Keystone account password (string value)
+#admin_password=<None>
+admin_password={{ server.identity.password }}
+
+# Keystone service account tenant name to validate user tokens
+# (string value)
+#admin_tenant_name=admin
+admin_tenant_name={{ server.identity.tenant }}
+
+[matchmaker_redis]
+
+#
+# From oslo.messaging
+#
+
+# Host to locate redis. (string value)
+#host = 127.0.0.1
+
+# Use this port to connect to redis host. (integer value)
+#port = 6379
+
+# Password for Redis server (optional). (string value)
+#password = <None>
+
+
+[matchmaker_ring]
+
+#
+# From oslo.messaging
+#
+
+# Matchmaker ring file (JSON). (string value)
+# Deprecated group/name - [DEFAULT]/matchmaker_ringfile
+#ringfile = /etc/oslo/matchmaker_ring.json
+
+[notification]
+
+#
+# Options defined in ceilometer.notification
+#
+
+# Acknowledge message when event persistence fails. (boolean
+# value)
+#ack_on_event_error=true
+ack_on_event_error=True
+
+# Save event details. (boolean value)
+#store_events=false
+store_events=False
+
+# Messaging URLs to listen for notifications. Example:
+# transport://user:pass@host1:port[,hostN:portN]/virtual_host
+# (DEFAULT/transport_url is used if empty) (multi valued)
+#messaging_urls=
+
+
+[publisher]
+
+#
+# Options defined in ceilometer.publisher.utils
+#
+
+# Secret value for signing metering messages. (string value)
+# Deprecated group/name - [DEFAULT]/metering_secret
+# Deprecated group/name - [publisher_rpc]/metering_secret
+#metering_secret=change this or be hacked
+telemetry_secret={{ server.secret }}
+
+{%- for publisher_name, publisher in server.get('publisher', {}).iteritems() %}
+{%- if publisher_name == 'graphite' %}
+
+graphite=ceilometer.publisher.graphite:GraphitePublisher
+
+{%- endif %}
+{%- endfor %}
+
+[oslo_messaging_amqp]
+
+#
+# From oslo.messaging
+#
+
+# address prefix used when sending to a specific server (string value)
+# Deprecated group/name - [amqp1]/server_request_prefix
+#server_request_prefix = exclusive
+
+# address prefix used when broadcasting to all servers (string value)
+# Deprecated group/name - [amqp1]/broadcast_prefix
+#broadcast_prefix = broadcast
+
+# address prefix when sending to any server in group (string value)
+# Deprecated group/name - [amqp1]/group_request_prefix
+#group_request_prefix = unicast
+
+# Name for the AMQP container (string value)
+# Deprecated group/name - [amqp1]/container_name
+#container_name = <None>
+
+# Timeout for inactive connections (in seconds) (integer value)
+# Deprecated group/name - [amqp1]/idle_timeout
+#idle_timeout = 0
+
+# Debug: dump AMQP frames to stdout (boolean value)
+# Deprecated group/name - [amqp1]/trace
+#trace = false
+
+# CA certificate PEM file for verifing server certificate (string
+# value)
+# Deprecated group/name - [amqp1]/ssl_ca_file
+#ssl_ca_file =
+
+# Identifying certificate PEM file to present to clients (string
+# value)
+# Deprecated group/name - [amqp1]/ssl_cert_file
+#ssl_cert_file =
+
+# Private key PEM file used to sign cert_file certificate (string
+# value)
+# Deprecated group/name - [amqp1]/ssl_key_file
+#ssl_key_file =
+
+# Password for decrypting ssl_key_file (if encrypted) (string value)
+# Deprecated group/name - [amqp1]/ssl_key_password
+#ssl_key_password = <None>
+
+# Accept clients using either SSL or plain TCP (boolean value)
+# Deprecated group/name - [amqp1]/allow_insecure_clients
+#allow_insecure_clients = false
+
+
+
+
+[oslo_messaging_rabbit]
+
+#
+# From oslo.messaging
+#
+
+# Use durable queues in AMQP. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_durable_queues
+#amqp_durable_queues = false
+
+# Auto-delete queues in AMQP. (boolean value)
+# Deprecated group/name - [DEFAULT]/amqp_auto_delete
+#amqp_auto_delete = false
+
+# SSL version to use (valid only if SSL enabled). Valid values are
+# TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may be
+# available on some distributions. (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_version
+#kombu_ssl_version =
+
+# SSL key file (valid only if SSL enabled). (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_keyfile
+#kombu_ssl_keyfile =
+
+# SSL cert file (valid only if SSL enabled). (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_certfile
+#kombu_ssl_certfile =
+
+# SSL certification authority file (valid only if SSL enabled).
+# (string value)
+# Deprecated group/name - [DEFAULT]/kombu_ssl_ca_certs
+#kombu_ssl_ca_certs =
+
+# How long to wait before reconnecting in response to an AMQP consumer
+# cancel notification. (floating point value)
+# Deprecated group/name - [DEFAULT]/kombu_reconnect_delay
+#kombu_reconnect_delay = 1.0
+kombu_reconnect_delay = 5.0
+
+# The RabbitMQ broker address where a single node is used. (string
+# value)
+# Deprecated group/name - [DEFAULT]/rabbit_host
+#rabbit_host = localhost
+rabbit_host = {{ server.message_queue.host }}
+
+# The RabbitMQ broker port where a single node is used. (integer
+# value)
+# Deprecated group/name - [DEFAULT]/rabbit_port
+#rabbit_port = 5672
+rabbit_port = {{ server.message_queue.port }}
+
+# RabbitMQ HA cluster host:port pairs. (list value)
+# Deprecated group/name - [DEFAULT]/rabbit_hosts
+#rabbit_hosts = $rabbit_host:$rabbit_port
+
+# Connect over SSL for RabbitMQ. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_use_ssl
+#rabbit_use_ssl = false
+
+# The RabbitMQ userid. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_userid
+#rabbit_userid = guest
+rabbit_userid = {{ server.message_queue.user }}
+
+# The RabbitMQ password. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_password
+#rabbit_password = guest
+rabbit_password = {{ server.message_queue.password }}
+
+# The RabbitMQ login method. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_login_method
+#rabbit_login_method = AMQPLAIN
+
+# The RabbitMQ virtual host. (string value)
+# Deprecated group/name - [DEFAULT]/rabbit_virtual_host
+#rabbit_virtual_host = /
+rabbit_virtual_host = {{ server.message_queue.virtual_host }}
+rabbit_ha_queues={{ server.message_queue.ha_queues }}
+
+# How frequently to retry connecting with RabbitMQ. (integer value)
+#rabbit_retry_interval = 1
+
+# How long to backoff for between retries when connecting to RabbitMQ.
+# (integer value)
+# Deprecated group/name - [DEFAULT]/rabbit_retry_backoff
+#rabbit_retry_backoff = 2
+
+# Maximum number of RabbitMQ connection retries. Default is 0
+# (infinite retry count). (integer value)
+# Deprecated group/name - [DEFAULT]/rabbit_max_retries
+#rabbit_max_retries = 0
+
+# Use HA queues in RabbitMQ (x-ha-policy: all). If you change this
+# option, you must wipe the RabbitMQ database. (boolean value)
+# Deprecated group/name - [DEFAULT]/rabbit_ha_queues
+#rabbit_ha_queues = false
+
+# Number of seconds after which the Rabbit broker is considered down
+# if heartbeat's keep-alive fails (0 disable the heartbeat). (integer
+# value)
+#heartbeat_timeout_threshold = 60
+
+# How often times during the heartbeat_timeout_threshold we check the
+# heartbeat. (integer value)
+#heartbeat_rate = 2
+
+# Deprecated, use rpc_backend=kombu+memory or rpc_backend=fake
+# (boolean value)
+# Deprecated group/name - [DEFAULT]/fake_rabbit
+#fake_rabbit = false
+
+[service_credentials]
+
+#
+# Options defined in ceilometer.service
+#
+
+# User name to use for OpenStack service access. (string
+# value)
+#os_username=ceilometer
+os_username={{ server.identity.user }}
+
+# Password to use for OpenStack service access. (string value)
+#os_password=admin
+os_password={{ server.identity.password }}
+
+# Tenant ID to use for OpenStack service access. (string
+# value)
+#os_tenant_id=
+
+# Tenant name to use for OpenStack service access. (string
+# value)
+#os_tenant_name=admin
+os_tenant_name={{ server.identity.tenant }}
+
+# Certificate chain for SSL validation. (string value)
+#os_cacert=<None>
+
+# Auth URL to use for OpenStack service access. (string value)
+#os_auth_url=http://localhost:5000/v2.0
+os_auth_url=http://{{ server.identity.host }}:5000/v2.0
+
+# Region name to use for OpenStack service endpoints. (string
+# value)
+#os_region_name=<None>
+os_region_name=RegionOne
+
+# Type of endpoint in Identity service catalog to use for
+# communication with OpenStack services. (string value)
+#os_endpoint_type=publicURL
+
+# Disables X.509 certificate validation when an SSL connection
+# to Identity Service is established. (boolean value)
+#insecure=false
\ No newline at end of file
diff --git a/ceilometer/files/kilo/pipeline.yaml b/ceilometer/files/kilo/pipeline.yaml
new file mode 100644
index 0000000..8ca9719
--- /dev/null
+++ b/ceilometer/files/kilo/pipeline.yaml
@@ -0,0 +1,117 @@
+{%- from "ceilometer/map.jinja" import server with context %}
+{%- from "ceilometer/map.jinja" import agent with context %}
+{%- if server.get('enabled', False) %}
+{%- set publisher = server.publisher %}
+{%- else %}
+{%- set publisher = agent.publisher %}
+{%- endif %}
+---
+sources:
+ - name: meter_source
+ interval: 60
+ meters:
+ - "*"
+ sinks:
+ - meter_sink
+ - name: cpu_source
+ interval: 60
+ meters:
+ - "cpu"
+ sinks:
+ - cpu_sink
+ - name: disk_source
+ interval: 60
+ meters:
+ - "disk.read.bytes"
+ - "disk.read.requests"
+ - "disk.write.bytes"
+ - "disk.write.requests"
+ - "disk.device.read.bytes"
+ - "disk.device.read.requests"
+ - "disk.device.write.bytes"
+ - "disk.device.write.requests"
+ sinks:
+ - disk_sink
+ - name: network_source
+ interval: 60
+ meters:
+ - "network.incoming.bytes"
+ - "network.incoming.packets"
+ - "network.outgoing.bytes"
+ - "network.outgoing.packets"
+ sinks:
+ - network_sink
+sinks:
+ - name: meter_sink
+ transformers:
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
+ - name: cpu_sink
+ transformers:
+ - name: "rate_of_change"
+ parameters:
+ target:
+ name: "cpu_util"
+ unit: "%"
+ type: "gauge"
+ scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
+ - name: disk_sink
+ transformers:
+ - name: "rate_of_change"
+ parameters:
+ source:
+ map_from:
+ name: "(disk\\.device|disk)\\.(read|write)\\.(bytes|requests)"
+ unit: "(B|request)"
+ target:
+ map_to:
+ name: "\\1.\\2.\\3.rate"
+ unit: "\\1/s"
+ type: "gauge"
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
+ - name: network_sink
+ transformers:
+ - name: "rate_of_change"
+ parameters:
+ source:
+ map_from:
+ name: "network\\.(incoming|outgoing)\\.(bytes|packets)"
+ unit: "(B|packet)"
+ target:
+ map_to:
+ name: "network.\\1.\\2.rate"
+ unit: "\\1/s"
+ type: "gauge"
+ publishers:
+ {%- for publisher_name, publisher in publisher.iteritems() %}
+ {%- if publisher_name == 'default' %}
+ - notifier://
+ {%- endif %}
+ {%- if publisher_name == 'graphite' %}
+ - graphite://{{ publisher.host }}:{{ publisher.port }}
+ {%- endif %}
+ {%- endfor %}
diff --git a/ceilometer/files/sensu.conf b/ceilometer/files/sensu.conf
new file mode 100644
index 0000000..941982e
--- /dev/null
+++ b/ceilometer/files/sensu.conf
@@ -0,0 +1,48 @@
+local_ceilometer_agent_compute_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-agent-compute' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-agent
+local_ceilometer_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-collector' -u ceilometer -c 1:3"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+local_ceilometer_alarm_notifier_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-alarm-notifier' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+local_ceilometer_api_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-api' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+local_ceilometer_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-collector' -u ceilometer -c 1:3"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+local_ceilometer_alarm_evaluator_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-alarm-evaluator' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+local_ceilometer_agent_notification_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-agent-notification' -u ceilometer -c 1:3"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+local_ceilometer_agent_central_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-agent-central' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
\ No newline at end of file
diff --git a/ceilometer/init.sls b/ceilometer/init.sls
new file mode 100644
index 0000000..bbe8798
--- /dev/null
+++ b/ceilometer/init.sls
@@ -0,0 +1,8 @@
+
+include:
+{% if pillar.ceilometer.agent is defined %}
+- ceilometer.agent
+{% endif %}
+{% if pillar.ceilometer.server is defined %}
+- ceilometer.server
+{% endif %}
diff --git a/ceilometer/map.jinja b/ceilometer/map.jinja
new file mode 100644
index 0000000..44133b4
--- /dev/null
+++ b/ceilometer/map.jinja
@@ -0,0 +1,22 @@
+
+{% set server = salt['grains.filter_by']({
+ 'Debian': {
+ 'pkgs': ['ceilometer-alarm-evaluator', 'ceilometer-api', 'ceilometer-agent-central', 'ceilometer-collector', 'python-ceilometerclient','ceilometer-agent-notification','ceilometer-alarm-notifier'],
+ 'services': ['ceilometer-collector', 'ceilometer-api','ceilometer-agent-central','ceilometer-agent-notification','ceilometer-alarm-evaluator','ceilometer-alarm-notifier'],
+ },
+ 'RedHat': {
+ 'pkgs': ['openstack-ceilometer-alarm', 'openstack-ceilometer-api', 'openstack-ceilometer-central', 'openstack-ceilometer-collector', 'python-ceilometerclient'],
+ 'services': ['openstack-ceilometer-collector', 'openstack-ceilometer-api'],
+ },
+}, merge=salt['pillar.get']('ceilometer:server')) %}
+
+{% set agent = salt['grains.filter_by']({
+ 'Debian': {
+ 'pkgs': ['ceilometer-agent-compute'],
+ 'services': ['ceilometer-agent-compute'],
+ },
+ 'RedHat': {
+ 'pkgs': ['openstack-ceilometer-compute'],
+ 'services': ['openstack-ceilometer-compute'],
+ },
+}, merge=salt['pillar.get']('ceilometer:agent')) %}
diff --git a/ceilometer/meta/sensu.yml b/ceilometer/meta/sensu.yml
new file mode 100644
index 0000000..1616e82
--- /dev/null
+++ b/ceilometer/meta/sensu.yml
@@ -0,0 +1,49 @@
+check:
+ local_ceilometer_agent_compute_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-agent-compute' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-agent
+ local_ceilometer_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-collector' -u ceilometer -c 1:3"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+ local_ceilometer_alarm_notifier_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-alarm-notifier' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+ local_ceilometer_api_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-api' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+ local_ceilometer_collector_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-collector' -u ceilometer -c 1:3"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+ local_ceilometer_alarm_evaluator_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-alarm-evaluator' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+ local_ceilometer_agent_notification_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-agent-notification' -u ceilometer -c 1:3"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
+ local_ceilometer_agent_central_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/bin/ceilometer-agent-central' -u ceilometer -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-ceilometer-server
\ No newline at end of file
diff --git a/ceilometer/meta/sphinx.yml b/ceilometer/meta/sphinx.yml
new file mode 100644
index 0000000..0359826
--- /dev/null
+++ b/ceilometer/meta/sphinx.yml
@@ -0,0 +1,54 @@
+doc:
+ name: Ceilometer
+ description: The ceilometer project aims to deliver a unique point of contact for billing systems to acquire all of the measurements they need to establish customer billing, across all current OpenStack core components with work underway to support future OpenStack components.
+ role:
+ {%- if pillar.ceilometer.agent is defined %}
+ {%- from "ceilometer/map.jinja" import agent with context %}
+ agent:
+ name: agent
+ param:
+ version:
+ name: "Version"
+ value: {{ agent.version }}
+ packages:
+ value: |
+ {%- for pkg in agent.pkgs %}
+ {%- set pkg_version = "dpkg -l "+pkg+" | grep "+pkg+" | awk '{print $3}'" %}
+ * {{ pkg }}: {{ salt['cmd.run'](pkg_version) }}
+ {%- endfor %}
+ {%- endif %}
+ {%- if pillar.ceilometer.server is defined %}
+ {%- from "ceilometer/map.jinja" import server with context %}
+ server:
+ name: server
+ endpoint:
+ glance_api:
+ name: ceilometer-api
+ type: ceilometer-api
+ address: http://{{ server.bind.host }}:{{ server.bind.port }}
+ protocol: http
+ param:
+ bind:
+ value: {{ server.bind.host }}:{{ server.bind.port }}
+ ttl:
+ name: "Time to live for ceilometer metrics"
+ value: {{ server.ttl }}
+ version:
+ name: "Version"
+ value: {{ server.version }}
+ database_host:
+ name: "Database"
+ value: {{ server.database.user }}@{{ server.database.host }}:27017/{{ server.database.name }}
+ message_queue_ip:
+ name: "Message queue"
+ value: {{ server.message_queue.user }}@{{ server.message_queue.host }}:{{ server.message_queue.port }}{{ server.message_queue.virtual_host }}
+ identity_host:
+ name: "Identity service"
+ value: {{ server.identity.user }}@{{ server.identity.host }}:{{ server.identity.port }}
+ packages:
+ value: |
+ {%- for pkg in server.pkgs %}
+ {%- set pkg_version = "dpkg -l "+pkg+" | grep "+pkg+" | awk '{print $3}'" %}
+ * {{ pkg }}: {{ salt['cmd.run'](pkg_version) }}
+ {%- endfor %}
+ {%- endif %}
\ No newline at end of file
diff --git a/ceilometer/server.sls b/ceilometer/server.sls
new file mode 100644
index 0000000..9b8d20e
--- /dev/null
+++ b/ceilometer/server.sls
@@ -0,0 +1,41 @@
+{%- from "ceilometer/map.jinja" import server with context %}
+{%- if server.enabled %}
+
+ceilometer_server_packages:
+ pkg.installed:
+ - names: {{ server.pkgs }}
+
+/etc/ceilometer/ceilometer.conf:
+ file.managed:
+ - source: salt://ceilometer/files/{{ server.version }}/ceilometer-server.conf.{{ grains.os_family }}
+ - template: jinja
+ - require:
+ - pkg: ceilometer_server_packages
+
+{%- for publisher_name, publisher in server.get('publisher', {}).iteritems() %}
+
+{%- if publisher_name != "default" %}
+
+ceilometer_publisher_{{ publisher_name }}_pkg:
+ pkg.latest:
+ - name: ceilometer-publisher-{{ publisher_name }}
+
+{%- endif %}
+
+{%- endfor %}
+
+/etc/ceilometer/pipeline.yaml:
+ file.managed:
+ - source: salt://ceilometer/files/{{ server.version }}/pipeline.yaml
+ - template: jinja
+ - require:
+ - pkg: ceilometer_server_packages
+
+ceilometer_server_services:
+ service.running:
+ - names: {{ server.services }}
+ - enable: true
+ - watch:
+ - file: /etc/ceilometer/ceilometer.conf
+
+{%- endif %}
diff --git a/doc/source/conf.py b/doc/source/conf.py
new file mode 100644
index 0000000..0363b26
--- /dev/null
+++ b/doc/source/conf.py
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+import sys
+
+sys.path.insert(0, os.path.abspath('../..'))
+# -- General configuration ----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = [
+ 'sphinx.ext.autodoc',
+]
+
+# autodoc generation is a bit aggressive and a nuisance when doing heavy
+# text edit cycles.
+# execute "export SPHINX_DEBUG=1" in your terminal to disable
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'salt-formula-ceilometer'
+copyright = u'2015, OpenStack Foundation'
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+add_module_names = True
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# -- Options for HTML output --------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+# html_theme_path = ["."]
+# html_theme = '_theme'
+# html_static_path = ['static']
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = '%sdoc' % project
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass
+# [howto/manual]).
+latex_documents = [
+ ('index',
+ '%s.tex' % project,
+ u'%s Documentation' % project,
+ u'OpenStack Foundation', 'manual'),
+]
+
+# Example configuration for intersphinx: refer to the Python standard library.
+# intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/doc/source/index.rst b/doc/source/index.rst
new file mode 100644
index 0000000..a6210d3
--- /dev/null
+++ b/doc/source/index.rst
@@ -0,0 +1 @@
+.. include:: ../../README.rst
diff --git a/metadata.yml b/metadata.yml
new file mode 100644
index 0000000..f73a450
--- /dev/null
+++ b/metadata.yml
@@ -0,0 +1,3 @@
+name: "ceilometer"
+version: "0.2"
+source: "https://github.com/openstack/salt-formula-ceilometer"
diff --git a/metadata/service/agent/cluster.yml b/metadata/service/agent/cluster.yml
new file mode 100644
index 0000000..d1a1444
--- /dev/null
+++ b/metadata/service/agent/cluster.yml
@@ -0,0 +1,29 @@
+applications:
+- ceilometer
+classes:
+- service.ceilometer.support
+parameters:
+ ceilometer:
+ agent:
+ enabled: true
+ version: ${_param:ceilometer_version}
+ secret: ${_param:ceilometer_secret_key}
+ publisher:
+ default:
+ identity:
+ engine: keystone
+ host: ${_param:cluster_vip_address}
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: ${_param:keystone_ceilometer_password}
+ message_queue:
+ engine: rabbitmq
+ host: ${_param:cluster_vip_address}
+ port: 5672
+ user: openstack
+ password: ${_param:rabbitmq_openstack_password}
+ virtual_host: '/openstack'
+ ha_queues: true
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
diff --git a/metadata/service/agent/publisher/graphite.yml b/metadata/service/agent/publisher/graphite.yml
new file mode 100644
index 0000000..95106cd
--- /dev/null
+++ b/metadata/service/agent/publisher/graphite.yml
@@ -0,0 +1,8 @@
+parameters:
+ ceilometer:
+ agent:
+ publisher:
+ graphite:
+ enabled: true
+ host: ${_param:ceilometer_graphite_publisher_host}
+ port: ${_param:ceilometer_graphite_publisher_port}
diff --git a/metadata/service/agent/single.yml b/metadata/service/agent/single.yml
new file mode 100644
index 0000000..c2781ad
--- /dev/null
+++ b/metadata/service/agent/single.yml
@@ -0,0 +1,28 @@
+applications:
+- ceilometer
+classes:
+- service.ceilometer.support
+parameters:
+ ceilometer:
+ agent:
+ enabled: true
+ version: ${_param:ceilometer_version}
+ secret: ${_param:ceilometer_secret_key}
+ publisher:
+ default:
+ identity:
+ engine: keystone
+ host: ${_param:cluster_vip_address}
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: ${_param:keystone_ceilometer_password}
+ message_queue:
+ engine: rabbitmq
+ host: ${_param:cluster_vip_address}
+ port: 5672
+ user: openstack
+ password: ${_param:rabbitmq_openstack_password}
+ virtual_host: '/openstack'
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
diff --git a/metadata/service/server/cluster.yml b/metadata/service/server/cluster.yml
new file mode 100644
index 0000000..6f250c8
--- /dev/null
+++ b/metadata/service/server/cluster.yml
@@ -0,0 +1,46 @@
+applications:
+- ceilometer
+classes:
+- service.ceilometer.support
+parameters:
+ ceilometer:
+ server:
+ enabled: true
+ version: ${_param:ceilometer_version}
+ cluster: true
+ secret: ${_param:ceilometer_secret_key}
+ ttl: 86400
+ publisher:
+ default:
+ bind:
+ host: ${_param:cluster_local_address}
+ port: 8777
+ identity:
+ engine: keystone
+ host: ${_param:cluster_vip_address}
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: ${_param:keystone_ceilometer_password}
+ message_queue:
+ engine: rabbitmq
+ host: ${_param:cluster_vip_address}
+ port: 5672
+ user: openstack
+ password: ${_param:rabbitmq_openstack_password}
+ virtual_host: '/openstack'
+ ha_queues: true
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
+ database:
+ engine: mongodb
+ members:
+ - host: ${_param:cluster_node01_address}
+ port: 27017
+ - host: ${_param:cluster_node02_address}
+ port: 27017
+ - host: ${_param:cluster_node03_address}
+ port: 27017
+ name: ceilometer
+ user: ceilometer
+ password: ${_param:mongodb_ceilometer_password}
diff --git a/metadata/service/server/publisher/graphite.yml b/metadata/service/server/publisher/graphite.yml
new file mode 100644
index 0000000..3c85182
--- /dev/null
+++ b/metadata/service/server/publisher/graphite.yml
@@ -0,0 +1,8 @@
+parameters:
+ ceilometer:
+ server:
+ publisher:
+ graphite:
+ enabled: true
+ host: ${_param:ceilometer_graphite_publisher_host}
+ port: ${_param:ceilometer_graphite_publisher_port}
diff --git a/metadata/service/server/single.yml b/metadata/service/server/single.yml
new file mode 100644
index 0000000..d69f366
--- /dev/null
+++ b/metadata/service/server/single.yml
@@ -0,0 +1,40 @@
+applications:
+- ceilometer
+classes:
+- service.ceilometer.support
+parameters:
+ ceilometer:
+ server:
+ enabled: true
+ version: ${_param:ceilometer_version}
+ secret: ${_param:ceilometer_secret_key}
+ ttl: 86400
+ publisher:
+ default:
+ bind:
+ host: ${_param:single_address}
+ port: 8777
+ identity:
+ engine: keystone
+ host: ${_param:single_address}
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: ${_param:keystone_ceilometer_password}
+ message_queue:
+ engine: rabbitmq
+ host: ${_param:single_address}
+ port: 5672
+ user: openstack
+ password: ${_param:rabbitmq_openstack_password}
+ virtual_host: '/openstack'
+ ha_queues: true
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
+ database:
+ engine: mongodb
+ host: ${_param:ceilometer_database_host}
+ port: 27017
+ name: ceilometer
+ user: ceilometer
+ password: ${_param:mongodb_ceilometer_password}
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
new file mode 100644
index 0000000..dc6c05b
--- /dev/null
+++ b/metadata/service/support.yml
@@ -0,0 +1,11 @@
+parameters:
+ ceilometer:
+ _support:
+ collectd:
+ enabled: false
+ heka:
+ enabled: true
+ sensu:
+ enabled: false
+ sphinx:
+ enabled: true
diff --git a/other-requirements.txt b/other-requirements.txt
new file mode 100644
index 0000000..ba84cc5
--- /dev/null
+++ b/other-requirements.txt
@@ -0,0 +1 @@
+python-yaml
diff --git a/tests/pillar/agent_cluster.sls b/tests/pillar/agent_cluster.sls
new file mode 100644
index 0000000..a3e9d4c
--- /dev/null
+++ b/tests/pillar/agent_cluster.sls
@@ -0,0 +1,24 @@
+ceilometer:
+ agent:
+ enabled: true
+ version: liberty
+ secret: password
+ publisher:
+ default:
+ identity:
+ engine: keystone
+ host: 127.0.0.1
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: password
+ message_queue:
+ engine: rabbitmq
+ host: 127.0.0.1
+ port: 5672
+ user: openstack
+ password: ${_param:rabbitmq_openstack_password}
+ virtual_host: '/openstack'
+ ha_queues: true
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
diff --git a/tests/pillar/agent_single.sls b/tests/pillar/agent_single.sls
new file mode 100644
index 0000000..a4e54de
--- /dev/null
+++ b/tests/pillar/agent_single.sls
@@ -0,0 +1,23 @@
+ceilometer:
+ agent:
+ enabled: true
+ version: liberty
+ secret: password
+ publisher:
+ default:
+ identity:
+ engine: keystone
+ host: 127.0.0.1
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: password
+ message_queue:
+ engine: rabbitmq
+ host: 127.0.0.1
+ port: 5672
+ user: openstack
+ password: password
+ virtual_host: '/openstack'
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
new file mode 100644
index 0000000..b273bd3
--- /dev/null
+++ b/tests/pillar/server_cluster.sls
@@ -0,0 +1,41 @@
+ceilometer:
+ server:
+ enabled: true
+ version: liberty
+ cluster: true
+ secret: password
+ ttl: 86400
+ publisher:
+ default:
+ bind:
+ host: 127.0.0.1
+ port: 8777
+ identity:
+ engine: keystone
+ host: 127.0.0.1
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: password
+ message_queue:
+ engine: rabbitmq
+ host: 127.0.0.1
+ port: 5672
+ user: openstack
+ password: password
+ virtual_host: '/openstack'
+ ha_queues: true
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
+ database:
+ engine: mongodb
+ members:
+ - host: 127.0.0.1
+ port: 27017
+ - host: 127.0.0.1
+ port: 27017
+ - host: 127.0.0.1
+ port: 27017
+ name: ceilometer
+ user: ceilometer
+ password: password
diff --git a/tests/pillar/server_single.sls b/tests/pillar/server_single.sls
new file mode 100644
index 0000000..201f3d1
--- /dev/null
+++ b/tests/pillar/server_single.sls
@@ -0,0 +1,35 @@
+ceilometer:
+ server:
+ enabled: true
+ version: liberty
+ secret: password
+ ttl: 86400
+ publisher:
+ default:
+ bind:
+ host: 127.0.0.1
+ port: 8777
+ identity:
+ engine: keystone
+ host: 127.0.0.1
+ port: 35357
+ tenant: service
+ user: ceilometer
+ password: password
+ message_queue:
+ engine: rabbitmq
+ host: 127.0.0.1
+ port: 5672
+ user: openstack
+ password: password
+ virtual_host: '/openstack'
+ ha_queues: true
+ # Workaround for https://bugs.launchpad.net/ceilometer/+bug/1337715
+ rpc_thread_pool_size: 5
+ database:
+ engine: mongodb
+ host: 127.0.0.1
+ port: 27017
+ name: ceilometer
+ user: ceilometer
+ password: password
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
new file mode 100755
index 0000000..3f42101
--- /dev/null
+++ b/tests/run_tests.sh
@@ -0,0 +1,162 @@
+#!/usr/bin/env bash
+
+set -e
+[ -n "$DEBUG" ] && set -x
+
+CURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+METADATA=${CURDIR}/../metadata.yml
+FORMULA_NAME=$(cat $METADATA | python -c "import sys,yaml; print yaml.load(sys.stdin)['name']")
+
+## Overrideable parameters
+PILLARDIR=${PILLARDIR:-${CURDIR}/pillar}
+BUILDDIR=${BUILDDIR:-${CURDIR}/build}
+VENV_DIR=${VENV_DIR:-${BUILDDIR}/virtualenv}
+DEPSDIR=${BUILDDIR}/deps
+
+SALT_FILE_DIR=${SALT_FILE_DIR:-${BUILDDIR}/file_root}
+SALT_PILLAR_DIR=${SALT_PILLAR_DIR:-${BUILDDIR}/pillar_root}
+SALT_CONFIG_DIR=${SALT_CONFIG_DIR:-${BUILDDIR}/salt}
+SALT_CACHE_DIR=${SALT_CACHE_DIR:-${SALT_CONFIG_DIR}/cache}
+
+SALT_OPTS="${SALT_OPTS} --retcode-passthrough --local -c ${SALT_CONFIG_DIR}"
+
+if [ "x${SALT_VERSION}" != "x" ]; then
+ PIP_SALT_VERSION="==${SALT_VERSION}"
+fi
+
+## Functions
+log_info() {
+ echo "[INFO] $*"
+}
+
+log_err() {
+ echo "[ERROR] $*" >&2
+}
+
+setup_virtualenv() {
+ log_info "Setting up Python virtualenv"
+ virtualenv $VENV_DIR
+ source ${VENV_DIR}/bin/activate
+ pip install salt${PIP_SALT_VERSION}
+}
+
+setup_pillar() {
+ [ ! -d ${SALT_PILLAR_DIR} ] && mkdir -p ${SALT_PILLAR_DIR}
+ echo "base:" > ${SALT_PILLAR_DIR}/top.sls
+ for pillar in ${PILLARDIR}/*; do
+ state_name=$(basename ${pillar%.sls})
+ echo -e " ${state_name}:\n - ${state_name}" >> ${SALT_PILLAR_DIR}/top.sls
+ done
+}
+
+setup_salt() {
+ [ ! -d ${SALT_FILE_DIR} ] && mkdir -p ${SALT_FILE_DIR}
+ [ ! -d ${SALT_CONFIG_DIR} ] && mkdir -p ${SALT_CONFIG_DIR}
+ [ ! -d ${SALT_CACHE_DIR} ] && mkdir -p ${SALT_CACHE_DIR}
+
+ echo "base:" > ${SALT_FILE_DIR}/top.sls
+ for pillar in ${PILLARDIR}/*.sls; do
+ state_name=$(basename ${pillar%.sls})
+ echo -e " ${state_name}:\n - ${FORMULA_NAME}" >> ${SALT_FILE_DIR}/top.sls
+ done
+
+ cat << EOF > ${SALT_CONFIG_DIR}/minion
+file_client: local
+cachedir: ${SALT_CACHE_DIR}
+verify_env: False
+
+file_roots:
+ base:
+ - ${SALT_FILE_DIR}
+ - ${CURDIR}/..
+ - /usr/share/salt-formulas/env
+
+pillar_roots:
+ base:
+ - ${SALT_PILLAR_DIR}
+ - ${PILLARDIR}
+EOF
+}
+
+fetch_dependency() {
+ dep_name="$(echo $1|cut -d : -f 1)"
+ dep_source="$(echo $1|cut -d : -f 2-)"
+ dep_root="${DEPSDIR}/$(basename $dep_source .git)"
+ dep_metadata="${dep_root}/metadata.yml"
+
+ [ -d /usr/share/salt-formulas/env/${dep_name} ] && log_info "Dependency $dep_name already present in system-wide salt env" && return 0
+ [ -d $dep_root ] && log_info "Dependency $dep_name already fetched" && return 0
+
+ log_info "Fetching dependency $dep_name"
+ [ ! -d ${DEPSDIR} ] && mkdir -p ${DEPSDIR}
+ git clone $dep_source ${DEPSDIR}/$(basename $dep_source .git)
+ ln -s ${dep_root}/${dep_name} ${SALT_FILE_DIR}/${dep_name}
+
+ METADATA="${dep_metadata}" install_dependencies
+}
+
+install_dependencies() {
+ grep -E "^dependencies:" ${METADATA} >/dev/null || return 0
+ (python - | while read dep; do fetch_dependency "$dep"; done) << EOF
+import sys,yaml
+for dep in yaml.load(open('${METADATA}', 'ro'))['dependencies']:
+ print '%s:%s' % (dep["name"], dep["source"])
+EOF
+}
+
+clean() {
+ log_info "Cleaning up ${BUILDDIR}"
+ [ -d ${BUILDDIR} ] && rm -rf ${BUILDDIR} || exit 0
+}
+
+salt_run() {
+ [ -e ${VEN_DIR}/bin/activate ] && source ${VENV_DIR}/bin/activate
+ salt-call ${SALT_OPTS} $*
+}
+
+prepare() {
+ [ -d ${BUILDDIR} ] && mkdir -p ${BUILDDIR}
+
+ which salt-call || setup_virtualenv
+ setup_pillar
+ setup_salt
+ install_dependencies
+}
+
+run() {
+ for pillar in ${PILLARDIR}/*.sls; do
+ state_name=$(basename ${pillar%.sls})
+ salt_run --id=${state_name} state.show_sls ${FORMULA_NAME} || (log_err "Execution of ${FORMULA_NAME}.${state_name} failed"; exit 1)
+ done
+}
+
+_atexit() {
+ RETVAL=$?
+ trap true INT TERM EXIT
+
+ if [ $RETVAL -ne 0 ]; then
+ log_err "Execution failed"
+ else
+ log_info "Execution successful"
+ fi
+ return $RETVAL
+}
+
+## Main
+trap _atexit INT TERM EXIT
+
+case $1 in
+ clean)
+ clean
+ ;;
+ prepare)
+ prepare
+ ;;
+ run)
+ run
+ ;;
+ *)
+ prepare
+ run
+ ;;
+esac