Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / cluster.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Andrew Miloradovsky <andrew@interpretmath.pw>
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)
25 #:use-module (guix git-download)
26 #:use-module (guix packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages gettext)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages sphinx)
32 #:use-module (gnu packages texinfo)
33 #:use-module (gnu packages tls))
34
35 (define-public keepalived
36 (package
37 (name "keepalived")
38 (version "2.0.18")
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
46 "1l2g0bzzbah9svfpwa0b9dgvwfv85r2y3qdr54822hg5p2qs48ql"))))
47 (build-system gnu-build-system)
48 (arguments
49 '(#:phases
50 (modify-phases %standard-phases
51 (add-after 'build 'build-info
52 (lambda _
53 (invoke "make" "-C" "doc" "texinfo")
54 ;; Put images in a subdirectory as recommended by 'texinfo'.
55 (install-file "doc/source/images/software_design.png"
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)
66 (install-file "doc/source/images/software_design.png"
67 (string-append infodir "/keepalived-figures"))
68 #t))))))
69 (native-inputs
70 `(("pkg-config" ,pkg-config)
71 ("python-sphinx" ,python-sphinx)
72 ("texinfo" ,texinfo)))
73 (inputs
74 `(("openssl" ,openssl)
75 ("libnfnetlink" ,libnfnetlink)
76 ("libnl" ,libnl)))
77 (home-page "https://www.keepalived.org/")
78 (synopsis "Load balancing and high-availability frameworks")
79 (description
80 "Keepalived provides frameworks for both load balancing and high
81 availability. The load balancing framework relies on the Linux Virtual
82 Server (@dfn{IPVS}) kernel module. High availability is achieved by the Virtual
83 Redundancy Routing Protocol (@dfn{VRRP}). Each Keepalived framework can be used
84 independently or together to provide resilient infrastructures.")
85 (license license:gpl2+)))
86
87 (define-public libraft
88 (package
89 (name "libraft")
90 (version "0.9.5")
91 (home-page "https://github.com/canonical/raft")
92 (source (origin
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))
97 (sha256
98 (base32
99 "1q49f5mmv6nr6dxhnp044xwc6jlczgh0nj0bl6718wiqh28411x0"))))
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)
110 (synopsis "C implementation of the Raft consensus protocol")
111 (description "The library has modular design: its core part implements only
112 the core Raft algorithm logic, in a fully platform independent way. On top of
113 that, a pluggable interface defines the I/O implementation for networking
114 (send/receive RPC messages) and disk persistence (store log entries and
115 snapshots).")
116 (license license:asl2.0)))