Jörg Thalheim
51526aedbb
rename run_no_output to run_no_stdout
...
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
Qubasa
164c621dc0
clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts
2024-12-03 16:01:51 +01:00
DavHau
66ce80c096
vars: rename: invalidation -> validation
2024-11-29 17:23:31 +07:00
Qubasa
ff8d82c3c6
clan-vm-manager: Fix regression part2
2024-11-28 19:01:46 +01:00
Qubasa
95cb239206
clan-cli: refactor HostGroup._run_local to work with RunOpts
2024-11-28 16:05:51 +01:00
Qubasa
d2719f3179
clan-cli: cmd.run now has its options extracted to a dataclass
2024-11-28 15:26:37 +01:00
Johannes Kirschbauer
126874e62e
CLI/tests: use correct fixture paths
2024-11-28 11:56:12 +01:00
Qubasa
d29f9bf86c
clan-cli: SSH now completely refactored to use dataclasses everywhere
2024-11-28 10:52:14 +01:00
DavHau
61576649ff
vars: make all python tests work in nix sandbox
...
- generate a flake.lock file for each template by copying the clan-core flake.lock and modifying it
- call nix build with --store for tests inside the sandbox
2024-11-27 14:32:02 +07:00
Jörg Thalheim
45dfbf54db
vars: make interface more type-safe
2024-11-26 17:08:26 +01:00
Jörg Thalheim
8eb37903e0
test_vars: mock ask function instead of sys.stdin
2024-11-26 11:56:38 +00:00
Johannes Kirschbauer
446b2592ec
API/serde: add handling for serializing enum classes
2024-11-26 10:44:06 +00:00
DavHau
173436632d
vars: fix migration - secrets end up in public store
2024-11-26 17:02:11 +07:00
Qubasa
27b40849d1
clan-cli: Refactor ssh classes to dataclasses
2024-11-25 19:47:17 +01:00
Qubasa
8866a85765
clan-cli: Refactor ssh part 2, Refactor custom_logger
2024-11-22 22:08:50 +01:00
Qubasa
4104374b76
clan-cli: Refactor ssh folder part 1
2024-11-21 13:02:22 +01:00
DavHau
3f62e143ec
vars: implement invalidation mechanism
...
This adds options `invalidationData` to generators.
`invalidationData` can be used by an author of a generator to signal if a re-generation is required after updating the logic.
Whenever a generator with invalidation data is executed, a hash of that data is stored by the respective public and/or secret backends.
The stored hashes will be checked on future deployments, and a re-generation is triggered whenever a hash doesn't match what's defined in nix.
2024-11-20 16:27:22 +07:00
Jörg Thalheim
b3b72e54cd
remove ssh.id_ed25519 from facts test
...
we have moved this to vars now.
2024-11-19 09:46:14 +00:00
DavHau
64a6f380a6
vars: add test for 'clan vars get'
2024-11-19 13:32:27 +07:00
DavHau
6a373f92d1
tests: improve performance, keep flake.lock between tests
...
- deprecate fixture generate_flake in favor of class ClanFlake
- allow creating flake templates that can be copied, including their state, like git and lock files, in order to avoid expensive re-initialization
2024-11-18 17:01:58 +07:00
Qubasa
250eed0798
clan-cli: upload.py -> Replace rsync with native ssh command
2024-11-15 22:03:47 +07:00
a-kenji
6bb26746f1
pkgs/cli: Fix typo in test fixtures
2024-11-14 15:00:44 +01:00
DavHau
820427b949
cleanup: remove legacy flake fixture test_flake_minimal and test_flake_with_core_and_pass
2024-11-14 14:03:29 +07:00
DavHau
54b8f5904e
vars: allow re-encrypting secrets when recipient keys were added.
...
When the users of a secret change, when for example a new admin user is added, an error will be thrown when generating vars, prompting the user to pass --fix to re-encrypt the secrets
2024-11-13 18:49:30 +07:00
Johannes Kirschbauer
c7da3e165f
Chore: remove unused clanImports module
2024-11-12 14:46:25 +01:00
Qubasa
2df1179666
clan-cli: Improved --debug output by indenting commands, add TRACE_DEPTH environment variable
2024-11-11 21:23:53 +07:00
Jörg Thalheim
cd13bfe6ed
HistoryEntry: add cleaner typesafe json deserialization
2024-11-11 11:36:17 +01:00
Jörg Thalheim
1a98bd7234
tests/command: also wait for exit status
2024-11-04 12:57:07 +01:00
danjujan
a9552b07c6
pkgs: fix typos
2024-10-29 12:37:34 +00:00
DavHau
7208c6dc82
vars: fix shared dependency was not resolved correctly
2024-10-23 20:43:33 +07:00
Jörg Thalheim
4230ae6750
ruff: enable warning lints
2024-10-23 09:06:02 +00:00
Jörg Thalheim
9a560dfa35
test_modules: add missing check argument
2024-10-23 09:50:08 +02:00
Johannes Kirschbauer
4b0af71b9d
Serde: fixup & tests after changed serialization
2024-10-18 12:42:35 +02:00
Jörg Thalheim
91d5741c97
properly support verbatim ipv6 addresses
2024-10-10 17:03:32 +02:00
DavHau
d9597dab05
vars,facts: add sops.defaultGroups to new machines
...
Prior to this, when initializing new machines, only the current user had access to it's key which prevents other admin users to deploy this machine later
2024-10-10 19:31:03 +07:00
Jörg Thalheim
8844f6aad7
drop optionsNix
2024-10-09 13:22:06 +02:00
Jörg Thalheim
f18f7ce1d4
drop old settings code
2024-10-09 12:16:00 +02:00
Jörg Thalheim
ff4ae1eb50
remove machine settings.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
2e57a94e42
test_vars_deployment: set hostPlatform depending on current system
2024-10-09 12:08:23 +02:00
Jörg Thalheim
07593a38d4
test_modules: initialize minimal facter.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
5f0b0205b2
drop "system" argument from inventory
2024-10-09 12:07:58 +02:00
Jörg Thalheim
61f0ceeaf5
fixtures_flake: drop unused substitutions
2024-10-09 12:07:58 +02:00
Jörg Thalheim
1e0f00e6d2
tests: set git author name + email via environment variables
2024-10-09 12:07:58 +02:00
Jörg Thalheim
489977bf3b
no longer write deprecated settings.json in tests
2024-10-09 12:02:10 +02:00
Jörg Thalheim
23c23390a8
re-use gpg key across tests
2024-10-09 11:56:41 +02:00
Jörg Thalheim
67886dc972
fix missing hostPlatform in test_vars
2024-10-09 11:56:36 +02:00
Jörg Thalheim
f19d977544
test_vars_deployment: fix test
2024-10-08 17:51:55 +00:00
Jörg Thalheim
9e5de5c8f0
vms/run: better defaults for run api
2024-10-08 17:51:55 +00:00
Jörg Thalheim
112d7bf2be
expose the option to run commands in virtual machines
2024-10-08 17:51:55 +00:00
Jörg Thalheim
c729840f09
test_flake_with_core: no longer auto shutdown vm
...
We can now execute commands to have a better interface for this.
2024-10-08 17:51:55 +00:00