Commit graph

52 commits

Author SHA1 Message Date
0cd7a523d0
mv nixos-test-base from common to non-proxmox tests
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
a45d64bbf4
move proxmox config out
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
218330b676
rm unused settings
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
9d4a3cbf75
simplify networking
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
aaa49de5c0
rm disko
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
71a979e5db
rm wheel
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
e86035bc52
rm comment
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
4b2898f831
rm users
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
92b8535ff9
restore disk size
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
e64684f906
add fixme
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
ea1f76fd40
mv disko
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
5b4d811c75
split out TF proxmox data model
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:39 +02:00
56d8c4235b
grub default false
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
35ff03c9f8
working networking
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
a6a3396211
pass proxmox user/pw thru env var as well, should fix usage from flake again
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
42c1cfd888
rm old networking
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
430754cf95
users
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
4009d6c8e0
enable cloud-init
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
e1a22437a0
propagate ssh key
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
09ef3ebbc7
propagate cd
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
d3a4137900
propagate ips
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
b5d2b2cb87
propagate datastore id
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
eb39b278a3
un-hardcode networking info
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
0758f6aa5b
rm bash-proxmox
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
a8a62f00cf
unlog steps
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
b89c7cbd3d
first time to get nix run pipeline to succeed including update step
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
c9c8d8b457
hardcoded networking setup for nix run vm 101
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
9bdfdf6ef7
some cleanup
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:37 +02:00
a6fdff0b18
automated deployment to proxmox (in nix run) of vm booting to login
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:37 +02:00
a97d658f1e
bootable vm by repart
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:37 +02:00
df9814f0f5
get nix run to build a vm bootable by qemu
```
cp /nix/store/.../nixos.img disk.raw
chmod 0644 disk.raw
qemu-system-x86_64 -enable-kvm -m 2048 -drive
if=virtio,file=./disk.raw,format=raw -bios "$(nix eval --impure --expr
'(import <nixpkgs> { }).OVMF.fd.outPath' | jq -r)/FV/OVMF.fd"
```

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:37 +02:00
7f6aad0a58
WIP: proxmox deployment
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>

continued

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:37 +02:00
0440758e28 use minimal profile in test target nodes (#551)
Reviewed-on: fediversity/fediversity#551
2025-10-23 22:41:44 +02:00
9c54152439 split data model by test, preventing need to pass args for unrelated tests (#544)
Reviewed-on: fediversity/fediversity#544
2025-10-20 17:35:07 +02:00
ab1b48d2e7 factor out utils (#543)
Reviewed-on: fediversity/fediversity#543
2025-10-20 15:43:57 +02:00
e964bbb517 remove unused acme node for data model tests (#540)
Reviewed-on: fediversity/fediversity#540
2025-10-11 14:00:04 +02:00
2a7135fd64 propagate http backend config (#538)
Reviewed-on: fediversity/fediversity#538
2025-10-06 13:50:25 +02:00
0f7433abde data model: add TF test (#506)
add a data model deployment test by VM using opentofu.
builds upon #505.

Reviewed-on: Fediversity/Fediversity#506
2025-09-03 15:14:40 +02:00
ccbf82d546 test data model thru VM (#505)
test deployments using data obtained through the data model in VMs.

caveats:

- SSH currently has a `run` abstraction that the nixops4 model still lacks
- the deployed (trivial) configuration on activation has not facilitated new ssh connections (for subsequent) updates, i.e. a more sophisticated configuration would be needed for real-life usage.

Reviewed-on: Fediversity/Fediversity#505
2025-09-03 14:13:13 +02:00
be72b82875 Link to upstreaming PR for lib.types.fileset (#487)
Reviewed-on: Fediversity/Fediversity#487
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-07-30 13:25:22 +02:00
b4e1c5b5b3 Restrict fileset necessary for deployment tests (#450)
Now that we won't depend on the flake.nix anymore, we won't depend on all the flake-part.nix files (necessary to evaluate flake.nix) and all the files they depend on etc., so the Nix dependencies of the tests will be drastically reduced, and I will be able to leverage that by introducing a more subtle src. This will make the test not need to re-run if only things outside that reduced src changed (and the previous run is in the Nix store).

Reviewed-on: Fediversity/Fediversity#450
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-07-09 22:57:52 +02:00
de38611572 Unflakify deployment tests (#449)
This PR builds on top of #447 and #448. Since these might be rejected, there will be some changes needed for this PR as well. Let's see how the discussions go in #447.

In the meantime, @fricklerhandwerk, would you mind (in)validating the core idea of this PR? You only need to look at 7cf43c4041, really.

Reviewed-on: Fediversity/Fediversity#449
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-07-09 15:07:02 +02:00
1d40dcfc0e Grab git-hooks from npins (#448)
This PR builds on top of #447 and will be subject to the same discussion. Let's discuss there whether it makes sense to get rid of the `flake-parts` and `git-hooks` flake inputs.

Reviewed-on: Fediversity/Fediversity#448
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-07-09 13:21:48 +02:00
48c6a1f22b Extract mkFlake to own file - get flake-parts from npins (#447)
The goal is to contain the “`mkFlake` hack” to a file that we can heavily document but otherwise ignore. This also will allow me to reuse it in the “flake under test” of the deployment tests.

Reviewed-on: Fediversity/Fediversity#447
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
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-07-09 10:12:47 +02:00
05572ff69e remove string interpolation from imports (#429)
Reviewed-on: Fediversity/Fediversity#429
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:55:39 +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
4801433ae0 Get rid of the need for deployer.pub (#385)
The tests still work because we manually write the deployer's public key in `/root/.ssh/authorized_keys` on the target machines. In itself, however, the configuration that we push does not allow the deployer to push anything on the target machines.

Context: Fediversity/Fediversity#361 (comment)
Reviewed-on: Fediversity/Fediversity#385
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-06-17 16:34:29 +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
2fae356d0a Deployment tests: also make acmeNodeIP available in NixOS test 2025-06-06 10:52:49 +02:00