feat(tf-incus): deploy via incus exec, drop deployment SSH #1112
No reviewers
fediversity/developers
Labels
No labels
0 points
0.5 points
1 point
13 points
2 points
21 points
3 points
34 points
5 points
55 points
8 points
ambition
application-offering
ambition
configure-applications
ambition
front-end
ambition/install-applications
ambition
security
ambition
switch-host
ambition
update-applications
ambition
user-management
api service
blocked
component: fediversity panel
component: nixops4
documentation
estimation high: >3d
estimation low: <2h
estimation mid: <8h
infinite points
productisation
project-management
question
role: application developer
role: application operator
role: hosting provider
role: maintainer
security
technical debt
testing
type unclear
type: bug
type: deliverable
type: key result
type: objective
type: task
type: user story
user experience
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
fediversity/fediversity!1112
Loading…
Reference in a new issue
No description provided.
Delete branch "kiara/fediversity:incus-exec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Paves the way for #24, as suggested at #295 (comment).
The
tf-incuspath provisioned Incus containers with thelxc/incusprovider, then deployed NixOS onto them over SSH:
nix-copy-closureplus
switch-to-configurationthroughProxyJump=incushost, gated onawait-ssh.sh. To make that channel reachable each container baked thedeployer's pubkey into root's
authorized_keysand carried SSH-survivalscaffolding to keep sshd alive across the switch.
The deployer already holds an Incus mTLS client cert and the container
instance name is plumbed through the data model, so the container is
reachable with
incus execagainstincus:<name>without any SSH intoit. Switch the deployment transport to
incus exec:src/effects/incus/run.sh: streams the closure withnix-store --export | incus exec -T -- nix-store --import(nonix-copy-closure), runs every remote step viaincus exec, andregisters the provider's mTLS remote at runtime (the provider keeps
remotes in TF state only, so the CLI config dir has none). The
transport-agnostic nspawn D-Bus-recovery logic is preserved.
src/effects/tf/incus/host/module +await-incus.shreadinessgate;
hosts/main.tfaddresses containers by name, dropping thecached-IP dance and
await-ssh.sh.writeShellApplication-wrapped sopkgs.incusis pinned on PATH.Containers keep sshd for operator login (the shared
setups/nixos/networking.nix+ procolix keys); only the deployer'sbaked key and the deploy-SSH scaffolding are removed. The now-dead SSH
key wiring in the api/panel/tf-incus tests is dropped accordingly.
incusModelis also the deployed-config generator for the SSH-transporttests (
apps-tf,deployment-tf-hosts), whose test scripts still SSHroot@<container>after the deploy, so the sshd-survival block stays inincusModel(inert for the incus path); onlyextraRootKeysis removed.Verified on fediversity-ci: deployment-tf-incus-hosts, apps-tf-incus,
apps-api, apps-tf, deployment-tf-hosts all green.
Note that this may remove some ssh bits from api/panel that may turn out useful for say #723.
incus exec, drop deployment SSHWIP: feat(tf-incus): deploy viato feat(tf-incus): deploy viaincus exec, drop deployment SSHincus exec, drop deployment SSH