forked from ceph/cephmetrics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cephmetrics.spec.in
64 lines (49 loc) · 2.28 KB
/
cephmetrics.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%define debug_package %{nil}
%{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
Name: cephmetrics
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: Monitoring service for Ceph clusters
License: GPLv3
URL: https://github.com/ceph/cephmetrics
Source0: cephmetrics-@VERSION@.zip
%description
The monitoring service with web frontend for Ceph storage clusters providing several statistical data graphed by grafana.
%package ansible
Summary: Monitoring service for Ceph clusters deployment tool
Requires: ceph-ansible
Requires: PyYAML
Requires: python-requests
Requires: python-netaddr
Obsoletes: cephmetrics-grafana-plugins < %{version}-%{release}
Obsoletes: cephmetrics-collectors < %{version}-%{release}
Obsoletes: cephmetrics < %{version}-%{release}
%description ansible
The monitoring service with web frontend for Ceph storage clusters providing several statistical data graphed by grafana. This package contains a set of ansible playbooks to deploy a cephmetrics server.
%prep
%setup -q
# Disable devel_mode in the rpms
patch -p1 < patches/0001-ansible-Disable-devel_mode.patch
%build
# Change the devel_mode defaults
sed -i -e 's/devel_mode: true/devel_mode: false/' ansible/roles/*/defaults/main.yml
# Change the prometheus container location/version
sed -i -e 's|container_name: .*$|container_name: registry.access.redhat.com/openshift3/prometheus|' ansible/roles/ceph-prometheus/defaults/main.yml
sed -i -e 's|version: .*$|version: v3.9|' ansible/roles/ceph-prometheus/defaults/main.yml
# Change the grafana container location/version
sed -i -e 's|container_name: .*$|container_name: registry.access.redhat.com/rhceph/rhceph-3-dashboard-rhel7|' ansible/roles/ceph-grafana/defaults/main.yml
sed -i -e 's|version: .*$|version: 3|' ansible/roles/ceph-grafana/defaults/main.yml
# Change the service_name for node_exporter
sed -i -e 's|service_name: .*|service_name: prometheus-node-exporter|' ansible/roles/ceph-node-exporter/defaults/main.yml
%install
# Install ansible playbooks
install -d %{buildroot}%{_datadir}
cp -L -r ansible %{buildroot}%{_datadir}/cephmetrics-ansible
exit 0
%files ansible
%{_datadir}/cephmetrics-ansible
%doc dashboard.yml
%doc etc/grafana
%doc LICENSE
%doc README
%changelog