Commit graph

18 commits

Author SHA1 Message Date
c0d5e13aa6
rm users 2025-09-03 13:07:27 +02:00
9b87c5b89d
simplify grub 2025-09-03 13:07:27 +02:00
193d55b48b
rm users 2025-09-03 13:07:27 +02:00
2bf2fe32a7
reenable ipv6 2025-09-03 13:07:27 +02:00
ac5f01a66a
reenable firewall 2025-09-03 13:07:27 +02:00
f2d386e4d3
rm getty 2025-09-03 13:07:27 +02:00
efa11adfdb
mv attempts 2025-09-03 13:07:27 +02:00
b5496b2be1
grub 2025-09-03 13:07:27 +02:00
15a7fe0c67
auto login 2025-09-03 13:07:27 +02:00
989dd1db51
networking 2025-09-03 13:07:27 +02:00
05bb9ce9fc
users 2025-09-03 13:07:27 +02:00
dc6478844a
nix in tests: download-attempts = 1 2025-09-03 13:07:27 +02:00
8dfb10520e
move stuff not needed in test out 2025-09-03 13:07:27 +02:00
d8cd1f9473
move imports from paste to targetNode to increase parity between paste and nixosTest 2025-09-03 13:07:27 +02:00
fb2b79da88
add keys 2025-09-03 13:07:27 +02:00
9a25a04bfa specify _class module attributes to explicitly declare module types (#398)
closes #93.

note that this includes classes:

- `nixos`
- `nixosTest`
- `nixops4Resource`
- `nixops4Deployment`

.. and my (made-up, as per the [docs](https://ryantm.github.io/nixpkgs/module-system/module-system/#module-system-lib-evalModules-param-class)):

- `nix-unit`
- `package`

.. while i did not manage to cover:

- service tests, given `pkgs.nixosTest` seemed to not actually like `_class = "nixosTest"` (?!)

... nor #93's mentioned destructured arguments for that matter, as per Fediversity/Fediversity#93 (comment) - let me know if that is still desired as well.

Reviewed-on: Fediversity/Fediversity#398
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-06-23 17:24:54 +02:00
046f7c5998 Deployment tests: comment on Pebble's certificate 2025-06-06 10:52:18 +02:00
ee5c2b90b7 Introduce test for deploying all services with nixops4 apply (#329)
Closes Fediversity/Fediversity#276

This PR adds a CLI deployment test. It builds on top of Fediversity/Fediversity#323. This test features a deployer node and four target nodes. The deployer node runs `nixops4 apply` on a deployment built with our actual code in `deployment/default.nix`, which pushes onto the four target machines combinations of Garage/Mastodon/Peertube/Pixelfed depending on a JSON payload. We check that the expected services are indeed deployed on the machines. Getting there involved reworking the existing basic test to extract common patterns, and adding support for ACME certificates negotiation inside the NixOS test.

What works:
- deployer successfully runs `nixops4 apply` with various payloads
- target machines indeed get the right services pushed onto them and removed
- services on target machines successfully negotiate ACME certificates

What does not work: the services themselves depend a lot on DNS and that is not taken care of at all, so they are probably very broken. Still, this is a good milestone.

Test it yourself by running `nix build .#checks.x86_64-linux.deployment-basic -vL` and `nix build .#checks.x86_64-linux.deployment-cli -vL`. On the very beefy machine that I am using, the basic test runs in ~4 minutes and the CLI test in ~17 minutes. We know from Fediversity/Fediversity#323 that the basic test runs in ~12 minutes on the CI runner, so maybe about an hour for the CLI test?

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Reviewed-on: Fediversity/Fediversity#329
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
Co-committed-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
2025-05-19 02:18:54 +02:00