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