Commit graph

20 commits

Author SHA1 Message Date
Ludovic Courtès
8bc745052e
machine: ssh: Better report missing initrd modules.
* gnu/machine/ssh.scm (machine-check-initrd-modules): Improve message
upon module mismatch.
2020-03-23 10:48:17 +01:00
Ludovic Courtès
ea6e2299b4
machine: ssh: Make sanity checks in a single round trip.
* gnu/machine/ssh.scm (<remote-assertion>): New record type.
(remote-let): New macro.
(machine-check-file-system-availability): Rewrite to use 'remote-let'
instead of 'mlet' and 'machine-remote-eval'.
(machine-check-initrd-modules): Likewise.
(machine-check-building-for-appropriate-system): Make non-monadic.
(check-deployment-sanity): Rewrite to gather all the assertions as a
single gexp and pass it to 'machine-remote-eval'.
2020-03-23 10:48:17 +01:00
Tobias Geerinckx-Rice
e813444287
Update e-mail address for Jakob L. Kreuze.
As requested here:
<https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>.

* .mailmap: Add an entry for Jakob.
* gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm,
gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm,
gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm,
guix/scripts/system/reconfigure.scm: Update their e-mail address.
2020-02-09 23:16:45 +01:00
Ludovic Courtès
a1d7920861
machine: Remove unnecessary record self-referencing bindings.
'this-machine' and 'this-machine-ssh-configuration' were useless given
that there are no thunked fields.

* gnu/machine.scm (<machine>)[this-machine]: Remove.
* gnu/machine/ssh.scm (<machine-ssh-configuration>)
[this-machine-ssh-configuration]: Remove.
2019-12-08 00:47:26 +01:00
Ludovic Courtès
2617d956d8
machine: ssh: Deprecate missing 'host-key' field.
* gnu/machine/ssh.scm (machine-ssh-session): Warn about missing host key.
2019-12-07 00:29:10 +01:00
Ludovic Courtès
ed15dfcf31
machine: ssh: <machine-ssh-configuration> can include the host key.
* gnu/machine/ssh.scm (<machine-ssh-configuration>)[host-key]: New field.
(machine-ssh-session): Pass #:host-key to 'open-ssh-session'.
* doc/guix.texi (Invoking guix deploy): Document it.
2019-12-04 18:16:08 +01:00
Ludovic Courtès
c93994b5e4
machine: digital-ocean: Rename 'enable-ipv6' to 'enable-ipv6?'.
* gnu/machine/digital-ocean.scm (<digital-ocean-configuration>)[enable-ipv6]:
Rename to...
[enable-ipv6?]: ... this.
(deploy-digital-ocean): Adjust accordingly.
* doc/guix.texi (Invoking guix deploy): Adjust accordingly.
2019-10-22 18:32:52 +02:00
Jakob L. Kreuze
12712817ae
machine: Implement 'digital-ocean-environment-type'.
* gnu/machine/digital-ocean.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Invoking guix deploy): Add documentation for
'digital-ocean-configuration'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-10-22 18:32:52 +02:00
宋文武
02460db047
machine: ssh: Fix sanity checks.
* gnu/machine/ssh.scm
(machine-check-file-system-availability)[check-labeled-file-system]: Use
'source-module-closure' for '(gnu build file-systems)'.
(machine-check-initrd-modules): Unquote 'file-system-label->string' instead of
'device'.
2019-08-17 20:45:13 +08:00
Jakob L. Kreuze
4cc5e5204b
machine: Use 'become-command'.
* gnu/machine/ssh.scm (managed-host-remote-eval): Pass an appropriate
'become-command' to 'remote-eval'.
* guix/ssh.scm (remote-authorize-signing-key): Add optional
'become-command' argument.
All callers changed.
2019-08-16 08:47:28 -04:00
Jakob L. Kreuze
3033d59ac9
machine: Automatically authorize the coordinator's signing key.
* guix/ssh.scm (remote-authorize-signing-key): New variable.
* gnu/machine/ssh.scm (deploy-managed-host): Authorize coordinator's
signing key before any invocations of 'remote-eval'.
(deploy-managed-host): Display an error if a signing key does not exist.
* doc/guix.texi (Invoking guix deploy): Remove section describing manual
signing key authorization.
(Invoking guix deploy): Add section describing the 'authorize?' field.
2019-08-15 07:43:13 -04:00
Jakob L. Kreuze
9c70c460a0
machine: Implement 'roll-back-machine'.
* gnu/machine.scm (roll-back-machine, &deploy-error, deploy-error?)
(deploy-error-should-roll-back)
(deploy-error-captured-args): New variable.
* gnu/machine/ssh.scm (roll-back-managed-host): New variable.
* guix/scripts/deploy.scm (guix-deploy): Roll-back systems when a
deployment fails.
2019-08-15 07:43:09 -04:00
Jakob L. Kreuze
5ea7537b9a
machine: Allow non-root users to deploy.
* doc/guix.texi (Invoking guix deploy): Add section describing
prerequisites for deploying as a non-root user.
* guix/remote.scm (remote-pipe-for-gexp): New optional 'become-command'
argument.
(%remote-eval): New optional 'become-command' argument.
(remote-eval): New 'become-command' keyword argument.
* guix/ssh.scm (remote-inferior): New optional 'become-command'
argument.
(inferior-remote-eval): New optional 'become-command' argument.
(remote-authorize-signing-key): New optional 'become-command' argument.
* gnu/machine/ssh.scm (machine-become-command): New variable.
(managed-host-remote-eval): Invoke 'remote-eval' with the
'#:become-command' keyword.
(deploy-managed-host): Invoke 'remote-authorize-signing-key' with the
'#:become-command' keyword.
2019-08-15 07:43:03 -04:00
Jakob L. Kreuze
2c8e04f136
remote: Build derivations appropriate for the remote's
* gnu/machine/ssh.scm (machine-ssh-configuration): Add 'system' field.
(managed-host-remote-eval): Pass 'system' field to 'remote-eval'.
(machine-check-building-for-appropriate-system): New variable.
(check-deployment-sanity): Add call to
'machine-check-building-for-appropriate-system'.
* doc/guix.texi (Invoking guix deploy): Describe new 'system' field.
* guix/ssh.scm (remote-system): New variable.
* guix/remote.scm (remote-eval): Use result of 'remote-system' when
lowering the G-Expression.
(remote-eval): Add 'system' keyword argument.
(trampoline): Return a <program-file> rather than a <scheme-file>.
2019-08-14 15:38:09 -04:00
Jakob L. Kreuze
d84e9b75b2
machine: Add 'build-locally?' field for managed hosts.
* gnu/machine/ssh.scm (machine-ssh-configuration-build-locally?): New
variable.
(managed-host-remote-eval): Pass 'build-locally?' to 'remote-eval'.
2019-08-07 18:29:07 -04:00
Jakob L. Kreuze
fd3119db4f
machine: Implement safety checks.
* gnu/machine/ssh.scm (machine-check-file-system-availability)
(machine-check-initrd-modules, check-deployment-sanity): New variable.
(deploy-managed-host): Perform safety checks before deploying.
2019-08-06 16:40:25 -04:00
Jakob L. Kreuze
d97ce20400
machine: Rename 'system' field.
* gnu/machine.scm (machine-system): Delete variable.
(machine-operating-system): New variable.
All callers changed.
* doc/guix.texi (Invoking guix deploy): Use the
'machine-operating-system' accessor rather than 'machine-system'.
2019-08-06 15:48:51 -04:00
Jakob L. Kreuze
5c793753b3
guix system: Add 'reconfigure' module.
* guix/scripts/system/reconfigure.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/scripts/system.scm (bootloader-installer-script): Export variable.
* gnu/machine/ssh.scm (switch-to-system, upgrade-shepherd-services)
(install-bootloader): Delete variable.
* gnu/machine/ssh.scm (deploy-managed-host): Rewrite procedure.
* gnu/services/herd.scm (live-service): Export variable.
* gnu/services/herd.scm (live-service-canonical-name): New variable.
* tests/services.scm (live-service): Delete variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-07-26 19:19:49 +02:00
Tobias Geerinckx-Rice
53f21b3fe9
machine: Fix typo.
* gnu/machine/ssh.scm (managed-host-environment-type)[description]:
Fix typo.
2019-07-18 12:57:00 +02:00
Jakob L. Kreuze
fa9edf09e9
gnu: Add machine type for deployment specifications.
* gnu/machine.scm: New file.
* gnu/machine/ssh.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2019-07-06 02:10:04 -04:00