-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtendrl-monitoring-integration.spec
211 lines (164 loc) · 8.96 KB
/
tendrl-monitoring-integration.spec
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
Name: tendrl-monitoring-integration
Version: 1.6.3
Release: 11%{?dist}
BuildArch: noarch
Summary: Module for Tendrl Monitoring Integration
Source0: %{name}-%{version}.tar.gz
Source1: vonage-status-panel.zip
License: LGPLv2+
URL: https://github.com/Tendrl/monitoring-integration
Requires: tendrl-commons
Requires: grafana < 5.0.0
Requires: graphite-web
Requires: python-carbon
Requires: python-whisper
Requires: python-requests
Requires: python-setuptools
Requires: python-urllib3
Requires: tendrl-grafana-plugins
Requires: python-werkzeug
Requires: python-flask
Requires: python-cherrypy
Requires: python-paste
BuildRequires: python-setuptools
BuildRequires: systemd
%description
Python module for Tendrl to create a new dashboard in Grafana
%package -n tendrl-grafana-plugins
Summary: Vonage plugin for tendrl-graphana
Requires: grafana
License: ASL 2.0
%description -n tendrl-grafana-plugins
The vonage status panel for grafana web server.
%prep
%setup
unzip %SOURCE1
mv -f Vonage* Vonage-Grafana_Status_panel
# Remove bundled egg-info
rm -rf %{name}.egg-info
%build
%{__python} setup.py build
# Support light mode better
sed -i -e 's/green/rgb(1,167,1)/g' Vonage-Grafana_Status_panel/dist/css/status_panel.css
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%{__python} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
install -m 0755 --directory $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration
install -m 0755 --directory $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/grafana
install -m 0755 --directory $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/grafana/dashboards
install -d %{buildroot}%{_localstatedir}/lib/grafana/plugins/
install -m 0755 --directory $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/carbon-cache.service.d
install -Dm 0644 firewalld/tendrl-monitoring-integration.xml $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/tendrl-monitoring-integration.xml
install -Dm 0640 etc/tendrl/monitoring-integration/monitoring-integration.conf.yaml.sample $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/monitoring-integration.conf.yaml
install -Dm 0640 etc/grafana/grafana.ini $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/grafana/grafana.ini
install -Dm 0644 tendrl-monitoring-integration.service $RPM_BUILD_ROOT%{_unitdir}/tendrl-monitoring-integration.service
install -Dm 0644 etc/tendrl/monitoring-integration/graphite/graphite-web.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/graphite-web.conf
install -Dm 0644 etc/tendrl/monitoring-integration/graphite/carbon.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/carbon.conf
install -Dm 0644 etc/tendrl/monitoring-integration/graphite/storage-schemas.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/storage-schemas.conf
install -Dm 644 etc/systemd/system/carbon-cache.service.d/serviceparam.conf $RPM_BUILD_ROOT/%{_sysconfdir}/systemd/system/carbon-cache.service.d/serviceparam.conf
cp -a etc/tendrl/monitoring-integration/grafana/dashboards/*.json $RPM_BUILD_ROOT%{_sysconfdir}/tendrl/monitoring-integration/grafana/dashboards/
cp -r Vonage-Grafana_Status_panel %{buildroot}%{_localstatedir}/lib/grafana/plugins/
%post
if [ $1 -eq 1 ] ; then
mv /etc/carbon/carbon.conf /etc/carbon/carbon.conf.%{name}
mv /etc/httpd/conf.d/graphite-web.conf /etc/httpd/conf.d/graphite-web.conf.%{name}
mv /etc/carbon/storage-schemas.conf /etc/carbon/storage-schemas.conf.%{name}
ln -s /etc/tendrl/monitoring-integration/carbon.conf /etc/carbon/carbon.conf
ln -s /etc/tendrl/monitoring-integration/storage-schemas.conf /etc/carbon/storage-schemas.conf
ln -s /etc/tendrl/monitoring-integration/graphite-web.conf /etc/httpd/conf.d/graphite-web.conf
chgrp grafana /etc/tendrl/monitoring-integration/grafana/grafana.ini
fi
systemctl enable tendrl-monitoring-integration >/dev/null 2>&1 || :
%systemd_post tendrl-monitoring-integration.service
%preun
if [ "$1" = 0 ] ; then
rm -fr etc/carbon/carbon.conf /etc/httpd/conf.d/graphite-web.conf /etc/carbon/storage-schemas.conf > /dev/null 2>&1
mv /etc/carbon/carbon.conf.%{name} /etc/carbon/carbon.conf
mv /etc/httpd/conf.d/graphite-web.conf.%{name} /etc/httpd/conf.d/graphite-web.conf
mv /etc/carbon/storage-schemas.conf.%{name} /etc/carbon/storage-schemas.conf
fi
%systemd_preun tendrl-monitoring-integration.service
%check
py.test -v tendrl/monitoring_integration/tests || :
%files -n tendrl-grafana-plugins
%{_localstatedir}/lib/grafana/plugins/Vonage-Grafana_Status_panel
%files -f INSTALLED_FILES
%dir %{_sysconfdir}/tendrl/monitoring-integration
%dir %{_sysconfdir}/systemd/system/carbon-cache.service.d
%doc README.rst
%license LICENSE
%config(noreplace) %{_prefix}/lib/firewalld/services/tendrl-monitoring-integration.xml
%config(noreplace) %{_sysconfdir}/tendrl/monitoring-integration/grafana/dashboards/*
%config(noreplace) %{_sysconfdir}/tendrl/monitoring-integration/monitoring-integration.conf.yaml
%config(noreplace) %{_sysconfdir}/tendrl/monitoring-integration/graphite-web.conf
%config(noreplace) %{_sysconfdir}/tendrl/monitoring-integration/carbon.conf
%config(noreplace) %{_sysconfdir}/tendrl/monitoring-integration/storage-schemas.conf
%config(noreplace) %{_sysconfdir}/tendrl/monitoring-integration/grafana/grafana.ini
%attr(-, root, grafana) %{_sysconfdir}/tendrl/monitoring-integration/grafana/grafana.ini
%{_unitdir}/tendrl-monitoring-integration.service
%config %{_sysconfdir}/systemd/system/carbon-cache.service.d/serviceparam.conf
%changelog
* Thu Aug 23 2018 Shubhendu Tripathi <shtripat@redhat.com> - 1.6.3-11
- https://github.com/Tendrl/monitoring-integration/milestone/11
* Tue Aug 14 2018 Shubhendu Tripathi <shtripat@redhat.com> - 1.6.3-10
- https://github.com/Tendrl/monitoring-integration/milestone/10
* Fri Jul 27 2018 Shubhendu Tripathi <shtripat@redhat.com> - 1.6.3-9
- https://github.com/Tendrl/monitoring-integration/milestone/9
* Sat Jul 14 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-8
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/9)
* Wed Jul 04 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-7
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/9)
* Mon Jun 18 2018 Shubhendu Tripathi <shtripat@redhat.com> - 1.6.3-6
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/8)
* Thu May 31 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-5
- Bugfixes (https://github.com/Tendrl/monitoring-integration/pull/475)
* Thu May 31 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-4
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/7)
* Wed May 16 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-3
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/6)
* Fri May 04 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-2
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/6)
* Wed Apr 18 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.3-1
- Bugfixes
- Support gluster nodes/bricks with fqdn, IP, short name
* Thu Mar 22 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.2-1
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/4)
* Wed Mar 07 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.1-1
- Bugfixes (https://github.com/Tendrl/monitoring-integration/milestone/3)
* Sat Feb 17 2018 Rohan Kanade <rkanade@redhat.com> - 1.6.0-1
- API to un-manage clusters managed by Tendrl
* Fri Feb 02 2018 Rohan Kanade <rkanade@redhat.com> - 1.5.5-1
- Fix conflicting gluster "cliutils" python module
* Sat Dec 09 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-11
- Bugfixes
* Thu Dec 07 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-10
- Bugfixes
* Tue Dec 05 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-9
- Bugfixes
* Thu Nov 30 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-8
- Bugfixes
* Mon Nov 27 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-7
- Bugfixes
* Fri Nov 24 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-6
- Fix for etcd raft errors
* Fri Nov 24 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-5
- Bugfixes
* Tue Nov 21 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-4
- Bugfixes-3 tendrl-monitoring-integration 1.5.4
* Sat Nov 18 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-3
- Bugfixes-2 tendrl-monitoring-integration 1.5.4
* Fri Nov 10 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-2
- Bugfixes tendrl-monitoring-integration 1.5.4
* Thu Nov 02 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.4-1
- Release tendrl-monitoring-integration 1.5.4
* Fri Oct 13 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.3-2
- BugFixes for tendrl-monitoring-integration 1.5.3
* Thu Oct 12 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.3-1
- Release tendrl-monitoring-integration 1.5.3
* Fri Sep 15 2017 Rohan Kanade <rkanade@redhat.com> - 1.5.2-1
- Release tendrl-monitoring-integration 1.5.2
* Fri Aug 25 2017 Timothy Asir Jeyasingh <tjeyasin@redhat.com> - 1.5.1-1
- Release tendrl-monitoring-integration 1.5.1
* Wed Aug 02 2017 Timothy Asir Jeyasingh <tjeyasin@redhat.com> - 0.0.1-1
- Initial build.