forked from acudovs/powergslb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
powergslb.spec
127 lines (88 loc) · 3.12 KB
/
powergslb.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
Name: powergslb
Version: %{version}
Release: 1%{?dist}
Summary: PowerDNS Remote GSLB Backend
Group: System Environment/Daemons
License: MIT
URL: https://github.com/AlekseyChudov/powergslb
Source0: powergslb-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python
Requires: mysql-connector-python
Requires: openssl
Requires: python
Requires: python-netaddr
Requires: python2-subprocess32
Requires: systemd-python
%systemd_requires
%description
PowerGSLB is a simple DNS Global Server Load Balancing (GSLB) solution.
Main features:
* Quick installation and setup
* Written in Python 2.7
* Built as PowerDNS Authoritative Server Remote Backend
* Web based administration interface using w2ui
* HTTPS support for the web server
* DNS GSLB configuration stored in a MySQL / MariaDB database
* Master-Slave DNS GSLB using native MySQL / MariaDB replication
* Multi-Master DNS GSLB using native MySQL / MariaDB Galera Cluster
* Modular architecture
* Multithreaded architecture
* Systemd status and watchdog support
* Extendable health checks:
* ICMP ping
* TCP connect
* HTTP request
* Arbitrary command execution
* Fallback if all the checks failed
* Weighted (priority) records
* Per record client IP / subnet persistence
* DNS GSLB views support
%package admin
Summary: PowerGSLB web based administration interface
%package pdns
Summary: PowerGSLB PowerDNS configuration
Requires: pdns
Requires: pdns-backend-remote
%description admin
PowerGSLB is a simple DNS Global Server Load Balancing (GSLB) solution.
This package contains the PowerGSLB web based administration interface.
%description pdns
PowerGSLB is a simple DNS Global Server Load Balancing (GSLB) solution.
This package contains the PowerGSLB PowerDNS configuration and dependencies.
%prep
%setup -q
%install
python setup.py install -O1 --root=%{buildroot} --record=INSTALLED_FILES
install -D powergslb/powergslb %{buildroot}%{_sbindir}/powergslb
install -D powergslb/powergslb.conf %{buildroot}%{_sysconfdir}/powergslb/powergslb.conf
install -D powergslb/powergslb.service %{buildroot}%{_unitdir}/powergslb.service
install -d %{buildroot}%{_datarootdir}/powergslb
cp -rv admin %{buildroot}%{_datarootdir}/powergslb
%post
test -e %{_sysconfdir}/powergslb/powergslb.pem || \
%{_sysconfdir}/pki/tls/certs/make-dummy-cert %{_sysconfdir}/powergslb/powergslb.pem && \
chown root:root %{_sysconfdir}/powergslb/powergslb.pem && \
chmod 0640 %{_sysconfdir}/powergslb/powergslb.pem
%systemd_post powergslb.service
%preun
%systemd_preun powergslb.service
%postun
%systemd_postun_with_restart powergslb.service
%files -f INSTALLED_FILES
%defattr(0644,root,root,0755)
%doc LICENSE README.md database images
%attr(0755,root,root) %{_sbindir}/powergslb
%attr(0750,root,root) %dir %{_sysconfdir}/powergslb
%attr(0640,root,root) %config(noreplace) %{_sysconfdir}/powergslb/powergslb.conf
%{_unitdir}/powergslb.service
%files admin
%defattr(0644,root,root,0755)
%doc LICENSE README.md
%{_datarootdir}/powergslb
%files pdns
%defattr(0644,root,root,0755)
%doc LICENSE README.md pdns
%changelog
* Thu Feb 25 2016 Aleksey Chudov <[email protected]>
- Initial spec file for CentOS 7