!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

You have reached the beginning of time (for this room).


SenderMessageTime
30 Jun 2022
@huyage:matrix.orglemmalamma I ended up writing a script to generate a ssh config and Includeing that file from ~/.ssh/config which is ok for now 08:37:24
2 Jul 2022
@kritnich:kritni.ch@kritnich:kritni.ch joined the room.13:40:13
@kritnich:kritni.ch@kritnich:kritni.chI saw there is a way to make services dependent on certain keys. Is there a way to make services restart/reload once a key has been changed?13:50:23
@huyage:matrix.orglemmalamma
In reply to @kritnich:kritni.ch
I saw there is a way to make services dependent on certain keys. Is there a way to make services restart/reload once a key has been changed?

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"];
18:03:44
@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.ch@kritnich:kritni.ch
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.de@schnecfk:ruhr-uni-bochum.de
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.de@schnecfk:ruhr-uni-bochum.deOh 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

Show newer messages


Back to Room ListRoom Version: 6