Jörg Thalheim
bbb2aca5cb
rename run_no_output to run_no_stdout
...
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
Qubasa
570bceff4e
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
5c5a87d416
vars: rename: invalidation -> validation
2024-11-29 17:23:31 +07:00
Qubasa
cf2ddfc191
clan-vm-manager: Fix regression part2
2024-11-28 19:01:46 +01:00
Qubasa
cc8c76e4d4
clan-cli: refactor HostGroup._run_local to work with RunOpts
2024-11-28 16:05:51 +01:00
Qubasa
1f98df96e3
clan-cli: cmd.run now has its options extracted to a dataclass
2024-11-28 15:26:37 +01:00
Johannes Kirschbauer
ffff5aa5ae
CLI/tests: use correct fixture paths
2024-11-28 11:56:12 +01:00
Qubasa
9c2c33d577
clan-cli: SSH now completely refactored to use dataclasses everywhere
2024-11-28 10:52:14 +01:00
DavHau
44e6fe803f
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
c9e80f38ca
vars: make interface more type-safe
2024-11-26 17:08:26 +01:00
Jörg Thalheim
39db147e48
test_vars: mock ask function instead of sys.stdin
2024-11-26 11:56:38 +00:00
Johannes Kirschbauer
0811dd8e3e
API/serde: add handling for serializing enum classes
2024-11-26 10:44:06 +00:00
DavHau
1881d7f0a5
vars: fix migration - secrets end up in public store
2024-11-26 17:02:11 +07:00
Qubasa
b9154fddd2
clan-cli: Refactor ssh classes to dataclasses
2024-11-25 19:47:17 +01:00
Qubasa
979e5e839d
clan-cli: Refactor ssh part 2, Refactor custom_logger
2024-11-22 22:08:50 +01:00
Qubasa
a4f3d9d1fc
clan-cli: Refactor ssh folder part 1
2024-11-21 13:02:22 +01:00
DavHau
d4c8b2e4ed
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
609dc90775
remove ssh.id_ed25519 from facts test
...
we have moved this to vars now.
2024-11-19 09:46:14 +00:00
DavHau
2127c7f5cb
vars: add test for 'clan vars get'
2024-11-19 13:32:27 +07:00
DavHau
1d66d32163
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
26730cd662
clan-cli: upload.py -> Replace rsync with native ssh command
2024-11-15 22:03:47 +07:00
a-kenji
edef77091a
pkgs/cli: Fix typo in test fixtures
2024-11-14 15:00:44 +01:00
DavHau
05ff6cfd89
cleanup: remove legacy flake fixture test_flake_minimal and test_flake_with_core_and_pass
2024-11-14 14:03:29 +07:00
DavHau
8b94bc71bc
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
9fb6ea2b8a
Chore: remove unused clanImports module
2024-11-12 14:46:25 +01:00
Qubasa
d3f0107f4d
clan-cli: Improved --debug output by indenting commands, add TRACE_DEPTH environment variable
2024-11-11 21:23:53 +07:00
Jörg Thalheim
71593604e5
HistoryEntry: add cleaner typesafe json deserialization
2024-11-11 11:36:17 +01:00
Jörg Thalheim
c02ecc2f67
tests/command: also wait for exit status
2024-11-04 12:57:07 +01:00
danjujan
75ffb4436e
pkgs: fix typos
2024-10-29 12:37:34 +00:00
DavHau
33d049915c
vars: fix shared dependency was not resolved correctly
2024-10-23 20:43:33 +07:00
Jörg Thalheim
4af1954abf
ruff: enable warning lints
2024-10-23 09:06:02 +00:00
Jörg Thalheim
eb481d6cff
test_modules: add missing check argument
2024-10-23 09:50:08 +02:00
Johannes Kirschbauer
3bc2991903
Serde: fixup & tests after changed serialization
2024-10-18 12:42:35 +02:00
Jörg Thalheim
973aef72d3
properly support verbatim ipv6 addresses
2024-10-10 17:03:32 +02:00
DavHau
29f70640ef
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
0ead8dd879
drop optionsNix
2024-10-09 13:22:06 +02:00
Jörg Thalheim
1ac8f6914d
drop old settings code
2024-10-09 12:16:00 +02:00
Jörg Thalheim
d537e1a91c
remove machine settings.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
349db434fc
test_vars_deployment: set hostPlatform depending on current system
2024-10-09 12:08:23 +02:00
Jörg Thalheim
c95371d583
test_modules: initialize minimal facter.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
9cdd55acf4
drop "system" argument from inventory
2024-10-09 12:07:58 +02:00
Jörg Thalheim
c620ee9d90
fixtures_flake: drop unused substitutions
2024-10-09 12:07:58 +02:00
Jörg Thalheim
4655199028
tests: set git author name + email via environment variables
2024-10-09 12:07:58 +02:00
Jörg Thalheim
0e8f168e1e
no longer write deprecated settings.json in tests
2024-10-09 12:02:10 +02:00
Jörg Thalheim
d2d72e28e8
re-use gpg key across tests
2024-10-09 11:56:41 +02:00
Jörg Thalheim
cfb8df33a1
fix missing hostPlatform in test_vars
2024-10-09 11:56:36 +02:00
Jörg Thalheim
7c97c3b5be
test_vars_deployment: fix test
2024-10-08 17:51:55 +00:00
Jörg Thalheim
1ed04fb51e
vms/run: better defaults for run api
2024-10-08 17:51:55 +00:00
Jörg Thalheim
cf3c67d830
expose the option to run commands in virtual machines
2024-10-08 17:51:55 +00:00
Jörg Thalheim
318b46d4f6
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