Update Ceilometer source package [MOS 8.0]
[openstack-build/ceilometer-build.git] / rpm / SPECS / openstack-ceilometer.spec
1 %global _without_doc 1
2 %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
3 %global pypi_name ceilometer
4
5 Name:             openstack-ceilometer
6 Version:          2015.1.0
7 Release:          2%{?dist}
8 Summary:          OpenStack measurement collection service
9
10 Group:            Applications/System
11 License:          ASL 2.0
12 URL:              https://wiki.openstack.org/wiki/Ceilometer
13 Source0:          http://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
14 Source1:          %{pypi_name}-dist.conf
15 Source2:          %{pypi_name}.logrotate
16 Source3:          ceilometer-rootwrap-sudoers
17
18 %if 0%{?rhel} && 0%{?rhel} <= 6
19 Source10:         %{name}-api.init
20 Source100:        %{name}-api.upstart
21 Source11:         %{name}-collector.init
22 Source110:        %{name}-collector.upstart
23 Source12:         %{name}-compute.init
24 Source120:        %{name}-compute.upstart
25 Source13:         %{name}-central.init
26 Source130:        %{name}-central.upstart
27 Source14:         %{name}-alarm-notifier.init
28 Source140:        %{name}-alarm-notifier.upstart
29 Source15:         %{name}-alarm-evaluator.init
30 Source150:        %{name}-alarm-evaluator.upstart
31 Source16:         %{name}-notification.init
32 Source160:        %{name}-notification.upstart
33 Source17:         %{name}-ipmi.init
34 Source170:        %{name}-ipmi.upstart
35 Source18:         %{name}-polling.init
36 Source180:        %{name}-polling.upstart
37 %else
38 Source10:         %{name}-api.service
39 Source11:         %{name}-collector.service
40 Source12:         %{name}-compute.service
41 Source13:         %{name}-central.service
42 Source14:         %{name}-alarm-notifier.service
43 Source15:         %{name}-alarm-evaluator.service
44 Source16:         %{name}-notification.service
45 Source17:         %{name}-ipmi.service
46 Source18:         %{name}-polling.service
47 %endif
48
49 #
50 # patches_base=2014.1.1
51 #
52
53 BuildArch:        noarch
54 BuildRequires:    intltool
55 BuildRequires:    python-sphinx10
56 BuildRequires:    python-setuptools
57 BuildRequires:    python-pbr >= 0.10
58 BuildRequires:    python-d2to1
59 BuildRequires:    python2-devel
60 BuildRequires:    openstack-utils
61
62 # These are required to generate ceilometer configuration file
63 BuildRequires:    python-tox
64 BuildRequires:    python-oslo-db >= 1.7.0
65 BuildRequires:    python-oslo-messaging >= 1.8.0
66 BuildRequires:    python-keystonemiddleware >= 1.5.0
67
68 # These are required to build due to the requirements check added
69 BuildRequires:    python-sqlalchemy >= 0.9.7
70 BuildRequires:    python-webob >= 1.2.3
71
72 %if ! (0%{?rhel} && 0%{?rhel} <= 6)
73 BuildRequires: systemd-units
74 %endif
75
76 %description
77 OpenStack ceilometer provides services to measure and
78 collect metrics from OpenStack components.
79
80
81 %package -n       python-ceilometer
82 Summary:          OpenStack ceilometer python libraries
83 Group:            Applications/System
84
85 Requires:         python-alembic >= 0.7.2
86 Requires:         python-ceilometerclient >= 1.0.13
87 Requires:         python-croniter >= 0.3.4
88 Requires:         python-eventlet >= 0.16.1
89 Requires:         python-flask >= 0.10
90 Requires:         python-glanceclient >= 1:0.15.0
91 Requires:         python-iso8601 >= 0.1.9
92 Requires:         python-jsonpath-rw >= 1.2.0
93 Requires:         python-jsonschema >= 2.0.0
94 Requires:         python-kafka >= 0.9.2
95 Requires:         python-keystoneclient >= 1.1.0
96 Requires:         python-keystonemiddleware >= 1.5.0
97 Requires:         python-lxml >= 2.3
98 Requires:         python-migrate >= 0.9.5
99 Requires:         python-msgpack >= 0.4.0
100 Requires:         python-neutronclient >= 2.3.11
101 Requires:         python-novaclient >= 1:2.22.0
102 Requires:         python-oslo-concurrency >= 1.8.0
103 Requires:         python-oslo-config >= 1:1.9.3
104 Requires:         python-oslo-context >= 0.2.0
105 Requires:         python-oslo-db >= 1.7.0
106 Requires:         python-oslo-i18n >= 1.5.0
107 Requires:         python-oslo-messaging >= 1.8.0
108 Requires:         python-oslo-middleware >= 1.0.0
109 Requires:         python-oslo-policy >= 0.3.1
110 Requires:         python-oslo-rootwrap >= 1.6.0
111 Requires:         python-oslo-serialization >= 1.4.0
112 Requires:         python-oslo.utils >= 1.4.0
113 Requires:         python-paste-deploy >= 1.5.0
114 Requires:         python-pbr >= 0.10
115 Requires:         python-pecan >= 0.8.0
116 Requires:         python-posix_ipc
117 Requires:         python-pymongo >= 2.6.3
118 Requires:         python-pysnmp >= 4.2.1
119 Requires:         pytz >= 2013.6
120 Requires:         python-qpid
121 Requires:         python-requests >= 2.2.0
122 Requires:         python-retrying >= 1.2.3
123 Requires:         python-six >= 1.9.0
124 Requires:         python-sqlalchemy >= 0.9.7
125 Requires:         python-stevedore >= 1.3.0
126 Requires:         python-swiftclient >= 2.2.0
127 Requires:         python-tooz >= 0.13.1
128 Requires:         python-werkzeug >= 0.7
129 Requires:         python-webob >= 1.2.3
130 Requires:         python-wsme >= 0.8
131 Requires:         PyYAML >= 3.1.0
132
133 %description -n   python-ceilometer
134 OpenStack ceilometer provides services to measure and
135 collect metrics from OpenStack components.
136
137 This package contains the ceilometer python library.
138
139
140 %package common
141 Summary:          Components common to all OpenStack ceilometer services
142 Group:            Applications/System
143
144 Requires:         python-ceilometer = %{version}-%{release}
145 Requires:         openstack-utils
146
147 %if 0%{?rhel} && 0%{?rhel} <= 6
148 Requires(post):   chkconfig
149 Requires(postun): initscripts
150 Requires(preun):  chkconfig
151 %else
152 Requires(post):   systemd-units
153 Requires(preun):  systemd-units
154 Requires(postun): systemd-units
155 %endif
156 Requires(pre):    shadow-utils
157
158 %description common
159 OpenStack ceilometer provides services to measure and
160 collect metrics from OpenStack components.
161
162 This package contains components common to all OpenStack
163 ceilometer services.
164
165
166 %package compute
167 Summary:          OpenStack ceilometer compute agent
168 Group:            Applications/System
169
170 Requires:         %{name}-common = %{version}-%{release}
171
172 Requires:         libvirt-python
173 Requires:         python-keystoneclient >= 1.1.0
174 Requires:         python-novaclient >= 2.22.0
175
176 %description compute
177 OpenStack ceilometer provides services to measure and
178 collect metrics from OpenStack components.
179
180 This package contains the ceilometer agent for
181 running on OpenStack compute nodes.
182
183
184 %package central
185 Summary:          OpenStack ceilometer central agent
186 Group:            Applications/System
187
188 Requires:         %{name}-common = %{version}-%{release}
189
190 Requires:         python-glanceclient >= 0.15.0
191 Requires:         python-keystoneclient >= 1.1.0
192 Requires:         python-novaclient >= 2.22.0
193 Requires:         python-swiftclient >= 2.2.0
194
195 %description central
196 OpenStack ceilometer provides services to measure and
197 collect metrics from OpenStack components.
198
199 This package contains the central ceilometer agent.
200
201
202 %package collector
203 Summary:          OpenStack ceilometer collector
204 Group:            Applications/System
205
206 Requires:         %{name}-common = %{version}-%{release}
207
208 # For compat with older provisioning tools.
209 # Remove when all reference the notification package explicitly
210 Requires:         %{name}-notification = %{version}-%{release}
211 Requires:         python-pymongo >= 2.6.3
212
213 %description collector
214 OpenStack ceilometer provides services to measure and
215 collect metrics from OpenStack components.
216
217 This package contains the ceilometer collector service
218 which collects metrics from the various agents.
219
220
221 %package notification
222 Summary:          OpenStack ceilometer notification agent
223 Group:            Applications/System
224
225 Requires:         %{name}-common = %{version}-%{release}
226
227 %description notification
228 OpenStack ceilometer provides services to measure and
229 collect metrics from OpenStack components.
230
231 This package contains the ceilometer notification agent
232 which pushes metrics to the collector service from the
233 various OpenStack services.
234
235
236 %package api
237 Summary:          OpenStack ceilometer API service
238 Group:            Applications/System
239
240 Requires:         %{name}-common = %{version}-%{release}
241
242 Requires:         python-flask >= 0.10
243 Requires:         python-keystonemiddleware >= 1.5.0
244 Requires:         python-oslo-db >= 1.7.0
245 Requires:         python-paste-deploy >= 1.5.0
246 Requires:         python-pecan >= 0.8.0
247 Requires:         python-pymongo >= 2.6.3
248 Requires:         python-wsme >= 0.6
249
250 %description api
251 OpenStack ceilometer provides services to measure and
252 collect metrics from OpenStack components.
253
254 This package contains the ceilometer API service.
255
256
257 %package alarm
258 Summary:          OpenStack ceilometer alarm services
259 Group:            Applications/System
260
261 Requires:         %{name}-common = %{version}-%{release}
262 Requires:         python-ceilometerclient >= 1.0.13
263
264 %description alarm
265 OpenStack ceilometer provides services to measure and
266 collect metrics from OpenStack components.
267
268 This package contains the ceilometer alarm notification
269 and evaluation services.
270
271
272 %package ipmi
273 Summary:          OpenStack ceilometer ipmi agent
274 Group:            Applications/System
275
276 Requires:         %{name}-common = %{version}-%{release}
277
278 Requires:         ipmitool
279 Requires:         python-keystoneclient >= 1.1.0
280 Requires:         python-neutronclient >= 2.3.11
281 Requires:         python-novaclient >= 2.22.0
282 Requires:         python-oslo-rootwrap >= 1.6.0
283 Requires:         python-tooz >= 0.13.1
284
285 %description ipmi
286 OpenStack ceilometer provides services to measure and
287 collect metrics from OpenStack components.
288
289 This package contains the ipmi agent to be run on OpenStack
290 nodes from which IPMI sensor data is to be collected directly,
291 by-passing Ironic's management of baremetal.
292
293
294 %package polling
295 Summary:          OpenStack ceilometer polling agent
296 Group:            Applications/System
297
298 Requires:         %{name}-common = %{version}-%{release}
299
300 Requires:         libvirt-python
301 Requires:         python-glanceclient >= 0.15.0
302 Requires:         python-keystoneclient >= 1.1.0
303 Requires:         python-novaclient >= 2.22.0
304 Requires:         python-swiftclient >= 2.2.0
305
306 %description polling
307 Ceilometer aims to deliver a unique point of contact for billing systems to
308 aquire all counters they need to establish customer billing, across all
309 current and future OpenStack components. The delivery of counters must
310 be tracable and auditable, the counters must be easily extensible to support
311 new projects, and agents doing data collections should be
312 independent of the overall system.
313
314 This package contains the polling service.
315
316
317 %if 0%{?with_doc}
318 %package doc
319 Summary:          Documentation for OpenStack ceilometer
320 Group:            Documentation
321
322 # Required to build module documents
323 BuildRequires:    python-eventlet >= 0.16.1
324 BuildRequires:    python-sqlalchemy >= 0.9.7
325 BuildRequires:    python-webob >= 1.2.3
326 # while not strictly required, quiets the build down when building docs.
327 BuildRequires:    python-migrate >= 0.9.5
328 BuildRequires:    python-iso8601 >= 0.1.9
329
330 %description      doc
331 OpenStack ceilometer provides services to measure and
332 collect metrics from OpenStack components.
333
334 This package contains documentation files for ceilometer.
335 %endif
336
337 %prep
338 %setup -q -n ceilometer-%{version}
339
340 find . \( -name .gitignore -o -name .placeholder \) -delete
341
342 find ceilometer -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
343
344 # TODO: Have the following handle multi line entries
345 sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
346
347 # Remove the requirements file so that pbr hooks don't add it
348 # to distutils requires_dist config
349 rm -rf {test-,}requirements.txt tools/{pip,test}-requires
350
351 %build
352 %{__python} setup.py build
353
354 %install
355 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
356
357 # docs generation requires everything to be installed first
358 export PYTHONPATH="$( pwd ):$PYTHONPATH"
359
360 pushd doc
361
362 %if 0%{?with_doc}
363 SPHINX_DEBUG=1 sphinx-1.0-build -b html source build/html
364 # Fix hidden-file-or-dir warnings
365 rm -fr build/html/.doctrees build/html/.buildinfo
366 %endif
367
368 popd
369
370 # Genenrate ceilometer.conf.sample
371 oslo-config-generator --output-file etc/ceilometer/ceilometer.conf.sample \
372              --namespace ceilometer \
373              --namespace oslo.db \
374              --namespace oslo.messaging \
375              --namespace keystonemiddleware.auth_token
376
377 # Setup directories
378 install -d -m 755 %{buildroot}%{_sharedstatedir}/ceilometer
379 install -d -m 755 %{buildroot}%{_sharedstatedir}/ceilometer/tmp
380 install -d -m 775 %{buildroot}%{_localstatedir}/log/ceilometer
381
382 # Install config files
383 install -d -m 755 %{buildroot}%{_sysconfdir}/ceilometer
384 install -d -m 755 %{buildroot}%{_sysconfdir}/ceilometer/rootwrap.d
385 install -d -m 755 %{buildroot}%{_sysconfdir}/sudoers.d
386 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/ceilometer/ceilometer-dist.conf
387 install -p -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/ceilometer
388 install -p -D -m 640 etc/ceilometer/ceilometer.conf.sample %{buildroot}%{_sysconfdir}/ceilometer/ceilometer.conf
389 install -p -D -m 640 etc/ceilometer/policy.json %{buildroot}%{_sysconfdir}/ceilometer/policy.json
390 install -p -D -m 640 etc/ceilometer/pipeline.yaml %{buildroot}%{_sysconfdir}/ceilometer/pipeline.yaml
391 install -p -D -m 640 etc/ceilometer/event_definitions.yaml %{buildroot}%{_sysconfdir}/ceilometer/event_definitions.yaml
392 install -p -D -m 640 etc/ceilometer/api_paste.ini %{buildroot}%{_sysconfdir}/ceilometer/api_paste.ini
393 install -p -D -m 640 etc/ceilometer/rootwrap.conf %{buildroot}%{_sysconfdir}/ceilometer/rootwrap.conf
394 install -p -D -m 640 etc/ceilometer/rootwrap.d/ipmi.filters %{buildroot}/%{_sysconfdir}/ceilometer/rootwrap.d/ipmi.filters
395
396 # Install initscripts for services
397 %if 0%{?rhel} && 0%{?rhel} <= 6
398 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/%{name}-api
399 install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/%{name}-collector
400 install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/%{name}-compute
401 install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/%{name}-central
402 install -p -D -m 755 %{SOURCE14} %{buildroot}%{_initrddir}/%{name}-alarm-notifier
403 install -p -D -m 755 %{SOURCE15} %{buildroot}%{_initrddir}/%{name}-alarm-evaluator
404 install -p -D -m 755 %{SOURCE16} %{buildroot}%{_initrddir}/%{name}-notification
405 install -p -D -m 755 %{SOURCE17} %{buildroot}%{_initrddir}/%{name}-ipmi
406 install -p -D -m 755 %{SOURCE18} %{buildroot}%{_initrddir}/%{name}-polling
407
408 # Install upstart jobs examples
409 install -d -m 755 %{buildroot}%{_datadir}/ceilometer
410 install -p -m 644 %{SOURCE100} %{buildroot}%{_datadir}/ceilometer/
411 install -p -m 644 %{SOURCE110} %{buildroot}%{_datadir}/ceilometer/
412 install -p -m 644 %{SOURCE120} %{buildroot}%{_datadir}/ceilometer/
413 install -p -m 644 %{SOURCE130} %{buildroot}%{_datadir}/ceilometer/
414 install -p -m 644 %{SOURCE140} %{buildroot}%{_datadir}/ceilometer/
415 install -p -m 644 %{SOURCE150} %{buildroot}%{_datadir}/ceilometer/
416 install -p -m 644 %{SOURCE160} %{buildroot}%{_datadir}/ceilometer/
417 install -p -m 644 %{SOURCE170} %{buildroot}%{_datadir}/ceilometer/
418 install -p -m 644 %{SOURCE180} %{buildroot}%{_datadir}/ceilometer/
419 %else
420 install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}-api.service
421 install -p -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-collector.service
422 install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-compute.service
423 install -p -D -m 644 %{SOURCE13} %{buildroot}%{_unitdir}/%{name}-central.service
424 install -p -D -m 644 %{SOURCE14} %{buildroot}%{_unitdir}/%{name}-alarm-notifier.service
425 install -p -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/%{name}-alarm-evaluator.service
426 install -p -D -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/%{name}-notification.service
427 install -p -D -m 644 %{SOURCE17} %{buildroot}%{_unitdir}/%{name}-ipmi.service
428 install -p -D -m 644 %{SOURCE18} %{buildroot}%{_unitdir}/%{name}-polling.service
429 %endif
430
431 # Install logrotate
432 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
433
434 %if 0%{?rhel} && 0%{?rhel} <= 6
435 # Install pid directory
436 install -d -m 755 %{buildroot}%{_localstatedir}/run/ceilometer
437 %endif
438
439 # Remove unneeded in production stuff
440 rm -f %{buildroot}%{_bindir}/ceilometer-debug
441 rm -fr %{buildroot}%{python_sitelib}/tests/
442 rm -fr %{buildroot}%{python_sitelib}/run_tests.*
443 rm -f %{buildroot}/usr/share/doc/ceilometer/README*
444
445
446 %pre common
447 getent group ceilometer >/dev/null || groupadd -r ceilometer --gid 166
448 if ! getent passwd ceilometer >/dev/null; then
449   # Id reservation request: https://bugzilla.redhat.com/923891
450   useradd -u 166 -r -g ceilometer -G ceilometer,nobody -d %{_sharedstatedir}/ceilometer -s /sbin/nologin -c "OpenStack ceilometer Daemons" ceilometer
451 fi
452 exit 0
453
454 %post compute
455 %if 0%{?rhel} && 0%{?rhel} <= 6
456 if [ $1 -eq 1 ] ; then
457     # Initial installation
458     /sbin/chkconfig --add %{name}-compute
459 fi
460 %else
461 %systemd_post %{name}-compute.service
462 %endif
463
464 %post collector
465 %if 0%{?rhel} && 0%{?rhel} <= 6
466 if [ $1 -eq 1 ] ; then
467     # Initial installation
468     /sbin/chkconfig --add %{name}-collector
469 fi
470 %else
471 %systemd_post %{name}-collector.service
472 %endif
473
474 %post notification
475 %if 0%{?rhel} && 0%{?rhel} <= 6
476 if [ $1 -eq 1 ] ; then
477     # Initial installation
478     /sbin/chkconfig --add %{name}-notification
479 fi
480 %else
481 %systemd_post %{name}-notification.service
482 %endif
483
484 %post api
485 %if 0%{?rhel} && 0%{?rhel} <= 6
486 if [ $1 -eq 1 ] ; then
487     # Initial installation
488     /sbin/chkconfig --add %{name}-api
489 fi
490 %else
491 %systemd_post %{name}-api.service
492 %endif
493
494 %post central
495 %if 0%{?rhel} && 0%{?rhel} <= 6
496 if [ $1 -eq 1 ] ; then
497     # Initial installation
498     /sbin/chkconfig --add %{name}-central
499 fi
500 %else
501 %systemd_post %{name}-central.service
502 %endif
503
504
505 %post alarm
506 %if 0%{?rhel} && 0%{?rhel} <= 6
507 if [ $1 -eq 1 ] ; then
508     # Initial installation
509     for svc in alarm-notifier alarm-evaluator; do
510         /sbin/chkconfig --add %{name}-${svc}
511     done
512 fi
513 %else
514 %systemd_post %{name}-alarm-notifier.service %{name}-alarm-evaluator.service
515 %endif
516
517 %post ipmi
518 %if 0%{?rhel} && 0%{?rhel} <= 6
519 if [ $1 -eq 1 ] ; then
520     # Initial installation
521     /sbin/chkconfig --add %{name}-ipmi
522 fi
523 %else
524 %systemd_post %{name}-alarm-ipmi.service
525 %endif
526
527 %post polling
528 %if 0%{?rhel} && 0%{?rhel} <= 6
529 if [ $1 -eq 1 ] ; then
530     # Initial installation
531     /sbin/chkconfig --add %{name}-polling
532 fi
533 %else
534 %systemd_post %{name}-polling.service
535 %endif
536
537 %preun compute
538 %if 0%{?rhel} && 0%{?rhel} <= 6
539 if [ $1 -eq 0 ] ; then
540     for svc in compute; do
541         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
542         /sbin/chkconfig --del %{name}-${svc}
543     done
544 fi
545 %else
546 %systemd_preun %{name}-compute.service
547 %endif
548
549 %preun collector
550 %if 0%{?rhel} && 0%{?rhel} <= 6
551 if [ $1 -eq 0 ] ; then
552     for svc in collector; do
553         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
554         /sbin/chkconfig --del %{name}-${svc}
555     done
556 fi
557 %else
558 %systemd_preun %{name}-collector.service
559 %endif
560
561 %preun notification
562 %if 0%{?rhel} && 0%{?rhel} <= 6
563 if [ $1 -eq 0 ] ; then
564     for svc in notification; do
565         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
566         /sbin/chkconfig --del %{name}-${svc}
567     done
568 fi
569 %else
570 %systemd_preun %{name}-notification.service
571 %endif
572
573 %preun api
574 %if 0%{?rhel} && 0%{?rhel} <= 6
575 if [ $1 -eq 0 ] ; then
576     for svc in api; do
577         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
578         /sbin/chkconfig --del %{name}-${svc}
579     done
580 fi
581 %else
582 %systemd_preun %{name}-api.service
583 %endif
584
585 %preun central
586 %if 0%{?rhel} && 0%{?rhel} <= 6
587 if [ $1 -eq 0 ] ; then
588     for svc in central; do
589         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
590         /sbin/chkconfig --del %{name}-${svc}
591     done
592 fi
593 %else
594 %systemd_preun %{name}-central.service
595 %endif
596
597
598 %preun alarm
599 %if 0%{?rhel} && 0%{?rhel} <= 6
600 if [ $1 -eq 0 ] ; then
601     for svc in alarm-notifier alarm-evaluator; do
602         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
603         /sbin/chkconfig --del %{name}-${svc}
604     done
605 fi
606 %else
607 %systemd_preun %{name}-alarm-notifier.service %{name}-alarm-evaluator.service
608 %endif
609
610 %preun ipmi
611 %if 0%{?rhel} && 0%{?rhel} <= 6
612 if [ $1 -eq 0 ] ; then
613     for svc in ipmi; do
614         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
615         /sbin/chkconfig --del %{name}-${svc}
616     done
617 fi
618 %else
619 %systemd_preun %{name}-ipmi.service
620 %endif
621
622 %preun polling
623 %if 0%{?rhel} && 0%{?rhel} <= 6
624 if [ $1 -eq 0 ] ; then
625     for svc in polling; do
626         /sbin/service %{name}-${svc} stop > /dev/null 2>&1
627         /sbin/chkconfig --del %{name}-${svc}
628     done
629 fi
630 %else
631 %systemd_preun %{name}-polling.service
632 %endif
633
634 %postun compute
635 %if 0%{?rhel} && 0%{?rhel} <= 6
636 if [ $1 -ge 1 ] ; then
637     # Package upgrade, not uninstall
638     for svc in compute; do
639         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
640     done
641 fi
642 %else
643 %systemd_postun_with_restart %{name}-compute.service
644 %endif
645
646 %postun collector
647 %if 0%{?rhel} && 0%{?rhel} <= 6
648 if [ $1 -ge 1 ] ; then
649     # Package upgrade, not uninstall
650     for svc in collector; do
651         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
652     done
653 fi
654 %else
655 %systemd_postun_with_restart %{name}-collector.service
656 %endif
657
658 %postun notification
659 %if 0%{?rhel} && 0%{?rhel} <= 6
660 if [ $1 -ge 1 ] ; then
661     # Package upgrade, not uninstall
662     for svc in notification; do
663         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
664     done
665 fi
666 %else
667 %systemd_postun_with_restart %{name}-notification.service
668 %endif
669
670 %postun api
671 %if 0%{?rhel} && 0%{?rhel} <= 6
672 if [ $1 -ge 1 ] ; then
673     # Package upgrade, not uninstall
674     for svc in api; do
675         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
676     done
677 fi
678 %else
679 %systemd_postun_with_restart %{name}-api.service
680 %endif
681
682 %postun central
683 %if 0%{?rhel} && 0%{?rhel} <= 6
684 if [ $1 -ge 1 ] ; then
685     # Package upgrade, not uninstall
686     for svc in central; do
687         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
688     done
689 fi
690 %else
691 %systemd_postun_with_restart %{name}-central.service
692 %endif
693
694
695 %postun alarm
696 %if 0%{?rhel} && 0%{?rhel} <= 6
697 if [ $1 -ge 1 ] ; then
698     # Package upgrade, not uninstall
699     for svc in alarm-notifier alarm-evaluator; do
700         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
701     done
702 fi
703 %else
704 %systemd_postun_with_restart %{name}-alarm-notifier.service %{name}-alarm-evaluator.service
705 %endif
706
707 %postun ipmi
708 %if 0%{?rhel} && 0%{?rhel} <= 6
709 if [ $1 -ge 1 ] ; then
710     # Package upgrade, not uninstall
711     for svc in ipmi; do
712         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
713     done
714 fi
715 %else
716 %systemd_postun_with_restart %{name}-ipmi.service
717 %endif
718
719 %postun polling
720 %if 0%{?rhel} && 0%{?rhel} <= 6
721 if [ $1 -ge 1 ] ; then
722     # Package upgrade, not uninstall
723     for svc in polling; do
724         /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || :
725     done
726 fi
727 %else
728 %systemd_postun_with_restart %{name}-polling.service
729 %endif
730
731 %files common
732 %doc LICENSE
733 %dir %{_sysconfdir}/ceilometer
734 %attr(-, root, ceilometer) %{_datadir}/ceilometer/ceilometer-dist.conf
735 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/ceilometer.conf
736 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/policy.json
737 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/pipeline.yaml
738 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/api_paste.ini
739 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/event_definitions.yaml
740 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
741
742 %dir %attr(0775, ceilometer, ceilometer) %{_localstatedir}/log/ceilometer
743 %if 0%{?rhel} && 0%{?rhel} <= 6
744 %dir %attr(0755, ceilometer, root) %{_localstatedir}/run/ceilometer
745 %endif
746
747 %{_bindir}/ceilometer-dbsync
748 %{_bindir}/ceilometer-expirer
749 %{_bindir}/ceilometer-send-sample
750
751
752 %defattr(-, ceilometer, ceilometer, -)
753 %dir %{_sharedstatedir}/ceilometer
754 %dir %{_sharedstatedir}/ceilometer/tmp
755
756
757 %files -n python-ceilometer
758 %{python_sitelib}/ceilometer
759 %{python_sitelib}/ceilometer-%{version}*.egg-info
760
761
762 %if 0%{?with_doc}
763 %files doc
764 %doc doc/build/html
765 %endif
766
767
768 %files compute
769 %{_bindir}/ceilometer-agent-compute
770 %if 0%{?rhel} && 0%{?rhel} <= 6
771 %{_initrddir}/%{name}-compute
772 %{_datarootdir}/ceilometer/%{name}-compute.upstart
773 %else
774 %{_unitdir}/%{name}-compute.service
775 %endif
776
777
778 %files collector
779 %{_bindir}/ceilometer-collector*
780 %if 0%{?rhel} && 0%{?rhel} <= 6
781 %{_initrddir}/%{name}-collector
782 %{_datarootdir}/ceilometer/%{name}-collector.upstart
783 %else
784 %{_unitdir}/%{name}-collector.service
785 %endif
786
787
788 %files notification
789 %{_bindir}/ceilometer-agent-notification
790 %if 0%{?rhel} && 0%{?rhel} <= 6
791 %{_initrddir}/%{name}-notification
792 %{_datarootdir}/ceilometer/%{name}-notification.upstart
793 %else
794 %{_unitdir}/%{name}-notification.service
795 %endif
796
797
798 %files api
799 %{_bindir}/ceilometer-api
800 %if 0%{?rhel} && 0%{?rhel} <= 6
801 %{_initrddir}/%{name}-api
802 %{_datarootdir}/ceilometer/%{name}-api.upstart
803 %else
804 %{_unitdir}/%{name}-api.service
805 %endif
806
807
808 %files central
809 %{_bindir}/ceilometer-agent-central
810 %if 0%{?rhel} && 0%{?rhel} <= 6
811 %{_initrddir}/%{name}-central
812 %{_datarootdir}/ceilometer/%{name}-central.upstart
813 %else
814 %{_unitdir}/%{name}-central.service
815 %endif
816
817
818 %files ipmi
819 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/rootwrap.conf
820 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/rootwrap.d/ipmi.filters
821 %{_bindir}/ceilometer-rootwrap
822 %{_bindir}/ceilometer-agent-ipmi
823 %{_sysconfdir}/sudoers.d/ceilometer
824 %if 0%{?rhel} && 0%{?rhel} <= 6
825 %{_initrddir}/%{name}-ipmi
826 %{_datarootdir}/ceilometer/%{name}-ipmi.upstart
827 %else
828 %{_unitdir}/%{name}-ipmi.service
829 %endif
830
831
832 %files polling
833 %{_bindir}/ceilometer-polling
834 %if 0%{?rhel} && 0%{?rhel} <= 6
835 %{_initrddir}/%{name}-polling
836 %{_datarootdir}/ceilometer/%{name}-polling.upstart
837 %else
838 %{_unitdir}/%{name}-polling.service
839 %endif
840
841
842 %files alarm
843 %{_bindir}/ceilometer-alarm-notifier
844 %{_bindir}/ceilometer-alarm-evaluator
845 %if 0%{?rhel} && 0%{?rhel} <= 6
846 %{_initrddir}/%{name}-alarm-notifier
847 %{_datarootdir}/ceilometer/%{name}-alarm-notifier.upstart
848 %{_initrddir}/%{name}-alarm-evaluator
849 %{_datarootdir}/ceilometer/%{name}-alarm-evaluator.upstart
850 %else
851 %{_unitdir}/%{name}-alarm-notifier.service
852 %{_unitdir}/%{name}-alarm-evaluator.service
853 %endif
854
855
856 %changelog
857 * Fri Jan 23 2015 Ivan Berezovskiy <iberezovskiy@mirantis.com> - 2015.1.0
858 - Create own package for polling agent
859 - Update requirements and version to 2015.1.0
860
861 * Wed Jan 21 2015 Ivan Berezovskiy <iberezovskiy@mirantis.com> - 2015.1.0b1
862 - Update version to 2015.1.0b1
863
864 * Wed Nov 19 2014 Daniil Trishkin <dtrishkin@mirantis.com> - 2014.2
865 - Update to upstream 2014.2
866 - Update requirements
867
868 * Fri Jul 4 2014 Ivan Berezovskiy <iberezovskiy@mirantis.com> - 2014.2.b1
869 - Update to upstream 2014.2.b1
870 - Update requirements
871
872 * Wed Jun 11 2014 Steve Linabery <slinaber@redhat.com> - 2014.1.1-2
873 - Update to upstream 2014.1.1
874 - fix message routing with newer QPID (rhbz#1103800)
875
876 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.1-3
877 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
878
879 * Wed May 07 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-2
880 - Avoid dependency issues with distributed installs (#1095414)
881
882 * Thu Apr 17 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-1
883 - Update to Icehouse release
884
885 * Fri Apr 11 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.7.rc2
886 - Update to upstream 2014.1.rc2
887 - Remove qpid as default rpc backend
888 - Split out openstack-ceilometer-notification subpackage from collector
889
890 * Mon Mar 31 2014 Pádraig Brady <P@draigBrady.com> 2014.1-0.6.rc1
891 - Update to upstream 2014.1.rc1
892
893 * Fri Mar 14 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.5.b3
894 - Update to Icehouse milestone 3
895
896 * Tue Feb 04 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.4.b2
897 - Fix missing dependency on python-babel
898
899 * Mon Jan 27 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.3.b2
900 - Update to Icehouse milestone 2
901
902 * Mon Jan 06 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.2.b1
903 - Set python-six min version to ensure updated
904
905 * Mon Dec 23 2013 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.1.b1
906 - Update to Icehouse milestone 1
907
908 * Tue Dec 17 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2.1-1
909 - Update to Havana stable release 2013.2.1
910
911 * Thu Oct 17 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-1
912 - Update to Havana release
913
914 * Tue Oct 15 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.12.rc2
915 - Update to Havana rc2
916 - openstack-ceilometer-alarm now depends on python-ceilometerclient
917
918 * Thu Oct 03 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.12.rc1
919 - Update to Havana rc1
920 - Separate out the new alarm services to the 'alarm' subpackage
921
922 * Fri Sep 13 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.10.b3
923 - Depend on python-oslo-config >= 1:1.2.0 so it upgraded automatically
924
925 * Mon Sep 10 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.8.b3
926 - Depend on python-pymongo rather than pymongo to avoid a puppet bug
927
928 * Mon Sep 9 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.7.b3
929 - Depend on python-alembic
930
931 * Mon Sep 9 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.6.b3
932 - Distribute dist defaults in ceilometer-dist.conf separate to user ceilometer.conf
933
934 * Mon Sep 9 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.5.b3
935 - Update to Havana milestone 3
936
937 * Tue Aug 27 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.4.b1
938 - Avoid python runtime dependency management
939
940 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.2-0.3.b1
941 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
942
943 * Thu Jun  6 2013 Pádraig Brady <P@draigBrady.com> - 2013.2-0.2.b1
944 - Fix uninstall for openstack-ceilometer-central
945
946 * Fri May 31 2013 Pádraig Brady <P@draigBrady.com> - 2013.2-0.1.b1
947 - Havana milestone 1
948
949 * Mon Apr  8 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-2
950 - Grizzly release
951
952 * Tue Mar 26 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-0.5.g3
953 - Initial package
954