Commit Graph

634 Commits

Author SHA1 Message Date
Qubasa
c1b4fa6d55 nix fmt 2023-10-27 19:21:50 +02:00
Qubasa
3581e0c9a8 Fixing a multitude of tests 2023-10-27 19:21:50 +02:00
Qubasa
d1c35301e3 Added repro_env_break debugging command. This spawn a terminal inside the temp home folder with the same environment as the python test 2023-10-27 19:20:17 +02:00
Qubasa
59393bb35e Working test_create_flake 2023-10-27 19:20:17 +02:00
Qubasa
26bfb793b1 Added ref to Qubasa-main in template/new-clan/flake.nix 2023-10-27 19:20:17 +02:00
Qubasa
a71584d9d2 Added clanName argument to clan-core.lib.builClan 2023-10-27 19:20:17 +02:00
Qubasa
d02acbe04b nix fmt 2023-10-27 19:19:45 +02:00
Qubasa
9f464dd14e Added ipdb as breakpoint console. Improved logging. 2023-10-27 19:19:45 +02:00
Qubasa
af3f04736b Improved logging messages. Added ClanError if flake create or machine create already exist 2023-10-27 19:18:45 +02:00
Qubasa
8482bc79f6 Secrets tests passing. nix fmt doesn't complain 2023-10-27 19:18:45 +02:00
Qubasa
03cabda2d4 Improved test logging with frame inspection 2023-10-27 19:18:45 +02:00
Qubasa
8cc1c2c4bd Fixed cyclic dependencie AND swapped pytest-parallel for pytest-xdist to fix deadlock in tests 2023-10-27 19:18:45 +02:00
Qubasa
2ca54afe7f Added new type FlakeName 2023-10-27 19:18:45 +02:00
Qubasa
32e60f5adc Added flake_name:str argument everywhere, nix fmt doesn't complain anymore 2023-10-27 19:15:40 +02:00
Qubasa
fdcd7ad1d9 Updated to main 2023-10-27 19:15:11 +02:00
Qubasa
711c70d1f0 Added state directory. 2023-10-27 19:11:27 +02:00
Qubasa
fa5f39f226 API: Added Path validators. api/flake/create inits git repo. Fixed vscode interpreter problem 2023-10-27 19:11:27 +02:00
Jörg Thalheim
79e707b044 fix updating multiple machines 2023-10-27 17:40:20 +02:00
Jörg Thalheim
b2c3b3840f move breakpoint checks out of default build
this allows to debug builds with breakpoints
2023-10-27 17:40:20 +02:00
Jörg Thalheim
3e4ad8ae1b cli/vms/create: fix trailing newlines in log output 2023-10-27 14:27:52 +02:00
DavHau
0e5c7d2d13 api/machines: split off config validation into separate endpoint
- This speeds up PUT /machines{name}/config as it doesn't do the expensive check anymore
- instead use PUT /machines/{name}/verify which allows a dry-run evaluation of a config which is passed without writing it to disk
2023-10-25 17:48:37 +01:00
DavHau
25708d1a1a /api/clan_modules: init
- add GET /api/clan_modules entry point returning a list of modules available for import
2023-10-25 17:22:35 +01:00
DavHau
bf176ad277 api/machines: allow importing extra modules
- add top-level option `clanImports` to clanCore
- clanImports can be set and checked as any other option
- buildClan resolves the clanImports from the settings.json before calling evalModules to prevent infinite recursions
- new endpoint PUT machines/{name}/schema to allow getting the schema for a specific list of imports
- to retrieve the currently imported modules, cimply do a GET or PU on machines/{name}/config which will return `clanImports` as part of the config

Still missing: get list of available modules
2023-10-25 16:36:30 +01:00
DavHau
9f6e01671f PUT /machines/{name}/config; ensure is idempotent 2023-10-24 18:48:14 +01:00
DavHau
588bde069f PUT api/machines/{name}/config: ensure only valid config is ever written
- add CLAN_MACHINE_SETTINGS_FILE variable to temporarily override the machine settings file
- do a dry-run evaluation first with the new config before persisting it.
2023-10-24 18:40:48 +01:00
DavHau
a539fb6dc6 machines: add endpoint machines/{name}/ verify 2023-10-24 16:31:37 +01:00
DavHau
cd940abc4e clan config: refactor - reorder functions 2023-10-24 15:27:19 +01:00
DavHau
7ddd624e8e clan-cli/shell.nix: rename repo_root -> source 2023-10-23 16:15:46 +01:00
clan-bot
a650d9c341 Merge pull request 'machines/install: call correct upload function' (#426) from Mic92-main into main 2023-10-14 14:06:59 +00:00
Jörg Thalheim
c82a4df9f9 machines/install: call correct upload function 2023-10-14 15:56:04 +02:00
lassulus
3dad667f97 vms.create: don't generate secrets if clan is remote 2023-10-11 12:01:42 +02:00
Qubasa
b49433958b API: Added /api/flake/create. Fixed vscode search settings. Moved clan create to clan flake create 2023-10-09 14:01:34 +02:00
Qubasa
9c74c4d661 CLI: Fixed bug in firefox opening addon page because of new profile 2023-10-08 14:39:31 +02:00
DavHau
ceb6bdd474 clan join: test create vm for clan join
This adds a vm create test for the `clan join` scenario where:
  - there is no local clan to write changes to
  - a machine from a remote flake needs to be built and run
  - no users and no secrets need to be or can be managed (no flake to write files to)
2023-10-06 19:15:25 +02:00
DavHau
f885c877bc clan-cli: improve debug logging 2023-10-05 17:37:33 +02:00
DavHau
dbf80595fd zerotier: fix: find free port without collissions 2023-10-05 17:03:01 +02:00
lassulus
bdb0a6484a tests: add fixtures to test_vms_cli 2023-10-05 15:56:15 +02:00
DavHau
6abbf4bacd clan-cli: unset LD_LIBRARY_PATH
This prevents problems with mixed glibc versions that might occur when the cli is called through a browser built against another glibc
2023-10-05 13:44:08 +02:00
lassulus
4af74ee5a5 machines update: add --target-host 2023-10-04 23:28:15 +02:00
lassulus
3fb36b3ac1 secrets upload: skip on exit 23, cleanup 2023-10-04 21:29:19 +02:00
clan-bot
dfed8fdcb2 Merge pull request 'test_secrets_password_store: create gpghome with save permissions' (#407) from Mic92-main into main 2023-10-04 17:59:18 +00:00
Jörg Thalheim
41106a67e2 test_secrets_password_store: create gpghome with save permissions 2023-10-04 19:56:18 +02:00
DavHau
bdd4cfc7d8 clan join: init 2023-10-04 18:53:59 +02:00
clan-bot
a2597717b3 Merge pull request 'webui: drop deadcode' (#405) from Mic92-main into main 2023-10-04 16:20:23 +00:00
Jörg Thalheim
d0c1eddf79 task_manager: log stdout/stderr correctly for processes 2023-10-04 18:17:30 +02:00
Jörg Thalheim
d156218775 drop dead daemonize code 2023-10-04 18:17:30 +02:00
lassulus
99433ac290 test_vms_api: supply age key for secret creation 2023-10-04 18:13:25 +02:00
lassulus
bc36ec4c1a vms: support secrets and fix cross compilation 2023-10-04 18:04:27 +02:00
lassulus
e8c9f27515 tests test_flake: disable dhcp 2023-10-04 17:52:06 +02:00
lassulus
fe1a3f0541 task_manager: fix race conditions 2023-10-04 17:52:06 +02:00