From: Andrii Kroshchenko Date: Wed, 2 Nov 2016 10:53:44 +0000 (+0200) Subject: [MOS10.0][RPM] Update ceilometer to v7.0.0 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F28100%2F13;p=openstack-build%2Fceilometer-build.git [MOS10.0][RPM] Update ceilometer to v7.0.0 * Put Ceilometer API under Apache 2. Change-Id: Ic433ebf84fe8002c919c34d602c2d262e2b9c012 --- diff --git a/centos7/rpm/SOURCES/openstack-ceilometer-api.service b/centos7/rpm/SOURCES/openstack-ceilometer-api.service deleted file mode 100644 index 1c55e56..0000000 --- a/centos7/rpm/SOURCES/openstack-ceilometer-api.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=OpenStack ceilometer API service -After=syslog.target network.target - -[Service] -Type=simple -User=ceilometer -ExecStart=/usr/bin/ceilometer-api --logfile /var/log/ceilometer/api.log - -[Install] -WantedBy=multi-user.target - diff --git a/centos7/rpm/SOURCES/wsgi-ceilometer-api.conf b/centos7/rpm/SOURCES/wsgi-ceilometer-api.conf new file mode 100644 index 0000000..56ad7b7 --- /dev/null +++ b/centos7/rpm/SOURCES/wsgi-ceilometer-api.conf @@ -0,0 +1,15 @@ +Listen 8777 + + + WSGIDaemonProcess ceilometer-api processes=2 threads=10 user=ceilometer group=ceilometer display-name=%{GROUP} + WSGIProcessGroup ceilometer-api + WSGIScriptAlias / /usr/lib/python2.7/site-packages/ceilometer/api/app.wsgi + WSGIApplicationGroup %{GLOBAL} + ErrorLog /var/log/httpd/ceilometer_error.log + CustomLog /var/log/httpd/ceilometer_access.log combined + + Require all granted + + + +WSGISocketPrefix /var/run/httpd diff --git a/centos7/rpm/SPECS/openstack-ceilometer.spec b/centos7/rpm/SPECS/openstack-ceilometer.spec index 936f3f6..49f8776 100644 --- a/centos7/rpm/SPECS/openstack-ceilometer.spec +++ b/centos7/rpm/SPECS/openstack-ceilometer.spec @@ -6,7 +6,7 @@ Name: openstack-ceilometer # Liberty semver reset # https://review.openstack.org/#/q/I6a35fa0dda798fad93b804d00a46af80f08d475c,n,z Epoch: 1 -Version: 7.0.0~b2 +Version: 7.0.0 Release: 1%{?dist} Summary: OpenStack measurement collection service @@ -19,19 +19,20 @@ Source2: %{pypi_name}.logrotate Source3: %{pypi_name}.conf.sample Source4: ceilometer-rootwrap-sudoers -Source10: %{name}-api.service +Source10: wsgi-ceilometer-api.conf Source11: %{name}-collector.service Source12: %{name}-compute.service Source13: %{name}-central.service Source14: %{name}-notification.service Source15: %{name}-ipmi.service Source16: %{name}-polling.service + BuildArch: noarch BuildRequires: intltool -BuildRequires: python-sphinx +BuildRequires: python-sphinx >= 1.1.2 BuildRequires: python-setuptools -BuildRequires: python-pbr +BuildRequires: python-pbr >= 1.6 BuildRequires: python-d2to1 BuildRequires: python2-devel @@ -215,6 +216,8 @@ Group: Applications/System Requires: %{name}-common = %{epoch}:%{version}-%{release} +Requires: httpd +Requires: mod_wsgi Requires: python-keystonemiddleware >= 4.0.0 Requires: python-oslo-db >= 4.1.0 Requires: python-pymongo >= 3.0.2 @@ -286,10 +289,11 @@ Group: Documentation # Required to build module documents BuildRequires: python-eventlet -BuildRequires: python-sqlalchemy -BuildRequires: python-webob +BuildRequires: python-sqlalchemy >= 1.0.10 +BuildRequires: python-webob >= 1.2.3 # while not strictly required, quiets the build down when building docs. -BuildRequires: python-migrate, python-iso8601 +BuildRequires: python-migrate >= 0.9.6 +BuildRequires: python-iso8601 %description doc OpenStack ceilometer provides services to measure and @@ -363,37 +367,20 @@ install -p -D -m 640 etc/ceilometer/event_definitions.yaml %{buildroot}%{_syscon install -p -D -m 640 etc/ceilometer/api_paste.ini %{buildroot}%{_sysconfdir}/ceilometer/api_paste.ini install -p -D -m 640 etc/ceilometer/rootwrap.conf %{buildroot}%{_sysconfdir}/ceilometer/rootwrap.conf install -p -D -m 640 etc/ceilometer/rootwrap.d/ipmi.filters %{buildroot}/%{_sysconfdir}/ceilometer/rootwrap.d/ipmi.filters +install -p -D -m 640 etc/ceilometer/pipeline.yaml %{buildroot}%{_sysconfdir}/ceilometer/loadbalancer_v2_meter_definitions.yaml +install -p -D -m 640 etc/ceilometer/examples/osprofiler_event_definitions.yaml %{buildroot}%{_sysconfdir}/ceilometer/osprofiler_event_definitions.yaml +install -p -D -m 640 etc/ceilometer/gnocchi_resources.yaml %{buildroot}%{_sysconfdir}/ceilometer/gnocchi_resources.yaml # Install initscripts for services -%if 0%{?rhel} && 0%{?rhel} <= 6 -install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/%{name}-api -install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/%{name}-collector -install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/%{name}-compute -install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/%{name}-central -install -p -D -m 755 %{SOURCE14} %{buildroot}%{_initrddir}/%{name}-notification -install -p -D -m 755 %{SOURCE15} %{buildroot}%{_initrddir}/%{name}-ipmi -install -p -D -m 755 %{SOURCE16} %{buildroot}%{_initrddir}/%{name}-polling - -# Install upstart jobs examples -install -d -m 755 %{buildroot}%{_datadir}/ceilometer -install -p -m 644 %{SOURCE100} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE110} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE120} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE130} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE140} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE150} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE160} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE170} %{buildroot}%{_datadir}/ceilometer/ -install -p -m 644 %{SOURCE180} %{buildroot}%{_datadir}/ceilometer/ -%else -install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}-api.service install -p -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-collector.service install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-compute.service install -p -D -m 644 %{SOURCE13} %{buildroot}%{_unitdir}/%{name}-central.service install -p -D -m 644 %{SOURCE14} %{buildroot}%{_unitdir}/%{name}-notification.service install -p -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/%{name}-ipmi.service install -p -D -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/%{name}-polling.service -%endif + +# Install wsgi conf file for ceilometer-api +install -p -D -m 644 %{SOURCE10} %{buildroot}%{_datadir}/ceilometer/ # Install logrotate install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} @@ -404,6 +391,21 @@ rm -fr %{buildroot}%{python2_sitelib}/tests/ rm -fr %{buildroot}%{python2_sitelib}/run_tests.* rm -f %{buildroot}/usr/share/doc/ceilometer/README* +# Remove file installed to wrong directory +rm -rf %{buildroot}/etc/ceilometer/osprofiler_event_definitions.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/api_paste.ini +rm -rf %{buildroot}/usr/etc/ceilometer/ceilometer-config-generator.conf +rm -rf %{buildroot}/usr/etc/ceilometer/ceilometer.conf.sample +rm -rf %{buildroot}/usr/etc/ceilometer/event_definitions.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/event_pipeline.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/examples/loadbalancer_v2_meter_definitions.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/examples/osprofiler_event_definitions.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/gnocchi_resources.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/pipeline.yaml +rm -rf %{buildroot}/usr/etc/ceilometer/policy.json +rm -rf %{buildroot}/usr/etc/ceilometer/rootwrap.conf +rm -rf %{buildroot}/usr/etc/ceilometer/rootwrap.d/ipmi.filters + %pre common getent group ceilometer >/dev/null || groupadd -r ceilometer --gid 166 @@ -423,7 +425,7 @@ exit 0 %systemd_post %{name}-notification.service %post api -%systemd_post %{name}-api.service +%systemd_post httpd.service %post central %systemd_post %{name}-central.service @@ -443,9 +445,6 @@ exit 0 %preun notification %systemd_preun %{name}-notification.service -%preun api -%systemd_preun %{name}-api.service - %preun central %systemd_preun %{name}-central.service @@ -465,7 +464,7 @@ exit 0 %systemd_postun_with_restart %{name}-notification.service %postun api -%systemd_postun_with_restart %{name}-api.service +%systemd_postun_with_restart httpd.service %postun central %systemd_postun_with_restart %{name}-central.service @@ -473,7 +472,6 @@ exit 0 %postun ipmi %systemd_postun_with_restart %{name}-ipmi.service - %postun polling %systemd_postun_with_restart %{name}-polling.service @@ -487,6 +485,8 @@ exit 0 %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/pipeline.yaml %config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/api_paste.ini %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/gnocchi_resources.yaml +%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/loadbalancer_v2_meter_definitions.yaml %dir %attr(0755, ceilometer, root) %{_localstatedir}/log/ceilometer @@ -494,6 +494,7 @@ exit 0 %{_bindir}/ceilometer-db-legacy-clean %{_bindir}/ceilometer-expirer %{_bindir}/ceilometer-send-sample +%{_bindir}/ceilometer-upgrade %defattr(-, ceilometer, ceilometer, -) @@ -530,7 +531,7 @@ exit 0 %files api %{_bindir}/ceilometer-api -%{_unitdir}/%{name}-api.service +%attr(0644, root, keystone) %{_datadir}/ceilometer/wsgi-ceilometer-api.conf %files central @@ -549,6 +550,10 @@ exit 0 %changelog +* Wed Nov 2 2016 Andrii Kroshchenko - 1:7.0.0-1.el7 +- Update version to 7.0.0 +- Update build and runtime dependencies + * Mon May 30 2016 Mikhail Ivanov - 1:7.0.0~b2-1.el7 - Remove hardcoded openstack-ceilometer-polling file LP #1586359