Commit graph

64 commits

Author SHA1 Message Date
14b613264c
settle for garage 1 for now over breaking changes 2025-08-03 15:49:31 +02:00
ec5e4277f9
try garage 2, given 0.9's EOL 2025-08-03 15:49:31 +02:00
159e4107b8 fix Pixelfed test eval failure (#458)
Reviewed-on: Fediversity/Fediversity#458
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-07-15 10:38:10 +02:00
82f83eea0d fix mastodon test (#457)
closes #34.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Reviewed-on: Fediversity/Fediversity#457
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-15 08:54:20 +02:00
ad9c61a3db docs: fix typos 2025-07-10 00:37:27 +02:00
8a7984933d reinstate acme settings needed by applications (#434)
closes #417

Reviewed-on: Fediversity/Fediversity#434
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-08 10:02:13 +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
611c961dcf separate test declarations from invocations (#396)
see Fediversity/Fediversity#395 (comment)

Reviewed-on: Fediversity/Fediversity#396
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-19 18:11:08 +02:00
1b832c1f5b bypass native flake input for Nixpkgs (#374)
@Niols the sheer amount of hassle and noise indicates that it may be better to first split out a `flake.nix` just for the tests. And all this clutter doesn't even explain yet *why* we thought it needs to be there.

closes #279.

Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
Reviewed-on: Fediversity/Fediversity#374
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-12 13:05:11 +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
086a69ac53
Support injecting initial user in Pixelfed service 2025-02-28 10:56:22 +01:00
2ee563f5d9
Fix Pixelfed 2025-02-21 17:52:50 +01:00
cd83536e2f
Allow Garage and services to run on different machines 2025-02-21 17:52:50 +01:00
1eeaa04df6
Introduce fediversity.garage.enable 2025-02-21 17:52:50 +01:00
a5d226ed22
Get rid of fediversity.enable 2025-02-21 17:52:50 +01:00
78a85b27ff
Put the S3 secrets into files
...but not everywhere, there remains some FIXMEs where ultimately the
secrets do get into the store.
2025-02-21 17:52:50 +01:00
8c5bf79ba2
Share options that can be shared 2025-02-21 17:52:50 +01:00
b547912794
Make access and secret keys parameters 2025-02-21 17:52:50 +01:00
1965e83e5d
Same treatment for Pixelfed 2025-02-21 17:52:50 +01:00
a1cfcf1d71
Same treatment for Peertube 2025-02-21 17:52:50 +01:00
ca6642c8d4
Same treatment for Mastodon 2025-02-21 17:52:50 +01:00
f4babe38a8
Consolidate Garage options
- `fediversity.internal.garage` -> `fediversity.garage`
- all in the same place
2025-02-21 17:52:50 +01:00
d9188427ed
services.garage -> fediversity.garage
for the options that are ours; we want to avoid clashes if possible
2025-02-21 17:52:50 +01:00
b68a821b77
Searate Garage config and options 2025-02-21 17:52:50 +01:00
ff03d12dc1
Move Garage configuration to own directory 2025-02-21 17:52:49 +01:00
237c56791f
Basic services README 2025-02-21 17:52:49 +01:00
3a881979f9
Move old services README to a HACKING file 2025-02-21 17:52:49 +01:00
647d89798e
replace nixos wiki link with official one 2025-02-18 21:29:08 +01:00
1864e20a8c
Add Peertube test 2024-12-17 17:15:11 +01:00
f1440bc735
Rename Mastodon test 2024-12-17 17:14:58 +01:00
a5875376b8
Fix Peertube service 2024-12-17 17:14:27 +01:00
51c3ec754f
Rename the test simply “mastodon” 2024-11-27 12:39:26 +01:00
7c88d47fb8
Notes and cleanup 2024-11-27 12:39:26 +01:00
f4f1ecdf71
Rework and cleanup the Mastodon test 2024-11-27 12:39:26 +01:00
5699ca8ba6
Note on more nginx proxy options for Garage 2024-11-27 12:39:26 +01:00
37aac118ce
Remove useless S3_HOSTNAME envionment variable
`S3_HOSTNAME` is only usedful for path-style buckets where Mastodon will
use `<S3_HOSTNAME>/<S3_BUCKET>`. However, we use domain-style, and that
is exactly what `S3_ALIAS_HOST` is for
2024-11-27 12:39:26 +01:00
6ef263f53e
Fix typo 2024-11-27 12:39:26 +01:00
6e260b3bdc
Consolidate virtualisation options 2024-11-27 12:39:26 +01:00
fc2acc13d8
Integrate services as a flake part 2024-11-14 18:07:11 +01:00
9c08267fce
Clean up what does not belong in services 2024-11-14 18:04:02 +01:00
a888540580
Opt-in to formatting for the services/ subdirectory 2024-11-14 17:50:17 +01:00
c323453234
Move some gitignore at toplevel 2024-11-14 17:50:03 +01:00
3ae51fa545 deploy website from the repo (#1)
- move the impure single-node deploy helper here

  it's not used anywhere else

- reuse the pins from the website

  this needs to be cleaned up later

- don't copy the config to the server

  it's impure (can't even build that without jumping through hoops), and useless when building via SSH

Reviewed-on: Fediversity/Fediversity#1
2024-11-14 13:41:19 +01:00
9a573df05f Add pre-commit hooks for formatting and dead code 2024-11-13 16:00:39 +01:00
20f9d36481 Cleanup dead code 2024-11-13 16:00:39 +01:00
81176a1a9a Format everything, RFC-style 2024-11-13 16:00:39 +01:00
9e234e7b2d Proxy Peertube behind Nginx 2024-11-13 16:00:39 +01:00
00382102ba Require secrets file also when on metal 2024-11-13 16:00:39 +01:00
7a485c5f90 Fix typo 2024-11-13 16:00:39 +01:00