Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Ardana:8:CentOS
openstack-monasca-transform
openstack-monasca-transform.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openstack-monasca-transform.spec of Package openstack-monasca-transform
# # spec file for package openstack-monasca-transform # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %global sname monasca-transform %define username monasca-transform %define groupname monasca Name: openstack-monasca-transform Version: 0.11.1~dev4 Release: 0 Summary: A transformation and aggregation engine for Monasca License: Apache-2.0 Group: Development/Languages/Python Url: https://wiki.openstack.org/wiki/Monasca/Transform Source0: monasca-transform-stable-pike.tar.gz Source1: openstack-monasca-transform.service BuildRequires: crudini BuildRequires: fdupes BuildRequires: openstack-macros BuildRequires: python-PyMySQL >= 0.7.6 BuildRequires: python-SQLAlchemy >= 1.0.10 BuildRequires: python-kazoo >= 2.2 BuildRequires: python-mock >= 2.0 BuildRequires: python-monasca-common >= 1.4.0 BuildRequires: python-nose BuildRequires: python-os-testr >= 0.8.0 BuildRequires: python-oslo.config >= 4.0.0 BuildRequires: python-oslo.log >= 3.22.0 BuildRequires: python-oslo.service >= 1.10.0 BuildRequires: python-oslotest >= 1.10.0 BuildRequires: python-pbr >= 2.0.0 BuildRequires: python-psutil >= 3.2.2 BuildRequires: python-setuptools >= 16.0 BuildRequires: python-six >= 1.9.0 BuildRequires: python-stevedore >= 1.20.0 BuildRequires: python-tooz >= 1.47.0 BuildRequires: zip #BuildRequires: spark == 1.6.3 Requires: python-%{sname} = %{version}-%{release} BuildArch: noarch %if 0%{?suse_version} BuildRequires: systemd-rpm-macros Requires(pre): pwdutils %{?systemd_requires} %else BuildRequires: systemd Requires(post): systemd Requires(postun): systemd Requires(preun): systemd %endif %description A transformation and aggregation engine for Monasca. Collects, groups and aggregates existing individual Monasca metrics according to business requirements and publishes new transformed (derived) metrics to the Monasca Kafka queue. Requires an installation of Apache Spark 1.6.3, either on this server or another, and configured in %{_sysconfdir}/monasca-transform.conf as spark_master_list. %package -n python-%{sname} Summary: Python core module for monasca-transform Group: Development/Languages/Python Requires: python-PyMySQL >= 0.7.6 Requires: python-SQLAlchemy >= 1.0.10 Requires: python-kazoo >= 2.2 Requires: python-monasca-common >= 1.4.0 Requires: python-oslo.config >= 4.0.0 Requires: python-oslo.log >= 3.22.0 Requires: python-six >= 1.9.0 Requires: python-stevedore >= 1.20.0 Requires: python-tooz >= 1.47.0 #Requires: spark == 1.6.3 %description -n python-%{sname} A transformation and aggregation engine for Monasca. Collects, groups and aggregates existing individual Monasca metrics according to business requirements and publishes new transformed (derived) metrics to the Monasca Kafka queue. Requires an installation of Apache Spark 1.6.3, either on this server or another, and configured in %{_sysconfdir}/monasca-transform.conf as spark_master_list. %prep # Unfortunately again, .tgz has _ in directory name so can't use sname %autosetup -n monasca_transform-0.11.1.dev4 %py_req_cleanup # Add entry point for service startup by appending console_scripts after [entry_points]. sed -i '/\[entry_points\]/aconsole_scripts =\n monasca-transform = monasca_transform.service.transform_service:main_service\n' setup.cfg %build %{py2_build} # copy, compile and create a zip file to be fed to spark python -m compileall monasca_transform zip -r %{sname}.zip monasca_transform -i '*.pyc' %install %{py2_install} install -d -m 755 %{buildroot}%{_sysconfdir}/monasca install -d -m 750 %{buildroot}%{_sysconfdir}/monasca_transform install -d -m 750 %{buildroot}%{_sysconfdir}/monasca_transform/monasca_transform.conf.d install -D -m 640 etc/monasca-transform.conf %{buildroot}%{_sysconfdir}/monasca-transform.conf install -d -m 750 %{buildroot}%{_var}/log/monasca install -d -m 750 %{buildroot}%{_var}/log/monasca/transform # systemd unit file install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %if 0%{?suse_version} mkdir -p %{buildroot}%{_sbindir} ln -sr %{buildroot}%{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} %endif install -d -m 750 %{buildroot}%{_datadir}/%{sname} install -D -m 644 %{sname}.zip %{buildroot}%{_datadir}/%{sname}/%{sname}.zip # reconfigure for rpm install %define mon_trans_conf %{buildroot}%{_sysconfdir}/monasca-transform.conf crudini --set %{mon_trans_conf} service service_log_path %{_var}/log/monasca/transform/ crudini --del %{mon_trans_conf} service setup_file crudini --set %{mon_trans_conf} service spark_driver %{python2_sitelib}/monasca_transform/driver/mon_metrics_kafka.py # disable spark event logging - mon-trans only keeps 10 jobs so history not needed crudini --set %{mon_trans_conf} service spark_event_logging_enabled false # NOTE: Special handling for spark_jars_list will need to be done after install crudini --set %{mon_trans_conf} service spark_home $"$spark_home" crudini --set %{mon_trans_conf} service work_dir %{_rundir}/monasca/monasca-transform crudini --set %{mon_trans_conf} service spark_master_list spark://localhost:7078 # for the .zip file created above crudini --set %{mon_trans_conf} service spark_python_files %{_datadir}/%{sname}/%{sname}.zip %fdupes %{buildroot}%{python2_sitelib} %check # automated tests need to be restricted, as functional tests require running Spark find . -type f -name *.pyc -delete ostestr %pre # create user and groups %openstack_pre_user_group_create %{username} %{groupname} /sbin/nologin %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun %{name}.service %files %license LICENSE %doc README.md ChangeLog %dir %attr(-, root, %{groupname}) %{_sysconfdir}/monasca %config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/monasca-transform.conf %{_unitdir}/%{name}.service %if 0%{?suse_version} %{_sbindir}/rc%{name} %endif %{_bindir}/monasca-transform %dir %attr(0750, root, %{groupname}) %{_var}/log/monasca %dir %attr(0750, %{username}, %{groupname}) %{_var}/log/monasca/transform %files -n python-monasca-transform %defattr(-, root, root,-) %license LICENSE %{python2_sitelib}/monasca_transform %{python2_sitelib}/*.egg-info %dir %attr(0750, %{username}, %{groupname}) %{_datadir}/%{sname} %{_datadir}/%{sname}/%{sname}.zip %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor