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