!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
19 Jun 2023
@rendakuenthusiast:imperishable.namerendakuenthusiastanyway that seems to work06:03:19
@rendakuenthusiast:imperishable.namerendakuenthusiastand that did update my flake.lock06:03:35
@rendakuenthusiast:imperishable.namerendakuenthusiastwith actually kind of a lot of stuff. I set up that flake I'm importing myself, like two days ago, I may not have done it correctly06:04:23
@rendakuenthusiast:imperishable.namerendakuenthusiastbut in any case I can deploy06:04:25
@rendakuenthusiast:imperishable.namerendakuenthusiastthanks for your help!06:04:29
22 Jun 2023
@h4636oh:matrix.org@h4636oh:matrix.org joined the room.02:47:16
@h4636oh:matrix.org@h4636oh:matrix.org left the room.03:37:55
@a-kenji:matrix.orgkenji joined the room.05:55:29
@palo:xaos.space@palo:xaos.space

I'm sketching an Architecture for a service in an openstack cluster, which consists of multiple machines (and there will be new machines every now and than). I would like to have one machine that shares it's /nix/store with all the other instanzes in the cluster. That is not a problem. I have a mono repository and would like to build all machines (not deploy) and nix-copy-closure the resulting closures to this machine. Meaning the build server (which is not the cache server) is in a loop while true; git pull ; colmena build ; nix-copy-closure ???? private_cache_server How to find all closures that need to be copied?

08:12:45
@whentze:matrix.orgWanja Hentzewould you even be using colmena then? sounds more like you'd be reimplementing it08:14:48
@palo:xaos.space@palo:xaos.space

I want to use colmena. Because we would not deploy all machines instantly.

08:15:40
@palo:xaos.space@palo:xaos.space

I just want to enrich the cache.

08:16:07
@whentze:matrix.orgWanja Hentzeoh, cache warming08:16:37
@palo:xaos.space@palo:xaos.space

All machines have a very similar base setup, and updates should be pulled from the cache, to avoid uploading 50 times the same closures from my office to the data center.

08:18:00
@whentze:matrix.orgWanja Hentzethen why not use `colmena apply push`08:18:07
@palo:xaos.space@palo:xaos.space
In reply to @palo:xaos.space

All machines have a very similar base setup, and updates should be pulled from the cache, to avoid uploading 50 times the same closures from my office to the data center.

(I answered before you asked :D)

08:20:52
@palo:xaos.space@palo:xaos.spaceThe only solution I found so far is, a cache server that also creates the builds.08:21:33
@palo:xaos.space@palo:xaos.space

(and use the buildOnTarget option)

08:21:59
@palo:xaos.space@palo:xaos.space

Or I push always all closures on a differnt build server.

08:23:37
@palo:xaos.space@palo:xaos.spaceHmm that is good enough for me.08:23:50
@palo:xaos.space@palo:xaos.spaceThanks for your input @wa08:23:56
@palo:xaos.space@palo:xaos.space * Thanks for your input @[Wanja Hentze] 08:24:12
23 Jun 2023
@bl1nk:matrix.orgbl1nkRedacted or Malformed Event07:47:54
@bl1nk:matrix.orgbl1nk

Alright, next try to get this formatted correctly...

I recently updated to colmena 0.4.0 and cannot deploy from my Mac anymore:

~/.co/nixpkgs main ▷ nix develop -c colmena apply --on elara
[INFO ] Using flake: git+file:///Users/markuscisler/.config/nixpkgs
[INFO ] Enumerating nodes...
error:
       … while calling the 'attrNames' builtin

         at «string»:1:209:

            1| with builtins; let assets = getFlake "path:/tmp/nix-shell.9futSw/colmena-assets-0CsIT0?lastModified=1687506045&narHash=sha256-6Mfqk77CvYUqLBAWSiOuxaeT%2Bi2EF06vZHsFgILLuFU%3D"; hive = assets.processFlake; in attrNames hive.nodes
             |                                                                                                                                                                                                                 ^

       … while evaluating the attribute 'nodes'

         at /nix/store/vfamvq9dh5qiz0b3f6pbkkf77kqkmpr8-source/eval.nix:186:3:

          185|
          186|   nodes = listToAttrs (map (name: { inherit name; value = evalNode name (configsFor name); }) nodeNames);
             |   ^
          187|   toplevel =         lib.mapAttrs (_: v: v.config.system.build.toplevel) nodes;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'currentSystem' missing

       at /nix/store/b90clwdlidf3s95m73jsby3ikfa56h91-source/pkgs/top-level/impure.nix:17:43:

           16|   # (build, in GNU Autotools parlance) platform.
           17|   localSystem ? { system = args.system or builtins.currentSystem; }
             |                                           ^
           18|
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace

The relevant parts from my flake.nix are:

      colmena = {
        meta = {
          specialArgs = { inherit inputs; };

          nixpkgs = import inputs.nixpkgs-stable { };
          nodeNixpkgs = {
            kerala = import inputs.nixpkgs-2305 { };
          };
        };
        defaults = import ./nixos/remote-defaults;

        elara = { name, nodes, ... }: {
          deployment = {
            buildOnTarget = true;
            #targetHost = "192.168.10.2";
            targetHost = "100.66.68.66";
          };
          nixpkgs.system = "x86_64-linux";
          imports = [ ./machines/elara.nix ];
        };
      };

Any hints on what is going on here?

07:51:59
@zhaofeng:zhaofeng.liZhaofeng Li Change nixpkgs = import inputs.nixpkgs-stable { }; to nixpkgs = import inputs.nixpkgs-stable { system = "x86_64-linux"; }; and similarly for nodeNixpkgs.kerala below 07:55:26
@zhaofeng:zhaofeng.liZhaofeng Li The reason is that with Colmena 0.4.0, flake evaluation is now actually pure so things like builtins.currentSystem aren't available anymore 07:56:06
@bl1nk:matrix.orgbl1nk Can I still override the system for aarch64 machines using nixpkgs.system in the node block? 07:56:35
@zhaofeng:zhaofeng.liZhaofeng LiYes, that'll still work07:56:51
@bl1nk:matrix.orgbl1nkThanks!07:59:50
@bl1nk:matrix.orgbl1nk(For the record: that solved my problem)08:03:47

Show newer messages


Back to Room ListRoom Version: 6