Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / cluster.scm
CommitLineData
af09dabf
SB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
36de28ff 3;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
45151bcb 4;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw>
af09dabf
SB
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages cluster)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix download)
befac358 25 #:use-module (guix git-download)
af09dabf 26 #:use-module (guix packages)
45151bcb
AM
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages gettext)
af09dabf
SB
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages pkg-config)
9d0c291e 31 #:use-module (gnu packages sphinx)
670a5e54 32 #:use-module (gnu packages texinfo)
af09dabf
SB
33 #:use-module (gnu packages tls))
34
35(define-public keepalived
36 (package
37 (name "keepalived")
ce6db0fa 38 (version "2.0.18")
af09dabf
SB
39 (source (origin
40 (method url-fetch)
41 (uri (string-append
42 "http://www.keepalived.org/software/keepalived-"
43 version ".tar.gz"))
44 (sha256
45 (base32
ce6db0fa 46 "1l2g0bzzbah9svfpwa0b9dgvwfv85r2y3qdr54822hg5p2qs48ql"))))
af09dabf
SB
47 (build-system gnu-build-system)
48 (arguments
49 '(#:phases
50 (modify-phases %standard-phases
670a5e54
SB
51 (add-after 'build 'build-info
52 (lambda _
53 (invoke "make" "-C" "doc" "texinfo")
54 ;; Put images in a subdirectory as recommended by 'texinfo'.
2ac02060 55 (install-file "doc/source/images/software_design.png"
670a5e54
SB
56 "doc/build/texinfo/keepalived-figures")
57 (substitute* "doc/build/texinfo/keepalived.texi"
58 (("@image\\{software_design,")
59 "@image{keepalived-figures/software_design,"))
60 (invoke "make" "-C" "doc/build/texinfo")))
61 (add-after 'install 'install-info
62 (lambda* (#:key outputs #:allow-other-keys)
63 (let* ((out (assoc-ref outputs "out"))
64 (infodir (string-append out "/share/info")))
65 (install-file "doc/build/texinfo/keepalived.info" infodir)
2ac02060 66 (install-file "doc/source/images/software_design.png"
670a5e54
SB
67 (string-append infodir "/keepalived-figures"))
68 #t))))))
af09dabf
SB
69 (native-inputs
70 `(("pkg-config" ,pkg-config)
670a5e54
SB
71 ("python-sphinx" ,python-sphinx)
72 ("texinfo" ,texinfo)))
af09dabf
SB
73 (inputs
74 `(("openssl" ,openssl)
75 ("libnfnetlink" ,libnfnetlink)
76 ("libnl" ,libnl)))
d1bfad2f 77 (home-page "https://www.keepalived.org/")
34a05e8f 78 (synopsis "Load balancing and high-availability frameworks")
af09dabf
SB
79 (description
80 "Keepalived provides frameworks for both load balancing and high
81availability. The load balancing framework relies on the Linux Virtual
34a05e8f
TGR
82Server (@dfn{IPVS}) kernel module. High availability is achieved by the Virtual
83Redundancy Routing Protocol (@dfn{VRRP}). Each Keepalived framework can be used
af09dabf
SB
84independently or together to provide resilient infrastructures.")
85 (license license:gpl2+)))
45151bcb
AM
86
87(define-public libraft
88 (package
89 (name "libraft")
90 (version "0.9.5")
befac358 91 (home-page "https://github.com/canonical/raft")
45151bcb 92 (source (origin
befac358
LC
93 (method git-fetch)
94 (uri (git-reference (url home-page)
95 (commit (string-append "v" version))))
96 (file-name (git-file-name name version))
45151bcb
AM
97 (sha256
98 (base32
befac358 99 "1q49f5mmv6nr6dxhnp044xwc6jlczgh0nj0bl6718wiqh28411x0"))))
45151bcb
AM
100 (arguments '(#:configure-flags '("--disable-uv")))
101 ;; The uv plugin tests fail, if libuv (or the example) is enabled,
102 ;; because setting up the environment requires too much privileges.
103 (native-inputs
104 `(("autoconf" ,autoconf)
105 ("automake" ,automake)
106 ("gettext" ,gettext-minimal)
107 ("libtool" ,libtool)
108 ("pkg-config" ,pkg-config)))
109 (build-system gnu-build-system)
45151bcb
AM
110 (synopsis "C implementation of the Raft consensus protocol")
111 (description "The library has modular design: its core part implements only
112the core Raft algorithm logic, in a fully platform independent way. On top of
113that, a pluggable interface defines the I/O implementation for networking
114(send/receive RPC messages) and disk persistence (store log entries and
115snapshots).")
116 (license license:asl2.0)))