!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
5 Sep 2022
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @aanderse:nixos.dev
i can't point colmena to a flake online yet, can i?
like colmena apply --config github:aanderse/my-colmena-network/main
I think you can, tried it and got a 404 error so it did try to fetch
19:36:41
@zhaofeng:zhaofeng.liZhaofeng LiIt should work with any valid Flake URI19:36:51
@aanderse:nixos.devaanderseoh stupid me i had a typo... it did work! thanks ❤️19:38:37
@aanderse:nixos.devaanderse super cool
i can't get enough colmena! 🚀
19:39:25
6 Sep 2022
@dantefromhell:matrix.orgdantefromhellis there a good way to setup a "multi hive" colmena? multi hive meaning multiple enviroments that are logically separate (e.g. customers) but that share common blueprints?12:58:51
@yuka:yuka.dev@yuka:yuka.devSeparate them by deployment tags?13:02:02
@v:meowy.tech@v:meowy.techyeah that's what I'm doing13:02:28
7 Sep 2022
@mlyx:matrix.org@mlyx:matrix.org left the room.23:30:27
8 Sep 2022
@whentze:matrix.orgWanja Hentzehey, is there a way to evaluate a colmena node or hive from plain nix? (i.e. without calling the CLI)08:14:58
@yuka:yuka.dev@yuka:yuka.dev
In reply to @yuka:yuka.dev
    nixosConfigurations = (import (inputs.colmena + "/src/nix/hive/eval.nix") {
      rawFlake = self;
      colmenaOptions = import (inputs.colmena + "/src/nix/hive/options.nix");
      colmenaModules = import (inputs.colmena + "/src/nix/hive/modules.nix");
    }).nodes;
Wanja Hentze:
09:08:58
@whentze:matrix.orgWanja Hentzevery cool, thanks!11:59:16
14 Sep 2022
@palo:xaos.space@palo:xaos.space joined the room.04:06:46
@palo:xaos.space@palo:xaos.space

Hey, I'm using colmena to provison a machine (in another continent) I set deployment.buildOnTarget = true and ran colmena apply -v and I see that it's copying a lot of dervations (2399 paths) from my local machine to the target machine. Among these derivations are things like
91wqgl41iwq10kp3kp5v9386xsjd3hw2-texinfo-6.8.drv
jk6nxrnvrr8kzwnfbazsa204hj0acdb2-linux-headers-5.19.drv
v031hl8l2yk3drnw1bc950x9k4wiak0n-texlive-grfext-1.3.drv
Is there a good way to avoid this? Meaning is there a way to only upload the most minimal set of derivations needed?

04:14:26
@palo:xaos.space@palo:xaos.space *

Hey, I'm using colmena to provison a machine (in another continent) I set deployment.buildOnTarget = true and ran colmena apply -v and I see that it's copying a lot of dervations (2399 paths) from my local machine to the target machine. Among these derivations are things like

  • 91wqgl41iwq10kp3kp5v9386xsjd3hw2-texinfo-6.8.drv
  • jk6nxrnvrr8kzwnfbazsa204hj0acdb2-linux-headers-5.19.drv
  • v031hl8l2yk3drnw1bc950x9k4wiak0n-texlive-grfext-1.3.drv
    Is there a good way to avoid this? Meaning is there a way to only upload the most minimal set of derivations needed?
04:15:14
@palo:xaos.space@palo:xaos.space *

Hey, I'm using colmena to provison a machine (in another continent) I set deployment.buildOnTarget = true and ran colmena apply -v and I see that it's copying a lot of dervations (2399 paths) from my local machine to the target machine. Among these derivations are things like

  • 91wqgl41iwq10kp3kp5v9386xsjd3hw2-texinfo-6.8.drv
  • jk6nxrnvrr8kzwnfbazsa204hj0acdb2-linux-headers-5.19.drv
  • v031hl8l2yk3drnw1bc950x9k4wiak0n-texlive-grfext-1.3.drv

Is there a good way to avoid this? Meaning is there a way to only upload the most minimal set of derivations needed?

04:15:27
@zhaofeng:zhaofeng.liZhaofeng LiCurrently this isn't possible before we have remote evaluation, but you can try to minimize the config itself by disabling documentations for example.06:09:57
@palo:xaos.space@palo:xaos.space
In reply to @zhaofeng:zhaofeng.li
Currently this isn't possible before we have remote evaluation, but you can try to minimize the config itself by disabling documentations for example.

Ok, disabled all documentation parts I know of, but maybe I missed something. It's a price for comfort I have to pay I guess :D

08:24:26
@yuka:yuka.dev@yuka:yuka.devsounds like the problem here is that nix-copy-closure is highly latency dependent when copying many small paths?08:38:29
@yuka:yuka.dev@yuka:yuka.devit could be worked around by exporting the entire .drv closure, compressing it, and sending it over08:38:45
@yuka:yuka.dev@yuka:yuka.dev
nix-store --export $(nix-store -qR ...)
 | zstd
 | ssh remote "zstd -d | sudo nix-store --import"
08:40:11
@linus:schreibt.jetztLinux Hackerman Yureka (she/her): recent versions of nix aren't as latency-sensitive in nix copy anymore -- as long as you use ssh-ng and not ssh 08:42:42
@linus:schreibt.jetztLinux Hackerman so nix copy --to ssh-ng://user@host --derivation /nix/store/...-foo.drv should be pretty fast 08:43:07
@yuka:yuka.dev@yuka:yuka.devBut colmena uses ssh:// not ssh-ng://?08:43:31
@linus:schreibt.jetztLinux Hackerman palo: ^ if you copy the drv using the fast method first, colmena won't have much (anything) left to copy 08:43:41
@linus:schreibt.jetztLinux Hackerman Yureka (she/her): I actually have no idea. I suspect that it does, because of using nix-copy-closure (which definitely does use ssh://), but I haven't looked at any code to confirm that. 08:44:18
@whentze:matrix.orgWanja Hentzewhat in the fresh hell is ssh-ng?08:45:19
@yuka:yuka.dev@yuka:yuka.devnext gen :p08:45:28
@whentze:matrix.orgWanja HentzeI figured as much08:45:38
@yuka:yuka.dev@yuka:yuka.dev
proj/nix/src/libstore/legacy-ssh-store.cc
proj/nix/src/libstore/ssh-store.cc
08:47:03
@linus:schreibt.jetztLinux Hackerman it's a newer way for nix to operate, using nix-daemon --stdio instead of nix-store --serve iirc 08:47:05

Show newer messages


Back to Room ListRoom Version: 6