Commit graph

56 commits

Author SHA1 Message Date
27d33141d2
set up proxmox
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
6238b12f88
handle CA certificate
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
f8a2d11c2f
add packages
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
29d8345a57
prevent kernel panic
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
b0b158050d
add pve-manager for pvesh
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00
d3a0d66fe6
upstream nimbolus
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
3c375da97c
skip acme
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
c5351e85ce
clean up unused vms
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
8b7f19a885 mv acme logic out of panel test (#550)
Reviewed-on: fediversity/fediversity#550
2025-10-22 15:30:46 +02:00
9490612630 rename the caller option to the more apt caller (#547)
Reviewed-on: fediversity/fediversity#547
2025-10-22 15:14:10 +02:00
195bc476be rename pve node in test (#546)
Reviewed-on: fediversity/fediversity#546
2025-10-22 15:04:22 +02:00
575910f29f remove the (so far unused) model options (#545)
Reviewed-on: fediversity/fediversity#545
2025-10-22 15:02:16 +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
a2a4977139 use upstreamed version of terraform-backend (#541)
Reviewed-on: fediversity/fediversity#541
2025-10-11 14:02:42 +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
9a0f60e819 add a TF http backend to store state, see #515 (#536)
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
Reviewed-on: fediversity/fediversity#536
2025-10-06 13:11:03 +02:00
a12a1606ed move timeout expectation to tests (#534)
Reviewed-on: fediversity/fediversity#534
2025-09-30 12:00:27 +02:00
ba95bae430 stop passing pathFromRoot where not needed (#532)
Reviewed-on: fediversity/fediversity#532
2025-09-23 10:13:20 +02:00
e30b052cfc ensure path availability in deployments (#511)
Reviewed-on: Fediversity/Fediversity#511
2025-09-03 17:15:35 +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
f954ed5389 add proxmox repro test (#345)
closes #325

Reviewed-on: Fediversity/Fediversity#345
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-09-01 14:31:50 +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
737aecaba6 set default value for nixops4Package (#412)
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Reviewed-on: Fediversity/Fediversity#412
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 12:44:53 +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
bd1cfd7a7c Introduce test for deploying all services via FediPanel (#361)
Closes #277

Same as #329 but where we run the FediPanel and interact with it via a browser
instead of running NixOps4 directly.

Reviewed-on: Fediversity/Fediversity#361
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-06-18 12:37:47 +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