diff --git a/openstack/freezer-api/freezer-api.spec.j2 b/openstack/freezer-api/freezer-api.spec.j2 deleted file mode 100644 index e82c57ffa..000000000 --- a/openstack/freezer-api/freezer-api.spec.j2 +++ /dev/null @@ -1,163 +0,0 @@ -{% set pypi_name = 'freezer-api' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/freezer-api/freezer-api-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} -%if 0%{?rhel} || 0%{?fedora} -%global rdo 1 -%endif -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: OpenStack Backup and Restore - API service -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://docs.openstack.org/freezer -Source0: {{ source|basename }} -Source1: openstack-freezer-api.logrotate -BuildRequires: openstack-macros -BuildRequires: {{ py3('Paste') }} -BuildRequires: {{ py3('PasteDeploy') }} -BuildRequires: {{ py3('astroid') }} -BuildRequires: {{ py3('elasticsearch') }} -BuildRequires: {{ py3('falcon') }} -BuildRequires: {{ py3('fixtures') }} -BuildRequires: {{ py3('jsonschema') }} -BuildRequires: {{ py3('keystonemiddleware') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.context') }} -BuildRequires: {{ py3('oslo.db') }} -BuildRequires: {{ py3('oslo.i18n') }} -BuildRequires: {{ py3('oslo.log') }} -BuildRequires: {{ py3('oslo.middleware') }} -BuildRequires: {{ py3('oslo.policy') }} -BuildRequires: {{ py3('oslo.serialization') }} -BuildRequires: {{ py3('oslo.upgradecheck') }} -BuildRequires: {{ py3('oslotest') }} -BuildRequires: {{ py3('reno') }} -BuildRequires: {{ py3('stestr') }} -BuildRequires: {{ py3('testresources') }} -BuildRequires: {{ py3('testscenarios') }} -BuildRequires: {{ py3('testtools') }} -Requires: python3-{{ pypi_name }} = %{version}-%{release} -BuildArch: noarch -%if 0%{?suse_version} -BuildRequires: systemd-rpm-macros -Requires(pre): pwdutils -%{?systemd_requires} -%endif -%if 0%{?rdo} -BuildRequires: systemd -Requires(post): systemd -Requires(postun): systemd -Requires(pre): shadow-utils -Requires(preun): systemd -%endif - -%description -API service for OpenStack Freeze: an OpenStack Swift incremental -backup and restore automation tool for file system, MongoDB, -MySQL. LVM snapshot and encryption support. - -%package -n python3-{{ pypi_name }} -Summary: Freezer API Python library -Group: Development/Languages/Python -Requires: {{ py3('Paste') }} -Requires: {{ py3('PasteDeploy') }} -Requires: {{ py3('elasticsearch') }} -Requires: {{ py3('falcon') }} -Requires: {{ py3('jsonschema') }} -Requires: {{ py3('keystonemiddleware') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.context') }} -Requires: {{ py3('oslo.db') }} -Requires: {{ py3('oslo.i18n') }} -Requires: {{ py3('oslo.log') }} -Requires: {{ py3('oslo.middleware') }} -Requires: {{ py3('oslo.policy') }} -Requires: {{ py3('oslo.serialization') }} - -%description -n python3-{{ pypi_name }} -API service for OpenStack Freezer: an OpenStack Swift incremental -backup and restore automation tool for file system, MongoDB, -MySQL. LVM snapshot and encryption support. - -This package contains the Freezer API python libraries. - -%package doc -Summary: Documentation for OpenStack Backup Service -Group: Documentation/HTML -BuildRequires: fdupes -BuildRequires: {{ py3('Sphinx') }} -#BuildRequires: {{ py3('openstackdocstheme') }} -BuildRequires: {{ py3('os-api-ref') }} - -%description doc -OpenStack Freezer API documentation. - -This package contains the documentation - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{upstream_version}} -%py_req_cleanup - -%build -%{py3_build} - -PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html -# remove the Sphinx-build leftovers -rm -rf doc/build/html/.{doctrees,buildinfo} -%fdupes doc/build/html/ - -# config file generation -PYTHONPATH=. oslo-config-generator --config-file config-generator/freezer-api.conf \ - --output-file etc/freezer/freezer-api.conf.sample -# policy file generation -PYTHONPATH=. oslopolicy-sample-generator --config-file etc/freezer/freezer-policy-generator.conf \ - --output-file etc/freezer/freezer-api.policy.yaml - -%install -%{py3_install} -install -d -m 755 %{buildroot}%{_sysconfdir}/freezer -install -d -m 755 %{buildroot}%{_sysconfdir}/freezer/freezer-api.conf.d/ -install -d -m 755 %{buildroot}%{_localstatedir}/{lib,log}/freezer -install -p -D -m 640 etc/freezer/freezer-api.conf.sample %{buildroot}%{_sysconfdir}/freezer/freezer-api.conf -install -p -D -m 640 etc/freezer/freezer-api.policy.yaml %{buildroot}%{_sysconfdir}/freezer/policy.yaml -install -p -D -m 640 etc/freezer/freezer-paste.ini %{buildroot}%{_sysconfdir}/freezer/freezer-paste.ini -install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-freezer-api - -# remove duplicates -%fdupes %{buildroot}%{python3_sitelib} - -%pre -%openstack_pre_user_group_create freezer freezer /sbin/nologin - -%check -%{openstack_stestr_run} - -%files -%license LICENSE -%doc README.rst -%{_bindir}/freezer-api -%{_bindir}/freezer-api-wsgi -%{_bindir}/freezer-manage -%{_bindir}/freezer-manager-status -%dir %attr(0750, root, freezer) %{_sysconfdir}/freezer/ -%dir %attr(0750, root, freezer) %{_sysconfdir}/freezer/freezer-api.conf.d/ -%config(noreplace) %attr(0640, root, freezer) %{_sysconfdir}/freezer/freezer-api.conf -%config(noreplace) %attr(0640, root, freezer) %{_sysconfdir}/freezer/freezer-paste.ini -%config(noreplace) %attr(0640, root, freezer) %{_sysconfdir}/freezer/policy.yaml -%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-freezer-api -%dir %attr(0755, freezer, freezer) %{_localstatedir}/lib/freezer -%dir %attr(0750, freezer, freezer) %{_localstatedir}/log/freezer - -%files -n python3-{{ pypi_name }} -%doc README.rst -%license LICENSE -%{python3_sitelib}/freezer_api/ -%{python3_sitelib}/freezer_api*.egg-info - -%files doc -%license LICENSE -%doc doc/build/html - -%changelog diff --git a/openstack/freezer-api/openstack-freezer-api.logrotate b/openstack/freezer-api/openstack-freezer-api.logrotate deleted file mode 100644 index 17d8863e3..000000000 --- a/openstack/freezer-api/openstack-freezer-api.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/freezer-api/*.log { - weekly - dateext - rotate 10 - size 1M - missingok - compress - notifempty - su freezer freezer - minsize 100k -} diff --git a/openstack/freezer-tempest-plugin/freezer-tempest-plugin.spec.j2 b/openstack/freezer-tempest-plugin/freezer-tempest-plugin.spec.j2 deleted file mode 100644 index 45c20bc2d..000000000 --- a/openstack/freezer-tempest-plugin/freezer-tempest-plugin.spec.j2 +++ /dev/null @@ -1,47 +0,0 @@ -{% set pypi_name = 'freezer-tempest-plugin' %} -{% set rpm_release = '1' %} -{% set source=fetch_source('https://tarballs.opendev.org/openstack/freezer-tempest-plugin/freezer-tempest-plugin-master.tar.gz') %} -{% set upstream_version = upstream_version() %} - -%global sname freezer_tempest_plugin -Name: {{ py2name(py_versions='py3') }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Tempest plugin for the freezer project -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://docs.openstack.org/{{ pypi_name }} -Source0: {{ source|basename }} -BuildRequires: openstack-macros -BuildRequires: {{ py3('pbr') }} -Requires: {{ py2pkg('tempest') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.utils') }} -Requires: {{ py3('paramiko') }} -Requires: {{ py3('pbr') }} -Requires: {{ py3('six') }} -BuildArch: noarch - -%description -This package contains Tempest tests to cover the freezer project. -Additionally it provides a plugin to automatically load these tests into Tempest. - -%prep -%autosetup -p1 -n %{sname}-{{ upstream_version }} - -# Let's handle dependencies ourseleves -%py_req_cleanup - -%build -%{py3_build} - -%install -%{py3_install} - -%files -%license LICENSE -%doc README.rst -%{python3_sitelib}/freezer_tempest_plugin -%{python3_sitelib}/*.egg-info - -%changelog diff --git a/openstack/freezer-web-ui/freezer-web-ui.spec.j2 b/openstack/freezer-web-ui/freezer-web-ui.spec.j2 deleted file mode 100644 index 52cd0ecf2..000000000 --- a/openstack/freezer-web-ui/freezer-web-ui.spec.j2 +++ /dev/null @@ -1,70 +0,0 @@ -{% set pypi_name = 'freezer-web-ui' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/freezer-web-ui/freezer-web-ui-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -%if 0%{?rhel} || 0%{?fedora} -%global http_dashboard_dir %{_datarootdir}/openstack-dashboard -%else -%global http_dashboard_dir /srv/www/openstack-dashboard -%endif -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: The Freezer Web UI -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://docs.openstack.org/freezer -Source0: {{ source|basename }} -BuildRequires: fdupes -BuildRequires: {{ py3('horizon') }} -BuildRequires: openstack-macros -BuildRequires: {{ py3('python-freezerclient') }} -Requires: {{ py2pkg('horizon-plugin-freezer-ui') }} = %{version} -BuildArch: noarch - -%description -The Freezer UI Horizon plugin adds Freezer panel to the OpenStack dashboard. - -%package -n {{ py2pkg('horizon-plugin-freezer-ui') }} -Summary: The Freezer Web UI - Python module -Requires: {{ py3('Django') }} -Requires: {{ py3('python-freezerclient') }} - -%description -n {{ py2pkg('horizon-plugin-freezer-ui') }} -The Freezer UI Horizon plugin adds Freezer panel to the OpenStack dashboard. - -%prep -%autosetup -n {{ pypi_name }}-{{upstream_version}} -%py_req_cleanup - -%build -%py3_build - -%install -%py3_install - -install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/ -cp -a disaster_recovery/enabled/_50*.py* %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/ - -%fdupes %{buildroot}%{python2_sitelib} -%fdupes %{buildroot}%{http_dashboard_dir} - -%post -su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null" - -%postun -su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null" - -%files -%doc ChangeLog README.rst -%license LICENSE -%{http_dashboard_dir}/openstack_dashboard/enabled/*.py* - -%files -n {{ py2pkg('horizon-plugin-freezer-ui') }} -%doc README.rst -%license LICENSE -%{python3_sitelib}/disaster_recovery -%{python3_sitelib}/freezer_web_ui-*.egg-info - -%changelog diff --git a/openstack/freezer/freezer.spec.j2 b/openstack/freezer/freezer.spec.j2 deleted file mode 100644 index 2ef94d0d3..000000000 --- a/openstack/freezer/freezer.spec.j2 +++ /dev/null @@ -1,223 +0,0 @@ -{% set pypi_name = 'freezer' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/freezer/freezer-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} -%if 0%{?rhel} || 0%{?fedora} -%global rdo 1 -%endif -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: OpenStack Backup and Restore -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://docs.openstack.org/freezer -Source0: {{ source|basename }} -Source1: openstack-freezer.logrotate -Source2: openstack-freezer-scheduler.service -BuildRequires: openstack-macros -BuildRequires: {{ py2pkg('tempest') }} -BuildRequires: {{ py3('APScheduler') }} -BuildRequires: {{ py3('Babel') }} -BuildRequires: {{ py3('PyMySQL') }} -BuildRequires: {{ py3('botocore') }} -BuildRequires: {{ py3('python-cinderclient') }} -BuildRequires: {{ py3('cryptography') }} -BuildRequires: {{ py3('ddt') }} -BuildRequires: {{ py3('fixtures') }} -BuildRequires: {{ py3('python-freezerclient') }} -BuildRequires: {{ py3('python-glanceclient') }} -BuildRequires: {{ py3('keystoneauth1') }} -BuildRequires: {{ py3('python-keystoneclient') }} -BuildRequires: {{ py3('python-neutronclient') }} -BuildRequires: {{ py3('python-novaclient') }} -BuildRequires: {{ py3('os-brick') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.log') }} -BuildRequires: {{ py3('oslo.service') }} -BuildRequires: {{ py3('oslo.utils') }} -BuildRequires: {{ py3('paramiko') }} -BuildRequires: {{ py3('pbr') }} -BuildRequires: {{ py3('psutil') }} -BuildRequires: {{ py3('pymongo') }} -BuildRequires: {{ py3('setuptools') }} -BuildRequires: {{ py3('stestr') }} -BuildRequires: {{ py3('python-swiftclient') }} -Requires: python3-{{ pypi_name }} = %{version}-%{release} -BuildArch: noarch -%if 0%{?suse_version} -BuildRequires: systemd-rpm-macros -Requires(pre): pwdutils -%{?systemd_requires} -%endif -%if 0%{?rdo} -BuildRequires: systemd -Requires(post): systemd -Requires(postun): systemd -Requires(pre): shadow-utils -Requires(preun): systemd -%endif - -%description -OpenStack Swift incremental backup and restore automation tool for -file system, MongoDB, MySQL. LVM snapshot and encryption support. - -%package -n python3-{{ pypi_name }} -Summary: Freezer Python libraries -Group: Applications/System -Requires: {{ py3('APScheduler') }} -Requires: {{ py3('Babel') }} -Requires: {{ py3('PyMySQL') }} -Requires: {{ py3('botocore') }} -Requires: {{ py3('python-cinderclient') }} -Requires: {{ py3('cryptography') }} -Requires: {{ py3('python-freezerclient') }} -Requires: {{ py3('python-glanceclient') }} -Requires: {{ py3('keystoneauth1') }} -Requires: {{ py3('python-keystoneclient') }} -Requires: {{ py3('python-neutronclient') }} -Requires: {{ py3('python-novaclient') }} -Requires: {{ py3('os-brick') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.log') }} -Requires: {{ py3('oslo.service') }} -Requires: {{ py3('oslo.utils') }} -Requires: {{ py3('paramiko') }} -Requires: {{ py3('psutil') }} -Requires: {{ py3('pymongo') }} -Requires: {{ py3('six') }} -Requires: {{ py3('python-swiftclient') }} - -%description -n python3-{{ pypi_name }} -OpenStack Swift incremental backup and restore automation tool for -file system, MongoDB, MySQL. LVM snapshot and encryption support. - -This package contains the Freezer python libraries. - -%package agent -Summary: OpenStack Freezer - Agent service -Group: Applications/System -Requires: %{name} = %{version}-%{release} - -%description agent -OpenStack Swift incremental backup and restore automation tool for -file system, MongoDB, MySQL. LVM snapshot and encryption support. - -This package contains the Freezer agent code. - -%package scheduler -Summary: OpenStack Freezer - Scheduler service -Group: Applications/System -Requires: %{name} = %{version}-%{release} - -%description scheduler -OpenStack Swift incremental backup and restore automation tool for -file system, MongoDB, MySQL. LVM snapshot and encryption support. - -This package contains the Freezer scheduler agent. - -%package doc -Summary: Documentation for OpenStack Backup Service -Group: Documentation/HTML -BuildRequires: fdupes -BuildRequires: {{ py3('Sphinx') }} -BuildRequires: {{ py3('openstackdocstheme') }} -BuildRequires: {{ py3('sphinxcontrib-apidoc') }} - -%description doc -OpenStack Swift incremental backup and restore automation tool for -file system, MongoDB, MySQL. LVM snapshot and encryption support. - -This package contains the documentation - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{upstream_version}} -%py_req_cleanup - -%build -%{py3_build} - -PBR_VERSION={{ upstream_version }} %sphinx_build -b html doc/source doc/build/html -# remove the Sphinx-build leftovers -rm -rf doc/build/html/.{doctrees,buildinfo} -%fdupes doc/build/html/ -# config file generation -PYTHONPATH=. oslo-config-generator --config-file etc/config-generator.conf \ - --output-file etc/scheduler.conf.sample - -%install -%{py3_install} -install -d -m 755 %{buildroot}%{_sysconfdir}/freezer -install -d -m 755 %{buildroot}%{_localstatedir}/{lib,log}/freezer -install -d -m 755 %{buildroot}%{_sysconfdir}/freezer/freezer.conf.d/ -install -d -m 750 %{buildroot}%{_sysconfdir}/freezer/scheduler/ -install -d -m 750 %{buildroot}%{_sysconfdir}/freezer/scheduler/conf.d/ -install -p -D -m 640 etc/scheduler.conf.sample %{buildroot}%{_sysconfdir}/freezer/scheduler.conf -install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-freezer -install -p -D -m 755 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-scheduler.service -# install symlinks on SUSE -%if 0%{?suse_version} -mkdir -p %{buildroot}%{_sbindir} -ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-scheduler -%endif - -# remove duplicates -%fdupes %{buildroot}%{python3_sitelib} - -# remove Windows script -rm -fr %{buildroot}%{_prefix}/freezer/scripts/vss.ps1 - -%pre -%openstack_pre_user_group_create freezer freezer /sbin/nologin - -#POST actions -%post scheduler -%systemd_post %{name}-scheduler.service - -#PREUN actions -%preun scheduler -%systemd_preun %{name}-scheduler.service - -#POSTUN actions -%postun scheduler -%systemd_postun_with_restart %{name}-scheduler.service - -%check -export OS_TEST_PATH=./freezer/tests/unit -%{openstack_stestr_run} - -%files -%license LICENSE -%doc README.rst -%dir %attr(0750, root, freezer) %{_sysconfdir}/freezer/ -%dir %attr(0750, root, freezer) %{_sysconfdir}/freezer/freezer.conf.d/ -%dir %attr(0750, root, freezer) %{_sysconfdir}/freezer/scheduler/ -%dir %attr(0750, root, freezer) %{_sysconfdir}/freezer/scheduler/conf.d/ -%config(noreplace) %attr(0640, root, freezer) %{_sysconfdir}/freezer/scheduler.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-freezer -%dir %attr(0755, freezer, freezer) %{_localstatedir}/lib/freezer -%dir %attr(0750, freezer, freezer) %{_localstatedir}/log/freezer - -%files -n python3-{{ pypi_name }} -%doc README.rst -%license LICENSE -%{python3_sitelib}/freezer* -%{python3_sitelib}/freezer-*.egg-info - -%files agent -%license LICENSE -%{_bindir}/freezer-agent - -%files scheduler -%license LICENSE -%{_bindir}/freezer-scheduler -%{_unitdir}/%{name}-scheduler.service -%if 0%{?suse_version} -%{_sbindir}/rc%{name}-scheduler -%endif - -%files doc -%license LICENSE -%doc doc/build/html - -%changelog diff --git a/openstack/freezer/openstack-freezer-scheduler.service b/openstack/freezer/openstack-freezer-scheduler.service deleted file mode 100644 index e28e96f46..000000000 --- a/openstack/freezer/openstack-freezer-scheduler.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=OpenStack Freezer scheduler agent -After=syslog.target network.target -After=mariadb.service postgresql.service rabbitmq-server.service - -[Service] -Type=simple -User=root -Group=root -ExecStart=/usr/bin/freezer-scheduler start -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/openstack/freezer/openstack-freezer.logrotate b/openstack/freezer/openstack-freezer.logrotate deleted file mode 100644 index f3945a1c0..000000000 --- a/openstack/freezer/openstack-freezer.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/freezer/*.log { - weekly - dateext - rotate 10 - size 1M - missingok - compress - notifempty - su freezer freezer - minsize 100k -} diff --git a/openstack/monasca-agent/monasca-agent.spec.j2 b/openstack/monasca-agent/monasca-agent.spec.j2 deleted file mode 100644 index ca903d29f..000000000 --- a/openstack/monasca-agent/monasca-agent.spec.j2 +++ /dev/null @@ -1,217 +0,0 @@ -{% set pypi_name = 'monasca-agent' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/monasca-agent/monasca-agent-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -%define username monasca-agent -%define groupname monasca -%if 0%{?rhel} || 0%{?fedora} -%global rdo 1 -%endif -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: OpenStack Monasca metrics agent -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: {{ source|basename }} -Source1: %{name}.sudoers -Source2: %{name}.target -Source3: %{name}.tmpfiles -Source4: %{name}.polkit -Source5: %{name}-collector.service -Source6: %{name}-forwarder.service -Source7: %{name}-statsd.service -BuildRequires: fdupes -BuildRequires: openstack-macros -BuildRequires: {{ py3('PyYAML') }} -BuildRequires: {{ py3('eventlet') }} -BuildRequires: {{ py3('freezegun') }} -BuildRequires: {{ py3('httplib2') }} -BuildRequires: {{ py3('python-keystoneclient') }} -BuildRequires: {{ py3('monasca-common') }} -BuildRequires: {{ py3('python-monascaclient') }} -BuildRequires: {{ py3('netaddr') }} -BuildRequires: {{ py3('ntplib') }} -BuildRequires: {{ py3('oslo.concurrency') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.i18n') }} -BuildRequires: {{ py3('oslo.middleware') }} -BuildRequires: {{ py3('oslo.utils') }} -BuildRequires: {{ py3('oslo.vmware') }} -BuildRequires: {{ py3('oslotest') }} -BuildRequires: {{ py3('psutil') }} -BuildRequires: {{ py3('pymongo') }} -BuildRequires: {{ py3('python-memcached') }} -BuildRequires: {{ py3('redis') }} -BuildRequires: {{ py3('requests') }} -BuildRequires: {{ py3('stevedore') }} -BuildRequires: {{ py3('testrepository') }} -BuildRequires: {{ py3('tornado') }} -BuildRequires: sudo -Requires: python3-{{ pypi_name }} = %{version}-%{release} -BuildArch: noarch -%if 0%{?suse_version} -BuildRequires: systemd-rpm-macros -%{?systemd_requires} -%else -BuildRequires: systemd -Requires(post): systemd -Requires(postun): systemd -Requires(preun): systemd -%endif - -%description -The Monasca Agent is a modern Python monitoring agent for gathering metrics and -sending them to the Monasca API. - -%package -n python3-{{ pypi_name }} -Summary: Python module for monasca-agent -Group: Development/Languages/Python -Requires: {{ py3('PyYAML') }} -Requires: {{ py3('eventlet') }} -Requires: {{ py3('httplib2') }} -Requires: {{ py3('keystoneauth1') }} -Requires: {{ py3('python-keystoneclient') }} -Requires: {{ py3('monasca-common') }} -Requires: {{ py3('python-monascaclient') }} -Requires: {{ py3('netaddr') }} -Requires: {{ py3('python-neutronclient') }} -Requires: {{ py3('python-novaclient') }} -Requires: {{ py3('ntplib') }} -Requires: {{ py3('oslo.concurrency') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.i18n') }} -Requires: {{ py3('oslo.utils') }} -Requires: {{ py3('oslo.vmware') }} -Requires: {{ py3('psutil') }} -Requires: {{ py3('pymongo') }} -Requires: {{ py3('python-memcached') }} -Requires: {{ py3('redis') }} -Requires: {{ py3('requests') }} -Requires: {{ py3('six') }} -Requires: {{ py3('stevedore') }} -# FIXME(jpena): Remove this conditional once python-toml is available in RDO -%if 0%{?rdo} -Requires: {{ py3('tornado') }} -%else -Requires: {{ py3('toml') }} -Requires: {{ py3('tornado') }} -%endif - -%description -n python3-{{ pypi_name }} -The Monasca Agent is a modern Python monitoring agent for gathering metrics and -sending them to the Monasca API. - -This package contains monasca-agent Python module. - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }} -%py_req_cleanup -# contains various binary files etc that we don't need -rm -rf packaging/monasca-agent{,-deb} - -%build -%{py3_build} - -%install -%{py3_install} - -# /etc -install -d -m 755 %{buildroot}%{_sysconfdir}/monasca -install -d -m 750 %{buildroot}%{_sysconfdir}/monasca/agent/conf.d - -# /usr/lib -install -d -m 755 %{buildroot}%{_prefix}/lib/monasca/agent/custom_checks.d -install -d -m 755 %{buildroot}%{_prefix}/lib/monasca/agent/custom_detect.d - -# /var -install -d -m 750 %{buildroot}%{_localstatedir}/log/{{ pypi_name }} - -# sudoers configuration -install -D -m 440 %{SOURCE1} %{buildroot}%{_sysconfdir}/sudoers.d/%{name} - -# systemd unit file -install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.target -install -D -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-collector.service -install -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-forwarder.service -install -D -m 644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}-statsd.service -%if 0%{?suse_version} -mkdir -p %{buildroot}%{_sbindir} -ln -sr %{buildroot}%{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -%endif - -# systemd tmpfile -install -D -m 644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/openstack-monasca-agent.conf - -# polkit permissions -install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/polkit-1/rules.d/49-monasca-agent.rules - -%fdupes %{buildroot}%{python3_sitelib} - -%pre -# create user and groups -%openstack_pre_user_group_create %{username} %{groupname} - -%post -%tmpfiles_create %{_tmpfilesdir}/openstack-monasca-agent.conf -%systemd_post %{name}.target -%systemd_post %{name}-collector.service -%systemd_post %{name}-forwarder.service -%systemd_post %{name}-statsd.service - -%preun -%systemd_preun %{name}.target -%systemd_preun %{name}-collector.service -%systemd_preun %{name}-forwarder.service -%systemd_preun %{name}-statsd.service - -%postun -%systemd_postun %{name}.target -%systemd_postun %{name}-collector.service -%systemd_postun %{name}-forwarder.service -%systemd_postun %{name}-statsd.service - -%check -find . -type f -name *.pyc -delete -find . -type f -name '*test_service_plugin.py' -delete -%{openstack_stestr_run} - -%files -%dir %attr(-, root, monasca) %{_sysconfdir}/monasca -%dir %attr(0750, %{username}, %{groupname}) %{_sysconfdir}/monasca/agent -%dir %attr(0750, %{username}, %{groupname}) %{_sysconfdir}/monasca/agent/conf.d -%dir %attr(0755, root, root) %{_prefix}/lib/monasca/agent/custom_checks.d -%dir %attr(0755, root, root) %{_prefix}/lib/monasca/agent/custom_detect.d -%_tmpfilesdir/openstack-monasca-agent.conf -%config %{_sysconfdir}/monasca/agent -%config %{_sysconfdir}/sudoers.d/%{name} -%dir %{_prefix}/lib/monasca -%{_prefix}/lib/monasca/agent -%dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/log/{{ pypi_name }} -%{_unitdir}/%{name}.target -%{_unitdir}/%{name}-collector.service -%{_unitdir}/%{name}-forwarder.service -%{_unitdir}/%{name}-statsd.service -%if 0%{?suse_version} -%{_sbindir}/rc%{name} -%endif -%{_sysconfdir}/polkit-1/ -%{_sysconfdir}/polkit-1/rules.d/ -%{_sysconfdir}/polkit-1/rules.d/49-monasca-agent.rules - -%files -n python3-{{ pypi_name }} -%doc README.rst -%license LICENSE -%{_bindir}/monasca-collector -%{_bindir}/monasca-forwarder -%{_bindir}/monasca-setup -%{_bindir}/monasca-statsd -%{python3_sitelib}/monasca_agent -%{python3_sitelib}/monasca_agent-*.egg-info -%{python3_sitelib}/monasca_setup -%dir %{_datadir}/monasca -%{_datadir}/monasca/agent - -%changelog diff --git a/openstack/monasca-agent/openstack-monasca-agent-collector.service b/openstack/monasca-agent/openstack-monasca-agent-collector.service deleted file mode 100644 index ddd141bcf..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent-collector.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Monasca Agent - Collector -PartOf=openstack-monasca-agent.target -After=openstack-monasca-forwarder.service -Wants=openstack-monasca-forwarder.service - -[Service] -Type=simple -User=monasca-agent -Group=monasca -Restart=always -ExecStart=/usr/bin/monasca-collector foreground - -[Install] -WantedBy=multi-user.target diff --git a/openstack/monasca-agent/openstack-monasca-agent-forwarder.service b/openstack/monasca-agent/openstack-monasca-agent-forwarder.service deleted file mode 100644 index 9e6f87f34..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent-forwarder.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Monasca Agent - Forwarder -PartOf=openstack-monasca-agent.target -After=network-online.target -Wants=network-online.target - -[Service] -Type=simple -User=monasca-agent -Group=monasca -Restart=always -ExecStart=/usr/bin/monasca-forwarder - -[Install] -WantedBy=multi-user.target diff --git a/openstack/monasca-agent/openstack-monasca-agent-statsd.service b/openstack/monasca-agent/openstack-monasca-agent-statsd.service deleted file mode 100644 index 4d1859b17..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent-statsd.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Monasca Agent - Statsd -PartOf=openstack-monasca-agent.target -After=openstack-monasca-forwarder.service -Wants=openstack-monasca-forwarder.service - -[Service] -Type=simple -User=monasca-agent -Group=monasca -Restart=always -ExecStart=/usr/bin/monasca-statsd - -[Install] -WantedBy=multi-user.target diff --git a/openstack/monasca-agent/openstack-monasca-agent.polkit b/openstack/monasca-agent/openstack-monasca-agent.polkit deleted file mode 100644 index 6d0571c39..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent.polkit +++ /dev/null @@ -1,6 +0,0 @@ -/* This rule let's monasca-agent's libvirt check monitor libvirt */ -polkit.addRule(function(action, subject) { - if ((action.id == "org.libvirt.unix.monitor") && (subject.user == "monasca-agent")) { - return polkit.Result.YES; - } -}); diff --git a/openstack/monasca-agent/openstack-monasca-agent.sudoers b/openstack/monasca-agent/openstack-monasca-agent.sudoers deleted file mode 100644 index 643c59aee..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent.sudoers +++ /dev/null @@ -1,4 +0,0 @@ -# Needed for monasca_agent.collector.checks_d.swift_diags -monasca-agent ALL = (root) NOPASSWD:/usr/local/bin/diagnostics,/usr/local/bin/swift-checker,/bin/ip netns exec qrouter-[! ][! ][! ][! ][! ][! ][! ][! ]-[! ][! ][! ][! ]-[! ][! ][! ][! ]-[! ][! ][! ][! ]-[! ][! ][! ][! ][! ][! ][! ][! ][! ][! ][! ][! ] /bin/ping *,/usr/bin/ovs-vsctl -# Needed for monasca_agent.collector.checks_d.postfix -monasca-agent ALL = (root) NOPASSWD:NOEXEC:/usr/bin/find diff --git a/openstack/monasca-agent/openstack-monasca-agent.target b/openstack/monasca-agent/openstack-monasca-agent.target deleted file mode 100644 index 5a8bc2bfa..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent.target +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=Monasca Agent -Wants=openstack-monasca-agent-collector.service openstack-monasca-agent-forwarder.service openstack-monasca-agent-statsd.service - -[Install] -WantedBy=multi-user.target diff --git a/openstack/monasca-agent/openstack-monasca-agent.tmpfiles b/openstack/monasca-agent/openstack-monasca-agent.tmpfiles deleted file mode 100644 index 70acf39c8..000000000 --- a/openstack/monasca-agent/openstack-monasca-agent.tmpfiles +++ /dev/null @@ -1 +0,0 @@ -d /run/openstack-monasca-agent 0700 monasca-agent monasca - diff --git a/openstack/monasca-api/api-config.ini b/openstack/monasca-api/api-config.ini deleted file mode 100644 index a0fc2af05..000000000 --- a/openstack/monasca-api/api-config.ini +++ /dev/null @@ -1,21 +0,0 @@ -[DEFAULT] -name = monasca_api - -[pipeline:main] -pipeline = request_id auth api - -[app:api] -paste.app_factory = monasca_api.api.server:launch - -[filter:auth] -paste.filter_factory = keystonemiddleware.auth_token:filter_factory - -[filter:request_id] -paste.filter_factory = oslo_middleware.request_id:RequestId.factory - -[server:main] -use = egg:gunicorn#main -host = 127.0.0.1 -port = 8082 -workers = 1 -proc_name = monasca_api diff --git a/openstack/monasca-api/api-logging.conf b/openstack/monasca-api/api-logging.conf deleted file mode 100644 index b7f420f85..000000000 --- a/openstack/monasca-api/api-logging.conf +++ /dev/null @@ -1,33 +0,0 @@ -[loggers] -keys = root, sqlalchemy, kafka - -[handlers] -keys = console - -[formatters] -keys = context - -[logger_root] -level = INFO -handlers = console - -[logger_sqlalchemy] -qualname = sqlalchemy.engine -level = WARN -handlers = console -propagate=0 - -[logger_kafka] -qualname = kafka -level = WARN -handlers = console -propagate = 0 - -[handler_console] -class = logging.StreamHandler -args = (sys.stderr,) -level = WARN -formatter = context - -[formatter_context] -class = oslo_log.formatters.ContextFormatter diff --git a/openstack/monasca-api/api-wsgi.conf b/openstack/monasca-api/api-wsgi.conf deleted file mode 100644 index fa151041a..000000000 --- a/openstack/monasca-api/api-wsgi.conf +++ /dev/null @@ -1,22 +0,0 @@ -Listen 8070 - - - WSGIDaemonProcess monasca-api processes=2 threads=1 socket-timeout=120 user=monasca-api group=monasca display-name=%{GROUP} - WSGIProcessGroup monasca-api - WSGIApplicationGroup %{GLOBAL} - WSGIScriptAlias / /usr/bin/monasca-api-wsgi.py - - WSGIPassAuthorization On - - LogLevel info - ErrorLog /var/log/monasca-api/monasca-api.log - CustomLog /var/log/monasca-api/monasca-api_access.log combined - - SetEnv no-gzip 1 - AddDefaultCharset utf-8 - - - Require all granted - - - diff --git a/openstack/monasca-api/api-wsgi.py b/openstack/monasca-api/api-wsgi.py deleted file mode 100644 index 2fe95d060..000000000 --- a/openstack/monasca-api/api-wsgi.py +++ /dev/null @@ -1,3 +0,0 @@ -from monasca_api.api import server - -application = server.get_wsgi_app(config_base_path='/etc/monasca') diff --git a/openstack/monasca-api/monasca-api.spec.j2 b/openstack/monasca-api/monasca-api.spec.j2 deleted file mode 100644 index 5e3f39f26..000000000 --- a/openstack/monasca-api/monasca-api.spec.j2 +++ /dev/null @@ -1,180 +0,0 @@ -{% set pypi_name = 'monasca-api' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/monasca-api/monasca-api-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Monasca REST API -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: {{ source|basename }} -Source2: api-logging.conf -Source3: api-config.ini -Source4: api-wsgi.conf -Source5: api-wsgi.py -BuildRequires: fdupes -BuildRequires: openstack-macros -BuildRequires: {{ py3('PasteDeploy') }} -BuildRequires: {{ py3('SQLAlchemy') }} -BuildRequires: {{ py3('cassandra-driver') }} -BuildRequires: {{ py3('eventlet') }} -BuildRequires: {{ py3('falcon') }} -BuildRequires: {{ py3('fixtures') }} -BuildRequires: {{ py3('httplib2') }} -BuildRequires: {{ py3('influxdb') }} -BuildRequires: {{ py3('python-keystoneclient') }} -BuildRequires: {{ py3('keystonemiddleware') }} -BuildRequires: {{ py3('monasca-common') }} -BuildRequires: {{ py3('nose') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.context') }} -BuildRequires: {{ py3('oslo.db') }} -BuildRequires: {{ py3('oslo.log') }} -BuildRequires: {{ py3('oslo.middleware') }} -BuildRequires: {{ py3('oslo.serialization') }} -BuildRequires: {{ py3('oslo.upgradecheck') }} -BuildRequires: {{ py3('oslo.utils') }} -BuildRequires: {{ py3('oslotest') }} -BuildRequires: {{ py3('pbr') }} -BuildRequires: {{ py3('pyparsing') }} -BuildRequires: {{ py3('python-subunit') }} -BuildRequires: {{ py3('requests-mock') }} -BuildRequires: {{ py3('simplejson') }} -BuildRequires: {{ py3('six') }} -BuildRequires: {{ py3('stestr') }} -BuildRequires: {{ py3('testrepository') }} -BuildRequires: {{ py3('testscenarios') }} -BuildRequires: {{ py3('testtools') }} -BuildRequires: {{ py3('voluptuous') }} -Requires: python3-{{ pypi_name }} = %{version}-%{release} -BuildArch: noarch -%if 0%{?suse_version} -BuildRequires: apache2 -Requires: apache2-mod_wsgi-python3 -%else -BuildRequires: python3-mod_wsgi -Requires: python3-mod_wsgi -%endif - -%description -The Monasca API provides a RESTful JSON interface for interacting with -and managing monitoring related resources. - -%package -n python3-{{ pypi_name }} -Summary: Monasca REST API -Group: Development/Languages/Python -Requires: {{ py3('PasteDeploy') }} -Requires: {{ py3('SQLAlchemy') }} -Requires: {{ py3('eventlet') }} -Requires: {{ py3('falcon') }} -Requires: {{ py3('influxdb') }} -Requires: {{ py3('python-keystoneclient') }} -Requires: {{ py3('keystonemiddleware') }} -Requires: {{ py3('monasca-common') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.context') }} -Requires: {{ py3('oslo.db') }} -Requires: {{ py3('oslo.log') }} -Requires: {{ py3('oslo.middleware') }} -Requires: {{ py3('oslo.serialization') }} -Requires: {{ py3('oslo.upgradecheck') }} -Requires: {{ py3('oslo.utils') }} -Requires: {{ py3('pbr') }} -Requires: {{ py3('pyparsing') }} -Requires: {{ py3('simplejson') }} -Requires: {{ py3('six') }} -Requires: {{ py3('voluptuous') }} -BuildArch: noarch - -%description -n python3-{{ pypi_name }} -The Monasca API provides a RESTful JSON interface for interacting with -and managing monitoring related resources. - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }} -%py_req_cleanup - -%build -%py3_build -PYTHONPATH=. oslo-config-generator \ - --config-file config-generator/monasca-api.conf \ - --output-file etc/monasca-api.conf.sample - -%install -%py3_install - -# create all necessary directories -install -d -m 755 %{buildroot}%{_usr}/share/{{ pypi_name }}/vertica -install -d -m 755 %{buildroot}%{_usr}/share/{{ pypi_name }}/schema -install -d -m 755 %{buildroot}%{_sysconfdir}/monasca -install -d -m 755 %{buildroot}%{_var}/lib/{{ pypi_name }} -install -d -m 755 %{buildroot}%{_var}/log/{{ pypi_name }} -install -d -m 755 %{buildroot}%{apache_site_dir} - -# copy embedded configuration files - -## copy configs -install -D -m 644 etc/monasca-api.conf.sample %{buildroot}/%{_sysconfdir}/monasca/monasca-api.conf -install -D -m 640 %{SOURCE2} %{buildroot}%{_sysconfdir}/monasca/api-logging.conf -install -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/monasca/api-config.ini -# some files from the devstack dir needed to do basic deployment -install -D -m 640 devstack/files/cassandra/monasca_schema.cql %{buildroot}%{_usr}/share/{{ pypi_name }}/schema/ -install -D -m 640 devstack/files/vertica/mon_alarms.sql %{buildroot}%{_usr}/share/{{ pypi_name }}/vertica/ -install -D -m 640 devstack/files/vertica/mon_metrics.sql %{buildroot}%{_usr}/share/{{ pypi_name }}/vertica/ -install -D -m 640 devstack/files/vertica/users.sql %{buildroot}%{_usr}/share/{{ pypi_name }}/vertica/ -install -D -m 640 devstack/files/vertica/roles.sql %{buildroot}%{_usr}/share/{{ pypi_name }}/vertica/ - -## install apache configuration -install -p -D -m 640 %{SOURCE4} %{buildroot}%{apache_site_dir}/{{ pypi_name }}.conf.sample - -## install WSGIScriptAlias -install -D -m 755 %{SOURCE5} %{buildroot}%{_bindir}/monasca-api-wsgi.py - -# remove duplicates -%fdupes %{buildroot}%{python3_sitelib}/monasca_api - -%check -find . -type f -name *.pyc -delete -%{__python3} -m stestr.cli --test-path=./monasca_api/tests run - -%pre -%openstack_pre_user_group_create monasca-api monasca /sbin/nologin - -%postun -if [ $1 -eq 0 ] ; then - getent passwd monasca-api > /dev/null - if [ "$?" == "0" ] ; then - userdel monasca-api - fi -fi - -%files -%{_bindir}/monasca-api -%{_bindir}/monasca-api-wsgi -%{_bindir}/monasca-api-wsgi.py -%{_bindir}/monasca-status -%{_bindir}/monasca_db - -%dir %attr(-, root, monasca) %{_sysconfdir}/monasca -%dir %attr(0750, monasca-api, monasca) %{_var}/lib/{{ pypi_name }} -%dir %attr(0750, monasca-api, monasca) %{_var}/log/{{ pypi_name }} -%dir %attr(0755, monasca-api, monasca) %{_usr}/share/{{ pypi_name }} -%dir %attr(0755, monasca-api, monasca) %{_usr}/share/{{ pypi_name }}/schema -%dir %attr(0755, monasca-api, monasca) %{_usr}/share/{{ pypi_name }}/vertica -%{_usr}/share/{{ pypi_name }}/schema/* -%{_usr}/share/{{ pypi_name }}/vertica/* -%config(noreplace) %attr(0640, root, monasca) %{_sysconfdir}/monasca/monasca-api.conf -%config(noreplace) %attr(0640, root, monasca) %{_sysconfdir}/monasca/api-logging.conf -%config(noreplace) %attr(0640, root, monasca) %{_sysconfdir}/monasca/api-config.ini -%config(noreplace) %attr(0640, root, monasca) %{apache_site_dir}/{{ pypi_name }}.conf.sample - -%files -n python3-{{ pypi_name }} -%license LICENSE -%doc README.rst ChangeLog -%{python3_sitelib}/monasca_api -%{python3_sitelib}/*.egg-info - -%changelog diff --git a/openstack/monasca-common/monasca-common.spec.j2 b/openstack/monasca-common/monasca-common.spec.j2 deleted file mode 100644 index 2f2f4099c..000000000 --- a/openstack/monasca-common/monasca-common.spec.j2 +++ /dev/null @@ -1,76 +0,0 @@ -{% set pypi_name = 'monasca-common' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/monasca-common/monasca-common-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -%global sname {{ pypi_name }} -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Reusable code for building monitoring related services. -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: {{ source|basename }} -BuildRequires: openstack-macros -BuildRequires: {{ py3('PyMySQL') }} -BuildRequires: {{ py3('confluent-kafka') }} -BuildRequires: {{ py3('kazoo') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.context') }} -BuildRequires: {{ py3('oslo.policy') }} -BuildRequires: {{ py3('oslotest') }} -BuildRequires: {{ py3('pbr') }} -BuildRequires: {{ py3('pyparsing') }} -BuildRequires: {{ py3('requests-mock') }} -BuildRequires: {{ py3('simplejson') }} -BuildRequires: {{ py3('six') }} -BuildRequires: {{ py3('stestr') }} -BuildArch: noarch - -%description -Collection of sub-projects containing reusable application and -platform code for building monitoring related services. - -%package -n python3-monasca-common -Summary: Reusable code for building monitoring related services. -Requires: {{ py3('PyMySQL') }} -Requires: {{ py3('confluent-kafka') }} -Requires: {{ py3('kazoo') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.policy') }} -Requires: {{ py3('pyparsing') }} -Requires: {{ py3('simplejson') }} -Requires: {{ py3('six') }} - -%description -n python3-monasca-common -Collection of sub-projects containing reusable application and -platform code for building monitoring related services. - -This package contains the Python 3.x module. - -%prep -%autosetup -n %{sname}-{{ upstream_version }} -%py_req_cleanup - -%build -export LC_ALL=en_US.utf-8 -%{py3_build} - -%install -export LC_ALL=en_US.utf-8 -%{py3_install} - -#%if 0%{?suse_version} -%check -export LC_ALL=en_US.utf-8 -%{openstack_stestr_run} -#%endif - -%files -n python3-monasca-common -%license LICENSE -%doc README.rst ChangeLog -%{python3_sitelib}/monasca_common -%{python3_sitelib}/*.egg-info - -%changelog diff --git a/openstack/monasca-notification/monasca-notification.spec.j2 b/openstack/monasca-notification/monasca-notification.spec.j2 deleted file mode 100644 index 8cc00180b..000000000 --- a/openstack/monasca-notification/monasca-notification.spec.j2 +++ /dev/null @@ -1,170 +0,0 @@ -{% set pypi_name = 'monasca-notification' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/monasca-notification/monasca-notification-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -%global sname monasca-notification -%define username monasca-notification -%define groupname monasca -%define notification_conf_dir %{_sysconfdir}/monasca/ -%define notification_log_dir %{_localstatedir}/log/%{sname} -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Notification engine sends notifications based on alarm transitions -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: {{ source|basename }} -Source1: openstack-%{sname}.service -Source3: openstack-monasca-notification.logrotate -BuildRequires: fdupes -BuildRequires: openstack-macros -BuildRequires: {{ py3('Jinja2') }} -BuildRequires: {{ py3('SQLAlchemy') }} -BuildRequires: {{ py3('keystoneauth1') }} -BuildRequires: {{ py3('monasca-common') }} -BuildRequires: {{ py3('monasca-statsd') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.log') }} -BuildRequires: {{ py3('oslotest') }} -BuildRequires: {{ py3('pbr') }} -BuildRequires: {{ py3('requests') }} -BuildRequires: {{ py3('simplejson') }} -BuildRequires: {{ py3('six') }} -BuildRequires: {{ py3('stestr') }} -Requires: logrotate -Requires: python3-%{sname} = %{version}-%{release} -BuildArch: noarch -%if 0%{?suse_version} -BuildRequires: {{ py3('jira') }} -BuildRequires: systemd-rpm-macros -Requires(pre): pwdutils -%else -BuildRequires: systemd -Requires(post): systemd -Requires(postun): systemd -Requires(preun): systemd -%endif - -%description -This engine reads alarms from Kafka and then notifies the customer using -their configured notification method. -Multiple notification and retry engines can run in -parallel up to one per available Kafka partition. Zookeeper -is used to negotiate access to the Kafka partitions -whenever a new process joins or leaves the working set. - -%package -n python3-%{sname} -Summary: Python core module for monasca-notification -Group: Development/Languages/Python -Requires: {{ py3('Jinja2') }} -Requires: {{ py3('PyYAML') }} -Requires: {{ py3('SQLAlchemy') }} -Requires: {{ py3('debtcollector') }} -Requires: {{ py3('keystoneauth1') }} -Requires: {{ py3('monasca-common') }} -Requires: {{ py3('monasca-statsd') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.log') }} -Requires: {{ py3('requests') }} -Requires: {{ py3('simplejson') }} -Requires: {{ py3('six') }} - -%description -n python3-%{sname} -This engine reads alarms from Kafka and then notifies the customer using -their configured notification method. -Multiple notification and retry engines can run in -parallel up to one per available Kafka partition. Zookeeper -is used to negotiate access to the Kafka partitions -whenever a new process joins or leaves the working set. - -This package contains the core Python module of Monasca-notification - -%prep -%autosetup -p1 -n %{sname}-{{ upstream_version }} -%py_req_cleanup - -%build -%py3_build -# NOTE: RDO currenty does not have python-jira in the CI -%if 0%{?suse_version} -PYTHONPATH=. oslo-config-generator \ - --config-file config-generator/notification.conf \ - --output-file etc/monasca/notification.conf.sample -%endif - -%install -%py3_install - -## usr -install -d -m 755 %{buildroot}%{_sbindir} - -## log dir -install -d -m 750 %{buildroot}%{notification_log_dir} - -## logrotate -install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-monasca-notification.logrotate - -## etc -install -d -m 755 %{buildroot}%{notification_conf_dir} -%if 0%{?suse_version} -install -D -m 644 etc/monasca/notification.conf.sample %{buildroot}%{notification_conf_dir}/notification.conf -%endif - -## system stuff -install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service -%if 0%{?suse_version} -ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -%endif - -%fdupes %{buildroot}%{python3_sitelib} - -%check -# NOTE: RDO currenty does not have python-jira in the CI -# NOTE: SUSE fails on a weird mock issue -%if 0 -%{openstack_stestr_run} -%endif - -%pre -# create monasca group and monasca-notification user -%openstack_pre_user_group_create %{username} %{groupname} - -%post -%systemd_post %{name}.service - -%preun -%systemd_preun %{name}.service - -%postun -%systemd_postun %{name}.service - -if [ $1 -eq 0 ] ; then - getent passwd %{username} > /dev/null - if [ "$?" == "0" ] ; then - userdel %{username} - fi -fi - -%files -%license LICENSE -%doc README.rst -%{_bindir}/monasca-notification -%{_unitdir}/%{name}.service -%dir %attr(-, root, %{groupname}) %{notification_conf_dir} -%if 0%{?suse_version} -%config(noreplace) %attr(640, root, %{groupname}) %{notification_conf_dir}/notification.conf -%endif -%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-monasca-notification.logrotate -%dir %attr(750, %{username}, %{groupname}) %notification_log_dir -%if 0%{?suse_version} -%{_sbindir}/rc%{name} -%endif - -%files -n python3-monasca-notification -%license LICENSE -%{python3_sitelib}/monasca_notification -%{python3_sitelib}/*.egg-info - -%changelog diff --git a/openstack/monasca-notification/openstack-monasca-notification.logrotate b/openstack/monasca-notification/openstack-monasca-notification.logrotate deleted file mode 100644 index 5a860a753..000000000 --- a/openstack/monasca-notification/openstack-monasca-notification.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/monasca-notification/*.log { - weekly - dateext - rotate 10 - size 1M - missingok - compress - notifempty - su monasca-notification monasca - minsize 100k -} diff --git a/openstack/monasca-notification/openstack-monasca-notification.service b/openstack/monasca-notification/openstack-monasca-notification.service deleted file mode 100644 index 55c7439f2..000000000 --- a/openstack/monasca-notification/openstack-monasca-notification.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Monasca Notification -Requires=network.target -After=network.target -ConditionPathIsDirectory=/var/log/monasca-notification - -[Service] -Type=simple -User=monasca-notification -Group=monasca -ExecStart=/usr/bin/monasca-notification -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target diff --git a/openstack/monasca-persister/monasca-persister.spec.j2 b/openstack/monasca-persister/monasca-persister.spec.j2 deleted file mode 100644 index 316a92793..000000000 --- a/openstack/monasca-persister/monasca-persister.spec.j2 +++ /dev/null @@ -1,139 +0,0 @@ -{% set pypi_name = 'monasca-persister' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/monasca-persister/monasca-persister-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -%global sname {{ pypi_name }} -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Persists state transistions in database -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: {{ source|basename }} -Source1: openstack-monasca-persister.service -Source2: openstack-monasca-persister.logrotate -BuildRequires: openstack-macros -BuildRequires: {{ py3('cassandra-driver') }} -BuildRequires: {{ py3('elasticsearch') }} -BuildRequires: {{ py3('influxdb') }} -BuildRequires: {{ py3('monasca-common') }} -BuildRequires: {{ py3('oslo.config') }} -BuildRequires: {{ py3('oslo.log') }} -BuildRequires: {{ py3('oslotest') }} -BuildRequires: {{ py3('setuptools') }} -BuildRequires: {{ py3('simplejson') }} -BuildRequires: {{ py3('six') }} -BuildRequires: {{ py3('stestr') }} -Requires: logrotate -Requires: python3-{{ pypi_name }} = %{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(pre): shadow-utils -Requires(preun): systemd -%endif - -%description -Consumes metrics and alarm state transitions from message queue and stores them in database. -Data is read from Kafka queue and saved either in InfluxDB or Cassandra - -%package -n python3-{{ pypi_name }} -Summary: Persists state transistions in database -Group: Development/Languages/Python -Requires: {{ py3('cassandra-driver') }} -Requires: {{ py3('influxdb') }} -Requires: {{ py3('monasca-common') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.log') }} -Requires: {{ py3('simplejson') }} -Requires: {{ py3('six') }} - -%description -n python3-{{ pypi_name }} -Consumes metrics and alarm state transitions from message queue and stores them in database. -Data is read from Kafka queue and saved either in InfluxDB or Cassandra - -%prep -%autosetup -n %{sname}-{{ upstream_version }} -%py_req_cleanup - -%build -%{py3_build} -PYTHONPATH=. oslo-config-generator \ - --config-file config-generator/persister.conf \ - --output-file etc/monasca/persister.conf.sample - -%install -%{py3_install} - -# create all necessary directories -install -d -m 755 %{buildroot}%{_sysconfdir}/monasca -install -d -m 755 %{buildroot}%{_var}/lib/{{ pypi_name }} -install -d -m 755 %{buildroot}%{_var}/log/{{ pypi_name }} - -# install config -install -D -m 640 etc/monasca/persister-logging.conf %{buildroot}%{_sysconfdir}/monasca/persister-logging.conf -install -D -m 644 etc/monasca/persister.conf.sample %{buildroot}%{_sysconfdir}/monasca/persister.conf - -# install systemd service -install -p -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/openstack-monasca-persister.service - -# install symlinks on SUSE -%if 0%{?suse_version} -mkdir -p %{buildroot}%{_sbindir} -ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -%endif - -# Install logrotate -install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-monasca-persister.logrotate - -%check -%{openstack_stestr_run} - -%pre -%openstack_pre_user_group_create monasca-persister monasca /sbin/nologin - -%preun -%systemd_preun openstack-monasca-persister.service - -%post -%systemd_post openstack-monasca-persister.service - - -%postun -%systemd_postun_with_restart openstack-monasca-persister.service -if [ $1 -eq 0 ] ; then - getent passwd monasca-persister > /dev/null - if [ "$?" == "0" ] ; then - userdel monasca-persister - fi -fi - -%files -%license LICENSE -%doc README.rst ChangeLog -%dir %attr(-, root, monasca) %{_sysconfdir}/monasca -%dir %attr(0750, monasca-persister, monasca) %{_var}/lib/{{ pypi_name }} -%dir %attr(0750, monasca-persister, monasca) %{_var}/log/{{ pypi_name }} -%config(noreplace) %attr(0640, root, monasca) %{_sysconfdir}/monasca/persister.conf -%config(noreplace) %attr(0640, root, monasca) %{_sysconfdir}/monasca/persister-logging.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-monasca-persister.logrotate -%{_unitdir}/openstack-monasca-persister.service -%if 0%{?suse_version} -%{_sbindir}/rc%{name} -%endif -%{_bindir}/monasca-persister - -%files -n python3-{{ pypi_name }} -%license LICENSE -%{python3_sitelib}/monasca_persister -%{python3_sitelib}/monasca_persister-*.egg-info - -%changelog diff --git a/openstack/monasca-persister/openstack-monasca-persister.logrotate b/openstack/monasca-persister/openstack-monasca-persister.logrotate deleted file mode 100644 index f5a600a18..000000000 --- a/openstack/monasca-persister/openstack-monasca-persister.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/monasca-persister/*.log { - weekly - dateext - rotate 10 - size 1M - missingok - compress - notifempty - su monasca-persister monasca - minsize 100k -} diff --git a/openstack/monasca-persister/openstack-monasca-persister.service b/openstack/monasca-persister/openstack-monasca-persister.service deleted file mode 100644 index ac911a022..000000000 --- a/openstack/monasca-persister/openstack-monasca-persister.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Monasca Persister -After=syslog.target network.target - -[Service] -Type=simple -User=monasca-persister -Group=monasca -WorkingDirectory=/var/lib/monasca-persister -Restart=on-failure -ExecStart=/usr/bin/monasca-persister - -[Install] -WantedBy=multi-user.target diff --git a/openstack/monasca-statsd/monasca-statsd.spec.j2 b/openstack/monasca-statsd/monasca-statsd.spec.j2 deleted file mode 100644 index bcae10021..000000000 --- a/openstack/monasca-statsd/monasca-statsd.spec.j2 +++ /dev/null @@ -1,53 +0,0 @@ -{% set pypi_name = 'monasca-statsd' %} -{% set upstream_version = upstream_version('2.7.0') %} -{% set rpm_release = '1' %} - -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Python Statsd library for sending statsd messages via the Monasca Agent -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: https://files.pythonhosted.org/packages/source/m/{{ pypi_name }}/{{ pypi_name }}-%{version}.tar.gz -BuildRequires: openstack-macros -BuildRequires: {{ py3('pbr') }} -BuildRequires: {{ py3('six') }} -BuildRequires: {{ py3('stestr') }} -BuildArch: noarch - -%description -Python Statsd library for sending statsd messages via the Monasca Agent - -%package -n python3-monasca-statsd -Summary: Python Statsd library for sending statsd messages via the Monasca Agent -Requires: {{ py3('six') }} - -%description -n python3-monasca-statsd -Python Statsd library for sending statsd messages via the Monasca Agent - -This package contains the Python 3.x module. - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }} -%py_req_cleanup - -%build -export LC_ALL=en_US.utf-8 -%{py3_build} - -%install -export LC_ALL=en_US.utf-8 -%{py3_install} - -%check -export LC_ALL=en_US.utf-8 -%{openstack_stestr_run} - -%files -n python3-monasca-statsd -%license LICENSE -%doc README.rst ChangeLog -%{python3_sitelib}/monascastatsd -%{python3_sitelib}/*.egg-info - -%changelog diff --git a/openstack/monasca-tempest-plugin/monasca-tempest-plugin.spec.j2 b/openstack/monasca-tempest-plugin/monasca-tempest-plugin.spec.j2 deleted file mode 100644 index dd3cc69d7..000000000 --- a/openstack/monasca-tempest-plugin/monasca-tempest-plugin.spec.j2 +++ /dev/null @@ -1,47 +0,0 @@ -{% set pypi_name = 'monasca-tempest-plugin' %} -{% set source=fetch_source('https://tarballs.opendev.org/openstack/monasca-tempest-plugin/monasca-tempest-plugin-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -Name: {{ py2name(py_versions='py3') }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: Tempest plugin for the monasca project -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://docs.openstack.org/{{ pypi_name }} -Source0: {{ source|basename }} -BuildRequires: openstack-macros -BuildRequires: {{ py3('pbr') }} -Requires: {{ py2pkg('Tempest') }} -Requires: {{ py3('mock') }} -Requires: {{ py3('monasca-common') }} -Requires: {{ py3('oslo.config') }} -Requires: {{ py3('oslo.serialization') }} -Requires: {{ py3('oslo.utils') }} -Requires: {{ py3('oslotest') }} -Requires: {{ py3('pbr') }} -Requires: {{ py3('six') }} -BuildArch: noarch - -%description -This package contains Tempest tests to cover the monasca project. -Additionally it provides a plugin to automatically load these tests into Tempest. - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }} -%py_req_cleanup - -%build -%{py3_build} - -%install -%{py3_install} - -%files -%license LICENSE -%doc README.rst -%{python3_sitelib}/monasca_tempest_tests -%{python3_sitelib}/*.egg-info - -%changelog diff --git a/openstack/monasca-ui/monasca-ui.spec.j2 b/openstack/monasca-ui/monasca-ui.spec.j2 deleted file mode 100644 index 74eb00994..000000000 --- a/openstack/monasca-ui/monasca-ui.spec.j2 +++ /dev/null @@ -1,96 +0,0 @@ -{% set pypi_name = 'monasca-ui' %} -{% set source = fetch_source('https://tarballs.opendev.org/openstack/monasca-ui/monasca-ui-master.tar.gz') %} -{% set upstream_version = upstream_version() %} -{% set rpm_release = '1' %} - -%if 0%{?rhel} || 0%{?fedora} -%global rdo 1 -%global http_dashboard_dir %{_datarootdir}/openstack-dashboard -%else -%global http_dashboard_dir /srv/www/openstack-dashboard -%endif -Name: {{ py2name() }} -Version: {{ py2rpmversion() }} -Release: {{ py2rpmrelease() }} -Summary: OpenStack Monasca Horizon plugin -License: {{ license('Apache-2.0') }} -Group: Development/Languages/Python -URL: https://wiki.openstack.org/wiki/Monasca -Source0: {{ source|basename }} -BuildRequires: fdupes -BuildRequires: {{ py2pkg('horizon') }} -BuildRequires: openstack-macros -BuildRequires: {{ py3('python-monascaclient') }} -BuildRequires: {{ py3('pbr') }} -Requires: python3-{{ pypi_name }} = %{version}-%{release} -BuildArch: noarch - -%description -The Monasca UI Horizon plugin adds Monitoring panel to the OpenStack dashboard. - -%package -n python3-{{ pypi_name }} -Summary: Monasca Plugin for Horizon - Python module -Requires: {{ py3('Django') }} -Requires: {{ py3('python-monascaclient') }} -Requires: {{ py3('pbr') }} - -%description -n python3-{{ pypi_name }} -The Monasca UI Horizon plugin adds Monitoring panel to the OpenStack dashboard. - -%if 0%{?suse_version} -%package -n grafana-monasca-ui-drilldown -Summary: Scripted Grafana dashboard for alarm drilldown links -BuildRequires: grafana -Requires: grafana - -%description -n grafana-monasca-ui-drilldown -This adds a scripted dashboard to Grafana 2 and higher that the Monitoring -panel's Alarms tab links to when generating drilldown links for alarms. -%endif - -%prep -%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }} -%py_req_cleanup - -%build -%py3_build - -%install -%py3_install - -install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/ -install -m 0755 -d %{buildroot}%{http_dashboard_dir}/openstack_dashboard/conf/ -cp -a monitoring/enabled/_50_admin_add_monitoring_panel.py* %{buildroot}%{http_dashboard_dir}/openstack_dashboard/enabled/ -cp -a monitoring/conf/monitoring_policy.json %{buildroot}%{http_dashboard_dir}/openstack_dashboard/conf/ -%if 0%{?suse_version} -install -m 0755 -d %{buildroot}%{_datadir}/grafana/public/dashboards/ -install -m 644 grafana-dashboards/drilldown.js %{buildroot}%{_datadir}/grafana/public/dashboards/ -%endif -%fdupes %{buildroot}%{python3_sitelib} -%fdupes %{buildroot}%{http_dashboard_dir} - -%post -su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null" - -%postun -su %{apache_user} -s /bin/sh -c "python3 %{http_dashboard_dir}/manage.py collectstatic --noinput --clear > /dev/null" - -%files -%{http_dashboard_dir}/openstack_dashboard/enabled/_50_admin_add_monitoring_panel.py* -%{http_dashboard_dir}/openstack_dashboard/conf/monitoring_policy.json -%license LICENSE -%doc ChangeLog README.rst - -%if 0%{?suse_version} -%files -n grafana-monasca-ui-drilldown -%license LICENSE -%{_datadir}/grafana/public/dashboards/drilldown.js -%endif - -%files -n python3-{{ pypi_name }} -%license LICENSE -%doc README.rst -%{python3_sitelib}/monitoring -%{python3_sitelib}/monasca_ui-*.egg-info - -%changelog