Commit graph

159 commits

Author SHA1 Message Date
86305a6a2e fix link; readability 2025-07-15 09:04:56 +02:00
aef414ffe8 resolve regressions from recent qemu files (#432)
- move import to match module classes
- manually import sources to resolve infinite recursion

closes #431.

Reviewed-on: Fediversity/Fediversity#432
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-07-11 16:09:27 +02:00
a882de0b8e address linter gripes in nix files (#430)
Reviewed-on: Fediversity/Fediversity#430
Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-07-03 15:56:16 +02:00
871672d447 Add forgejo-ci machine to our infrastructure (#389)
picked up from https://git.fediversity.eu/Fediversity/Fediversity/compare/main...niols:forgejo-ci.

closes #356.

Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
Reviewed-on: Fediversity/Fediversity#389
Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-07-02 17:43:09 +02:00
1c92009879
Do not force QEMU options onto machines 2025-07-01 23:55:33 +02:00
a791ad41ec Inject sources, secrets and keys via module system - avoid import ../ (#421)
Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
Reviewed-on: Fediversity/Fediversity#421
Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com>
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-07-01 21:08:15 +02:00
c1dc0fef01 Split nameservers between IPv4 and IPv6 (#420)
Reviewed-on: Fediversity/Fediversity#420
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-07-01 13:09:06 +02:00
0c23115cff allow configuring network interface (#413)
Reviewed-on: Fediversity/Fediversity#413
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-30 19:23:51 +02:00
ae444d5352 simplify imports (#415)
Reviewed-on: Fediversity/Fediversity#415
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-27 14:01:41 +02:00
1f1cf0d516 unset class, fixing #408 (#410)
Reviewed-on: Fediversity/Fediversity#410
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-27 11:53:17 +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
d67f533948 fix running nixops4 apply test (#391)
Closes #390

Reviewed-on: Fediversity/Fediversity#391
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-committed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2025-06-19 08:26:20 +02:00
dbb4ce67fc move machines to reflect a semantic structure (#367)
later we may want to distinguish dev vs host as well, tho eventually we expect not to have hard-coded machines anyway.

split off from #319.

Reviewed-on: Fediversity/Fediversity#367
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-06-15 15:01:56 +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
f4ebf55a15
unify versioning (minus around nixops, for now) 2025-05-01 13:24:45 +02:00
6fcae1c48c moved proxmox architecture doc to meta repo 2025-04-21 13:23:53 +02:00
195889ef2c peertube: test03 -> test05 (#306)
Fediversity/Fediversity#273 (comment)
Reviewed-on: Fediversity/Fediversity#306
Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-04-14 08:26:28 +02:00
c69f1f52e0 allow accessing test vms from fedi201, closes #286 (#297)
Reviewed-on: Fediversity/Fediversity#297
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-04-09 16:58:50 +02:00
ea8c61a712
A bunch more test machines 2025-04-02 15:06:17 +02:00
e25ff10872 Work around weird Proxmox behaviour with test02 (#282)
Reviewed-on: Fediversity/Fediversity#282
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
Co-committed-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
2025-03-27 15:48:35 +01:00
53658e9880
trigger nixops from panel
adds a deploy button to the panel form - covers the local part of #76.

As a workaround to pass info (from our user form) into nixops4 uses
environment variable `DEPLOYMENT` thru nix's
`--extra-experimental-features configurable-impure-env`.
2025-03-19 09:51:23 +01:00
3364d6c972 fix: NixOS deployment code
- simplify the configuration module

  the `package` attribute makes little sense to be user-configurable,
  since it will always need to be the derivation defined in this very
  repository. for debugging one may as well change the original code itself.

- unbreak deployment

  setting `CREDENTIALS_DIRECTORY` disabled the systemd mechanism set up
  in the configuration module.

- remove unneeded configuration for deployment

- unbreak integration tests

  before that missed waiting for the service to create some
  state before running the application-level tests.
2025-03-19 09:48:41 +01:00
7afae84b6c Add pub key Lois 2025-03-12 12:01:50 +01:00
4db91bd0b7
Transmit initial user from JSON to services 2025-02-28 10:57:31 +01:00
6e386a9fd6 Merge pull request 'Generate machines' list automatically' (#209) from Niols/Fediversity:generate-machines-list-by-hand into main
Reviewed-on: Fediversity/Fediversity#209
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
2025-02-27 22:06:57 +01:00
9cc1e40b5d Merge pull request 'deploy fedipanel' (#201) from kiara/Fediversity:deploy-panel into main
Reviewed-on: Fediversity/Fediversity#201
Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com>
2025-02-27 22:06:24 +01:00
0b18938eaa
Support specifying disk size 2025-02-27 16:45:11 +01:00
52e4dc8aec
Make ShellCheck happy 2025-02-27 16:45:11 +01:00
816099eb1f
Document regenerating the list of machines 2025-02-27 16:45:11 +01:00
8ba000307f
Generate list of machines from config 2025-02-27 16:45:11 +01:00
b42d654ab6
Track machines' descriptions 2025-02-27 16:45:11 +01:00
f34f2e45ab
Get panel config as a block - use eg. mastodon.enable 2025-02-27 11:43:44 +01:00
c66889f58f
Better naming of makeMakeDeployment arguments 2025-02-27 11:35:55 +01:00
cbed66c934
Report errors in subprocesses 2025-02-27 11:35:55 +01:00
0c75a4053e
Report already deleted VM in a clean way 2025-02-27 11:35:55 +01:00
beb225faf7
Better logging of VM removal 2025-02-27 11:35:55 +01:00
e27cc6e96a
Generalise test deployment; get config from JSON 2025-02-27 11:35:54 +01:00
f828afd5d5
minimum setup i got working for deployment 2025-02-27 09:07:13 +01:00
e819dc4bcc
Stop mentioning non-existing deployments 2025-02-26 09:15:10 +01:00
90efd14e54
Remove unused VMs
This has been done in sync with @kevin who removed them from the
Procolix infrastructure as well.
2025-02-26 09:15:10 +01:00
e7e175ef78
Fix typo 2025-02-26 09:14:47 +01:00
1d4004ccf4
update fedipanel import references 2025-02-25 17:11:50 +01:00
6182ba192c
Make ShellCheck happy 2025-02-25 17:10:25 +01:00
d5264a52a1
panel: override STATIC_ROOT 2025-02-25 16:11:40 +01:00
3354c89503
WIP: deploy fedipanel
Closes #101
2025-02-25 16:11:40 +01:00
4e30363c5f
Generate list of machines from machines subdir 2025-02-25 11:57:21 +01:00
2e346d1de7
Move test machines configuration to test-machines directory 2025-02-25 11:57:21 +01:00
c74145fe24
Split machine definitions into subdirectories 2025-02-25 11:57:21 +01:00
3f9c174d97
Get rid of the deployment/ directory 2025-02-25 11:57:20 +01:00
f4153a048c
Reintroduce test machines deployment 2025-02-25 11:57:20 +01:00