diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-07-09 10:47:02 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-09 11:59:27 +0200 |
| commit | c4fdfd6f9010dcd68961533e722fa084dc25e632 (patch) | |
| tree | ee624aee9bd1bd3bcd69427d20417753d797b3e9 /doc | |
| parent | b19649a132e83d0b8a29a685e9b8c1b061ef0dfa (diff) | |
doc: Augment offloading documentation.
* doc/guix.texi (Daemon Offload Setup): Mention that we're using lsh. Mention
GUILE_LOAD_PATH settings on the target machine. Explain that machines must
authorize each other.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index e59353b7c5c..454dde68ff5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -589,7 +589,7 @@ The @file{/etc/guix/machines.scm} file typically looks like this: | |||
| 589 | (user "alice") | 589 | (user "alice") |
| 590 | (private-key | 590 | (private-key |
| 591 | (string-append (getenv "HOME") | 591 | (string-append (getenv "HOME") |
| 592 | "/.ssh/id-rsa-for-guix")))) | 592 | "/.lsh/identity-for-guix")))) |
| 593 | @end example | 593 | @end example |
| 594 | 594 | ||
| 595 | @noindent | 595 | @noindent |
| @@ -635,6 +635,10 @@ Port number of the machine's SSH server (default: 22). | |||
| 635 | @item private-key | 635 | @item private-key |
| 636 | The SSH private key file to use when connecting to the machine. | 636 | The SSH private key file to use when connecting to the machine. |
| 637 | 637 | ||
| 638 | Currently offloading uses GNU@tie{}lsh as its SSH client | ||
| 639 | (@pxref{Invoking lsh,,, GNU lsh Manual}). Thus, the key file here must | ||
| 640 | be an lsh key file. This may change in the future, though. | ||
| 641 | |||
| 638 | @item parallel-builds | 642 | @item parallel-builds |
| 639 | The number of builds that may run in parallel on the machine (1 by | 643 | The number of builds that may run in parallel on the machine (1 by |
| 640 | default.) | 644 | default.) |
| @@ -654,22 +658,40 @@ name, and they will be scheduled on matching build machines. | |||
| 654 | 658 | ||
| 655 | The @code{guix} command must be in the search path on the build | 659 | The @code{guix} command must be in the search path on the build |
| 656 | machines, since offloading works by invoking the @code{guix archive} and | 660 | machines, since offloading works by invoking the @code{guix archive} and |
| 657 | @code{guix build} commands. | 661 | @code{guix build} commands. In addition, the Guix modules must be in |
| 662 | @code{$GUILE_LOAD_PATH} on the build machine---you can check whether | ||
| 663 | this is the case by running: | ||
| 664 | |||
| 665 | @example | ||
| 666 | lsh build-machine guile -c '(use-modules (guix config))' | ||
| 667 | @end example | ||
| 658 | 668 | ||
| 659 | There's one last thing to do once @file{machines.scm} is in place. As | 669 | There's one last thing to do once @file{machines.scm} is in place. As |
| 660 | explained above, when offloading, files are transferred back and forth | 670 | explained above, when offloading, files are transferred back and forth |
| 661 | between the machine stores. For this to work, you need to generate a | 671 | between the machine stores. For this to work, you first need to |
| 662 | key pair to allow the daemon to export signed archives of files from the | 672 | generate a key pair on each machine to allow the daemon to export signed |
| 663 | store (@pxref{Invoking guix archive}): | 673 | archives of files from the store (@pxref{Invoking guix archive}): |
| 664 | 674 | ||
| 665 | @example | 675 | @example |
| 666 | # guix archive --generate-key | 676 | # guix archive --generate-key |
| 667 | @end example | 677 | @end example |
| 668 | 678 | ||
| 669 | @noindent | 679 | @noindent |
| 670 | Thus, when receiving files, a machine's build daemon can make sure they | 680 | Each build machine must authorize the key of the master machine so that |
| 671 | are genuine, have not been tampered with, and that they are signed by an | 681 | it accepts store items it receives from the master: |
| 672 | authorized key. | 682 | |
| 683 | @example | ||
| 684 | # guix archive --authorize < master-public-key.txt | ||
| 685 | @end example | ||
| 686 | |||
| 687 | @noindent | ||
| 688 | Likewise, the master machine must authorize the key of each build machine. | ||
| 689 | |||
| 690 | All the fuss with keys is here to express pairwise mutual trust | ||
| 691 | relations between the master and the build machines. Concretely, when | ||
| 692 | the master receives files from a build machine (and @i{vice versa}), its | ||
| 693 | build daemon can make sure they are genuine, have not been tampered | ||
| 694 | with, and that they are signed by an authorized key. | ||
| 673 | 695 | ||
| 674 | 696 | ||
| 675 | @node Invoking guix-daemon | 697 | @node Invoking guix-daemon |
