|
|
3351a6 |
%if 0%{?rhel}
|
|
|
3351a6 |
%global collection_namespace redhat
|
|
|
3351a6 |
%global collection_name rhel_metrics
|
|
|
3351a6 |
%bcond_with ansible
|
|
|
3351a6 |
%else
|
|
|
3351a6 |
%global collection_namespace performancecopilot
|
|
|
3351a6 |
%global collection_name metrics
|
|
|
3351a6 |
%bcond_without ansible
|
|
|
3351a6 |
%endif
|
|
|
3351a6 |
|
|
|
3351a6 |
Name: ansible-pcp
|
|
|
301350 |
Version: 2.2.1
|
|
|
4a933f |
Release: 1%{?dist}
|
|
|
3351a6 |
Summary: Ansible Metric collection for Performance Co-Pilot
|
|
|
3351a6 |
License: MIT
|
|
|
3351a6 |
URL: %{ansible_collection_url}
|
|
|
3351a6 |
Source: https://github.com/performancecopilot/ansible-pcp/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
3351a6 |
|
|
|
3351a6 |
%if %{with ansible}
|
|
|
3351a6 |
BuildRequires: ansible >= 2.9.10
|
|
|
3351a6 |
BuildRequires: python3-ansible-lint
|
|
|
3351a6 |
%endif
|
|
|
3351a6 |
BuildArch: noarch
|
|
|
3351a6 |
|
|
|
3351a6 |
%description
|
|
|
3351a6 |
A collection containing roles for Performance Co-Pilot (PCP) and related
|
|
|
3351a6 |
software such as Redis and Grafana. The collection is made up of several
|
|
|
3351a6 |
Ansible roles, including:
|
|
|
3351a6 |
|
|
|
3351a6 |
%{collection_namespace}.%{collection_name}.pcp
|
|
|
3351a6 |
A role for core PCP capabilities, configuring live performance analysis
|
|
|
3351a6 |
with a large base set of metrics from the kernel and system services, as
|
|
|
3351a6 |
well as data recording and rule inference.
|
|
|
3351a6 |
|
|
|
3351a6 |
%{collection_namespace}.%{collection_name}.redis
|
|
|
3351a6 |
A role for configuring a local Redis server, suitable for use with a
|
|
|
3351a6 |
Performance Co-Pilot archive repository (for single or many hosts) and
|
|
|
3351a6 |
fast, scalable querying of metrics.
|
|
|
3351a6 |
|
|
|
3351a6 |
%{collection_namespace}.%{collection_name}.grafana
|
|
|
3351a6 |
A role for configuring a local Grafana server, providing web frontend
|
|
|
3351a6 |
visuals for Performance Co-Pilot metrics, both live and historically.
|
|
|
3351a6 |
Data sources for Vector (live), Redis (historical) and interactive
|
|
|
3351a6 |
bpftrace (eBPF) scripts can be configured by this role. The PCP REST
|
|
|
3351a6 |
API service (from the core pcp role) should be configured in order to
|
|
|
3351a6 |
use this role.
|
|
|
3351a6 |
|
|
|
3351a6 |
%{collection_namespace}.%{collection_name}.bpftrace
|
|
|
3351a6 |
A role that extends the core PCP role, providing metrics from bpftrace
|
|
|
3351a6 |
scripts using Linux eBPF facilities. Configuring authentication of a
|
|
|
3351a6 |
local user capable of running bpftrace scripts via the PCP agent is a
|
|
|
3351a6 |
key task of this role.
|
|
|
3351a6 |
|
|
|
3351a6 |
%{collection_namespace}.%{collection_name}.elasticsearch
|
|
|
3351a6 |
A role that extends the core PCP role, providing metrics from a live
|
|
|
3351a6 |
ElasticSearch instance for PCP analysis or exporting of PCP metric
|
|
|
3351a6 |
values (and metadata) to ElasticSearch for the indexing and querying
|
|
|
3351a6 |
of performance data.
|
|
|
3351a6 |
|
|
|
3351a6 |
%prep
|
|
|
3351a6 |
%autosetup
|
|
|
3351a6 |
mv .yamllint.yml yamllint.yml
|
|
|
3351a6 |
mv .yamllint_defaults.yml yamllint_defaults.yml
|
|
|
3351a6 |
%if 0%{?rhel}
|
|
|
3351a6 |
rm -vr roles/repository tests/*repository* tests/*/*repository* docs/repository
|
|
|
3351a6 |
%endif
|
|
|
3351a6 |
rm -vr .github .gitignore .ansible-lint .*.yml
|
|
|
3351a6 |
sed -i \
|
|
|
3351a6 |
-e 's/^name: .*/name: %{collection_name}/g' \
|
|
|
3351a6 |
-e 's/^namespace: .*/namespace: %{collection_namespace}/g' \
|
|
|
3351a6 |
galaxy.yml
|
|
|
3351a6 |
find . -name \*.yml -o -name \*.md | while read file; do
|
|
|
3351a6 |
sed -i \
|
|
|
3351a6 |
-e 's/performancecopilot.metrics/%{collection_namespace}.%{collection_name}/g' \
|
|
|
3351a6 |
$file
|
|
|
3351a6 |
done
|
|
|
3351a6 |
|
|
|
3351a6 |
%if %{without ansible}
|
|
|
3351a6 |
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}
|
|
|
3351a6 |
# Empty command. We don't have ansible-galaxy.
|
|
|
3351a6 |
%define ansible_collection_build() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .
|
|
|
3351a6 |
# Simply copy everything instead of galaxy-installing the built artifact.
|
|
|
3351a6 |
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name}; (cd %{buildroot}%{ansible_collection_files}/%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
|
|
|
3351a6 |
%endif
|
|
|
3351a6 |
|
|
|
3351a6 |
%build
|
|
|
3351a6 |
%ansible_collection_build
|
|
|
3351a6 |
|
|
|
3351a6 |
%install
|
|
|
3351a6 |
%ansible_collection_install
|
|
|
3351a6 |
|
|
|
3351a6 |
%check
|
|
|
3351a6 |
mv yamllint.yml .yamllint.yml
|
|
|
3351a6 |
mv yamllint_defaults.yml .yamllint_defaults.yml
|
|
|
3351a6 |
%if %{with ansible}
|
|
|
3351a6 |
ansible-lint `find roles -name \*.yml`
|
|
|
3351a6 |
%endif
|
|
|
3351a6 |
|
|
|
3351a6 |
%files
|
|
|
3351a6 |
%doc README.md
|
|
|
3351a6 |
%license LICENSE
|
|
|
3351a6 |
%{ansible_collection_files}
|
|
|
3351a6 |
|
|
|
3351a6 |
%changelog
|
|
|
301350 |
* Thu Aug 26 2021 Nathan Scott <nathans@redhat.com> 2.2.1-1
|
|
|
301350 |
- Latest upstream release
|
|
|
301350 |
|
|
|
4a933f |
* Fri Jun 25 2021 Nathan Scott <nathans@redhat.com> 2.1.4-1
|
|
|
4a933f |
- Latest upstream release
|
|
|
4a933f |
|
|
|
3351a6 |
* Tue Jun 08 2021 Nathan Scott <nathans@redhat.com> 2.1.3-3
|
|
|
3351a6 |
- Rebuild for full pass through CI/gating processes
|
|
|
3351a6 |
|
|
|
3351a6 |
* Mon Jun 07 2021 Nathan Scott <nathans@redhat.com> 2.1.3-2
|
|
|
3351a6 |
- Drop unnecessary package dependency on Ansible
|
|
|
3351a6 |
|
|
|
3351a6 |
* Thu Jun 03 2021 Nathan Scott <nathans@redhat.com> 2.1.3-1
|
|
|
3351a6 |
- Initial version of RHEL package (BZ 1854055)
|
|
|
3351a6 |
- Latest upstream release
|
|
|
3351a6 |
|
|
|
3351a6 |
* Fri Feb 05 2021 Nathan Scott <nathans@redhat.com> 2.1.2-1
|
|
|
3351a6 |
- Add RHEL macros to the spec alongside Fedora
|
|
|
3351a6 |
- Latest upstream release
|
|
|
3351a6 |
|
|
|
3351a6 |
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
|
|
|
3351a6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
3351a6 |
|
|
|
3351a6 |
* Wed Nov 11 2020 Nathan Scott <nathans@redhat.com> 2.0.3-1
|
|
|
3351a6 |
- Updated for new version with changed namespace
|
|
|
3351a6 |
- Ansible collection macros now used in the spec
|
|
|
3351a6 |
- Added ansible-lint checking in %%check section
|
|
|
3351a6 |
|
|
|
3351a6 |
* Fri Oct 23 2020 Nathan Scott <nathans@redhat.com> 1.0.0-1
|
|
|
3351a6 |
- Initial RPM spec build
|