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