summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-01-23 22:15:16 +0100
committerLudovic Courtès <ludo@gnu.org>2022-02-02 18:35:00 +0100
commit5c13484646069064c834bbd3cd02c3bc80d94cb6 (patch)
tree56e7cdd7b4ccd857ce34e58fe218fd010d5c86e8 /doc/guix.texi
parentf553de6e0e476f12f7aa0b5e1d3849c71aa93fc6 (diff)
downloadguix-5c13484646069064c834bbd3cd02c3bc80d94cb6.tar.gz
deploy: Add '--execute'.
* guix/scripts/deploy.scm (show-help, %options): Add '--execute'.
(invoke-command): New procedure.
(guix-deploy): Break arguments at "--" and handle '-x' and associated
command.
* doc/guix.texi (Invoking guix deploy): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ceec0d0cf5..aaa7cbb66f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36001,6 +36001,30 @@ be accomplished with the following operating system configuration snippet:
 For more information regarding the format of the @file{sudoers} file,
 consult @command{man sudoers}.
 
+Once you've deployed a system on a set of machines, you may find it
+useful to run a command on all of them.  The @option{--execute} or
+@option{-x} option lets you do that; the example below runs
+@command{uname -a} on all the machines listed in the deployment file:
+
+@example
+guix deploy @var{file} -x -- uname -a
+@end example
+
+One thing you may often need to do after deployment is restart specific
+services on all the machines, which you can do like so:
+
+@example
+guix deploy @var{file} -x -- herd restart @var{service}
+@end example
+
+The @command{guix deploy -x} command returns zero if and only if the
+command succeeded on all the machines.
+
+@c FIXME/TODO: Separate the API doc from the CLI doc.
+
+Below are the data types you need to know about when writing a
+deployment file.
+
 @deftp {Data Type} machine
 This is the data type representing a single machine in a heterogeneous Guix
 deployment.