aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-08-24 16:26:14 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-08-25 13:45:27 -0400
commit4b5a6fbc9b754c0ca70d033dd99f17c4f028733a (patch)
tree7e1267a5ab1edc10d1b4dd71e51a80f17c8fba36 /doc/guix.texi
parenta5ccf1b522b443fa2aab79a4833810bdede4a9ff (diff)
downloadguix-4b5a6fbc9b754c0ca70d033dd99f17c4f028733a.tar
guix-4b5a6fbc9b754c0ca70d033dd99f17c4f028733a.tar.gz
offload: Modify the build-machine record to accept multiple systems.
* guix/scripts/offload.scm (<build-machine>)[systems]: New field. [system]: Accessor changed to %build-machine-system. Default to #f. * guix/scripts/offload.scm (build-machine-system): Wrap %build-machine-system with a deprecation warning. (build-machine-systems): Access the new systems field or fallback to use build-machine-system, for backward compatibility. (machine-matches?): Adjust. * tests/offload.scm: Add tests... * Makefile.am (SCM_TESTS): ...and register them. * doc/guix.texi (Daemon Offload Setup): Update doc.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi35
1 files changed, 19 insertions, 16 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 91d3860978..0b79a49814 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1043,29 +1043,31 @@ When desired, the build daemon can @dfn{offload} derivation builds to
other machines running Guix, using the @code{offload} @dfn{build
hook}@footnote{This feature is available only when
@uref{https://github.com/artyom-poptsov/guile-ssh, Guile-SSH} is
-present.}. When that
-feature is enabled, a list of user-specified build machines is read from
-@file{/etc/guix/machines.scm}; every time a build is requested, for
-instance via @code{guix build}, the daemon attempts to offload it to one
-of the machines that satisfy the constraints of the derivation, in
-particular its system type---e.g., @file{x86_64-linux}. Missing
-prerequisites for the build are copied over SSH to the target machine,
-which then proceeds with the build; upon success the output(s) of the
-build are copied back to the initial machine.
+present.}. When that feature is enabled, a list of user-specified build
+machines is read from @file{/etc/guix/machines.scm}; every time a build
+is requested, for instance via @code{guix build}, the daemon attempts to
+offload it to one of the machines that satisfy the constraints of the
+derivation, in particular its system types---e.g., @code{x86_64-linux}.
+A single machine can have multiple system types, either because its
+architecture natively supports it, via emulation (@pxref{Transparent
+Emulation with QEMU}), or both. Missing prerequisites for the build are
+copied over SSH to the target machine, which then proceeds with the
+build; upon success the output(s) of the build are copied back to the
+initial machine.
The @file{/etc/guix/machines.scm} file typically looks like this:
@lisp
(list (build-machine
(name "eightysix.example.org")
- (system "x86_64-linux")
+ (systems (list "x86_64-linux" "i686-linux"))
(host-key "ssh-ed25519 AAAAC3Nza@dots{}")
(user "bob")
(speed 2.)) ;incredibly fast!
(build-machine
(name "armeight.example.org")
- (system "aarch64-linux")
+ (systems (list "aarch64-linux"))
(host-key "ssh-rsa AAAAB3Nza@dots{}")
(user "alice")
(private-key
@@ -1075,8 +1077,8 @@ The @file{/etc/guix/machines.scm} file typically looks like this:
@noindent
In the example above we specify a list of two build machines, one for
-the @code{x86_64} architecture and one for the @code{aarch64}
-architecture.
+the @code{x86_64} and @code{i686} architectures and one for the
+@code{aarch64} architecture.
In fact, this file is---not surprisingly!---a Scheme file that is
evaluated when the @code{offload} hook is started. Its return value
@@ -1096,8 +1098,9 @@ builds. The important fields are:
@item name
The host name of the remote machine.
-@item system
-The system type of the remote machine---e.g., @code{"x86_64-linux"}.
+@item systems
+The system types the remote machine supports---e.g., @code{(list
+"x86_64-linux" "i686-linux")}.
@item user
The user account to use when connecting to the remote machine over SSH.
@@ -25025,7 +25028,7 @@ Maximum number of backup files to keep.
Defaults to @samp{3}
@end deftypevr
-
+@node Transparent Emulation with QEMU
@subsubheading Transparent Emulation with QEMU
@cindex emulation