Commit graph

63 commits

Author SHA1 Message Date
568cafb2f9
move from dev to operator 2025-07-02 18:37:42 +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
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
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
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
0b18938eaa
Support specifying disk size 2025-02-27 16:45:11 +01:00
b42d654ab6
Track machines' descriptions 2025-02-27 16:45:11 +01:00
c66889f58f
Better naming of makeMakeDeployment arguments 2025-02-27 11:35:55 +01:00
e27cc6e96a
Generalise test deployment; get config from JSON 2025-02-27 11:35:54 +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
f4153a048c
Reintroduce test machines deployment 2025-02-25 11:57:20 +01:00
f6960010cd
One deployment per machine; bundle test machines 2025-02-25 11:57:20 +01:00
636e4636f7
Add test machines 2025-02-25 11:57:20 +01:00
11fd13a982
Allow injecting a private key in the provisioned VM 2025-02-25 11:57:20 +01:00
4fda719992
Expose VM options in the flake 2025-02-25 11:36:55 +01:00
71d1c612a4
Get rid of fedi300
It has been off for a long while now. We will just add a VM again if
there is one ever.
2025-02-25 11:36:54 +01:00
c74fc4f927 Add VM for the front-end (#183)
For now, I created yet another deployment. Basically, this seems to tell me that we only ever use:

- one deployment per machine (when we change its configuration)
- one big deployment for all of them (eg. for nixpkgs updates or new contributor)

but that the current split into themes doesn't really work. I can discontinue it in another PR.

`fedi201` is accessible under `fedi201.abundos.eu`. Its configuration lives in `infra/fedi201/default.nix`. This Nix file is a NixOps4 resource module, not a NixOS configuration module; you probably want to add a `nixos.module` field to it where you put your NixOS configuration.

Reviewed-on: Fediversity/Fediversity#183
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-02-24 14:49:53 +01:00
e6e0f49f40
Add a testing machine for Hans 2025-02-21 20:25:20 +01:00
cd1679afec
procolixVm -> fediversityVm 2025-02-21 20:24:41 +01:00
722afdc5ea
Expose a NixOS configuration for each VM in infra 2025-02-21 20:24:40 +01:00
df78965bf4
Extract resource module from makeDeployments 2025-02-21 20:24:40 +01:00
bf0a35de6c
makeInstaller -> makeInstallerIso 2025-02-21 20:24:40 +01:00
a7c6ceb111
Export makeInstaller in the flake 2025-02-21 10:01:06 +01:00
54194cd494
Share options between resource and config 2025-01-31 16:47:33 +01:00
8cfc943297
Cleanup 2025-01-31 16:36:18 +01:00
ba97ed26d0
Get rid of useless self and providers arguments 2025-01-31 16:34:21 +01:00
8fa7bd4df5
Add a default deployment containing everything 2025-01-31 15:24:41 +01:00
9c85431a22
Move everything into common with better names 2025-01-31 15:22:28 +01:00
dedd70dc0e
Make vm*/default.nix resources 2025-01-31 15:19:55 +01:00
4f761bfc1f
Start building a procolixVm resource module 2025-01-31 15:08:47 +01:00
1d05993127
Bump NixOps4
in particular, follow the split of `nixops4-nixos` to its own
repository.
2025-01-31 14:11:46 +01:00
1f2ea73e69
Clean up resource definition 2025-01-31 14:03:37 +01:00
d121cd6a5b
Remove vm02117
Machine was running on the old supervisor and was decommissioned manually.
2025-01-31 11:06:23 +01:00
873a1c9177
Automatically git root access to all contributors 2025-01-31 10:59:36 +01:00
5522595296
Factorise the deployment definition 2025-01-30 12:57:11 +01:00
34eb7263cc
Factorise the resource definition 2025-01-30 09:53:45 +01:00
d4e1760c70
vm02117 is not the web server anymore 2025-01-29 15:34:48 +01:00
f475b1f56c
Move web server definition to infra 2025-01-29 15:34:48 +01:00
ba08f3cf49
Enter fedi300 2024-12-16 13:46:21 +01:00
f1f0611bbc
Discontinue two old actions runners 2024-12-16 13:46:08 +01:00
21e8c962bf
s/x_fediversity/fediversity/ 2024-12-13 12:37:25 +01:00