!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

331 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena117 Servers

Load older messages


SenderMessageTime
2 Jul 2022
@huyage:matrix.orglemmalamma
In reply to @buckley310:matrix.org
$SSH_CONFIG_FILE
This is not documented yet right? I'm happy to open a quick PR to include this info
18:05:15
@buckley310:matrix.orgBuckley I seem to recall finding it in some documentation somewhere, but I’m not totally sure 18:08:02
@buckley310:matrix.orgBuckley I’ve been in the codebase so can’t say for sure 18:08:18
@huyage:matrix.orglemmalamma
In reply to @buckley310:matrix.org
I seem to recall finding it in some documentation somewhere, but I’m not totally sure
OK. I'll check. Thanks
18:08:43
4 Jul 2022
@kritnich:kritni.chKritnich
In reply to @huyage:matrix.org

For each secret file deployed using deployment.keys, a systemd service with the name of ${name}-key.service is created

So you can do something like:

systemd.services.<name>.partOf = ["secret-key.service"];
Thanks for the pointer, I'm not sure if that will work because I don't think the service restarts since it only checks for existence and not modification in ${secret}-key.path but I'll test around a little
10:14:04
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @kritnich:kritni.ch
Thanks for the pointer, I'm not sure if that will work because I don't think the service restarts since it only checks for existence and not modification in ${secret}-key.path but I'll test around a little
Wasn't the reason for having a service unit instead of a path unit to be explicitly able to monitor for changes?
11:37:34
@schnecfk:ruhr-uni-bochum.deCRTifiedOh no, it only monitors for deletion https://github.com/zhaofengli/colmena/blob/main/src/nix/hive/modules.nix#L85-L9311:39:09
@huyage:matrix.orglemmalamma
In reply to @kritnich:kritni.ch
Thanks for the pointer, I'm not sure if that will work because I don't think the service restarts since it only checks for existence and not modification in ${secret}-key.path but I'll test around a little
Oh you meant edit to the key after it has been deployed. My problem was the service would not restart after colmena apply with a new key. Systemd PartOf is how I solved that.
16:22:11
5 Jul 2022
@rgrunbla:matrix.orgRémy Grünblatt changed their display name from Reventlov to Rémy Grünblatt.12:36:39
@garionion:entr0py.degarionion joined the room.16:49:40
@silvio:booq.orgSilvio joined the room.17:59:33
9 Jul 2022
@blaggacao:matrix.orgDavid Arnold (blaggacao) Zhaofeng Li: std, which - as you know & even if one might disagree - doesn't really tolerate non-std flake schemata is gaining traction. A native colmena deployment clade is increasingly a topic among its users. I rebased the eval.nix "simplification", which is indeed pure cosmetics, but might be a stepping stone in agreeing in a semi-public interface to decouple the value added of colmena from it's flake-frameworkish part. 20:52:32
@blaggacao:matrix.orgDavid Arnold (blaggacao)* Zhaofeng Li: `std`, which - as you know & even if one might disagree - doesn't really tolerate non-std flake schemata is gaining traction. A native colmena deployment clade is increasingly a topic among its users. I rebased the eval.nix "simplification", which is indeed pure cosmetics, but might be a stepping stone in agreeing in a semi-public interface to decouple the value added of colmena from it's incompatible flake-frameworkish part.20:53:02
@devusb:matrix.orgdevusb joined the room.20:55:58
@blaggacao:matrix.orgDavid Arnold (blaggacao)Redacted or Malformed Event21:00:27
@blaggacao:matrix.orgDavid Arnold (blaggacao) * Zhaofeng Li: std, which - as you know & even if one might disagree - doesn't really tolerate non-std flake schemata is gaining traction. A native colmena deployment clade is increasingly a topic among its users. I rebased the eval.nix "simplification", which is indeed pure cosmetics, but might be a stepping stone in agreeing in a semi-public interface to decouple the value added of colmena from it's incompatible flake-frameworkish part. (And even consuming colmena without it's flake framework might feel odd, I know) 21:06:07
@blaggacao:matrix.orgDavid Arnold (blaggacao)

And even consuming colmena without it's flake framework might feel odd, I know

If it's an argument,think about that in certain (big) monorepo scenarios, the flake.nix is too much of a precious space so that it cannot accomodate NxM flake-based frameworks, but only one.

21:07:11
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

And even consuming colmena without it's flake framework might feel odd, I know

If it's a legit argument: think about that in certain (big) monorepo scenarios, the flake.nix is too much of a precious space so that it cannot accomodate NxM flake-based frameworks, but only one.

21:07:29
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

And even consuming colmena without it's flake framework might feel odd, I know

If it's a legit argument: think about that in certain (big) monorepo scenarios, the flake.nix is too much of a precious space so that it cannot accomodate NxM flake-based frameworks, but only one, in order to make the life of 20%-half-hearted & reluctant nix users a tid bit easier.

21:08:18
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

And even consuming colmena without it's flake framework might feel odd, I know

If it's a legit argument: think about that in certain (big) monorepo scenarios, the flake.nix is too much of a precious space so that it cannot accomodate NxM flake-based frameworks, but only one, in order to make the life of 20%-half-hearted & reluctant nix users a tid bit easier (by maintaining intact their principled understanding of a flake.nix).

21:08:45
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

And even consuming colmena without it's flake framework might feel odd, I know

If it's a legit argument: think about that in certain (big) monorepo scenarios, the flake.nix is too much of a precious space so that it cannot accomodate NxM flake-based frameworks, but only one, in order to make the life of 20%-half-hearted & reluctant nix users a tid bit easier (by maintaining intact their principled understanding of a flake.nix - without years of special subject matter training).

21:09:41
11 Jul 2022
@jairo:recallstack.icuJairo Llopis joined the room.10:58:13
@jairo:recallstack.icuJairo Llopis Hi folks! I'm new to colmena and I like that it seems well maintained, fast, flake-oriented, easy and stateless. Cool!
However, regarding the stateless part, I like it because I actually keep state elsewhere: in Terraform.
Until today, I got wired a Terraform output with a one-line Ansible dynamic inventory script and it has worked very nice until now: terraform generates the inventory and Ansible consumes it and applies roles.
Moving to Colmena means dumping Ansible. How can I feed a dynamic inventory into Colmena? Does it have such concept? Or maybe I'm misunderstanding something...
11:07:08
@schnecfk:ruhr-uni-bochum.deCRTified If you can use JSON as terraform output, you could try using builtins.fromJSON to generate your system configs "on the fly". That's probably more on the nix-side than on the colmena one 11:09:23
@schnecfk:ruhr-uni-bochum.deCRTifiedAt least that's what I'd probably do (but I do not use terraform, so my understanding of that part might be a bit limited)11:09:51
@jairo:recallstack.icuJairo LlopisYes, that was my initial thought. I'm just wondering if the pure nature of flakes will just build that script once and never execute it again. 🤔11:11:26
@jairo:recallstack.icuJairo LlopisIt'd be an IFD in any case, I hope also that's no problem11:11:45
@jairo:recallstack.icuJairo Llopislet me do some tests11:11:58
@schnecfk:ruhr-uni-bochum.deCRTified

So right now I'd imagine a workflow similar to:

  1. Terraform creates the infrastructure
  2. Terraform generates a json output of that infrastructure
  3. nix/colmena consumes it to generate the appropriate config (I'd guess mainly modifying the deployment-keys, while keeping the larger portion of the config in "pure" config files) - this might require impure flake evaluation
  4. colmena deploys the config
11:14:22
@schnecfk:ruhr-uni-bochum.deCRTifiedPlease correct me if that is wrong 😄11:14:32

Show newer messages


Back to Room ListRoom Version: 6