Colmena | 304 Members | |
| A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena | 104 Servers |
| Sender | Message | Time |
|---|---|---|
| 3 Dec 2023 | ||
In reply to @sivertism:matrix.org Looks like the iptsd setup in nixos-hardware does https://github.com/NixOS/nixos-hardware/blob/a89745edd5f657e2e5be5ed1bea86725ca78d92e/microsoft/surface/common/ipts/default.nix#L42 | 17:31:50 | |
If you don't have the driver, then iptsd-find-hidraw presumably returns nothing | 17:32:15 | |
| hence "DEVICE is required" | 17:32:34 | |
| Ah, that makes sense. Thanks! | 18:00:45 | |
| 4 Dec 2023 | ||
| Sivert: I felt compelled to make a blog post out of it, I hope you don't mind https://blog.tiserbox.com/posts/2023-12-03-2-deploy-to-nix-os-without-root-user.html | 04:15:19 | |
| Not at all, I think it's a good idea to have all the steps in one place 👍️ | 05:23:42 | |
| 5 Dec 2023 | ||
| 00:38:02 | ||
| 7 Dec 2023 | ||
| 03:55:45 | ||
| 11 Dec 2023 | ||
colmena, when used in a flake, requires that one sets colmena.meta.nixpkgs, and that definition typically takes the system argument. I have a flake with configs for aarch64-linux and x86_64-linux, generating the nixosConfigurations entries using nixpkgs.lib.nixosSystem that also takes the system argument. now, if I don't additionally explicitly set nixpkgs.system for all the hosts, building the configs using nixos-rebuild or nix build or whatever works correctly, but colmena appears to set the system for all the hosts to whatever is passed as system argument to colmena.meta.nixpkgs (colmena eval -E '{ nodes, ... }: nodes.scylla.config.nixpkgs.system' returns wrong value).Is there a workaround for that, that wouldn't involve setting nixpkgs.system explicitly, or adding nodeNixpkgs = builtins.mapAttrs (name: value: value.pkgs) conf; (this duplicates contents of nixpkgs.overlays which can cause other issues)? | 14:34:17 | |
| 23:20:53 | ||
| Colmena is stateless; nixops carries a small amount of state (e.g. system.stateVersion, ssh keys). I happen to like having that state managed for me, and it shouldn't be too hard to make an external tool to do this. Has someone written a tool to do so with Colmena, or should I write one? | 23:50:17 | |
| 12 Dec 2023 | ||
| not to my knowledge | 01:51:27 | |
| sounds lime a good thing to have available though! | 01:51:36 | |
| * sounds like a good thing to have available though! | 01:51:56 | |
| Jasom can you elaborate on what this state management or I guess the lack of thereof means in practice? I don’t remember ever having to deal with that. | 01:58:42 | |
In reply to @ibizaman:matrix.orgThe system.stateVersion is the biggest one; if it goes in your configuration, then if you wipe a VM (or machine for that matter) and reprovision, it will be wrong if you've ever upgraded nixos to a new release. If it's not in your configuration then it will be wrong as soon as you upgrade to a new release. Nixops kept track of this (and some other state). IIRC it gave each machine a unique ID, checked that it hadn't changed and stored the information in an SQLite database in ~/.nixops. It also performs ssh key management for you, generating (and storing) a private key for each machine and adding the public key to the authorized_keys on the remote. I suspect there's other things it does as well, but I haven't dug too deeply. | 04:11:05 | |
| To clarify, I think Colmena not doing these things is the right choice, since e.g. auto-provisioning new VMs in the cloud is out-of-scope and silently storing unencrypted keys that allow root access to servers in the user's home directory is a ... suboptimal default. However authentication still needs to happen, so I'm pondering a tool that would work along-side Colmena to do some of these things. | 04:15:31 | |
| I see, indeed I needed to do some manual work to generate a ssh key and add it to the target. | 04:17:20 | |
| I remember reading about stateVersion, it makes sure you're introducing only backwards compatible changes and you can update it when you went through all the manual steps outlined in the release notes. | 04:18:17 | |
| 16 Dec 2023 | ||
| 18:17:13 | ||
| 17 Dec 2023 | ||
| 17:51:29 | ||
| 19 Dec 2023 | ||
| 04:59:03 | ||
| Jasom: I need a tool like this too! I am open to contribute! | 05:04:04 | |
| 10:34:24 | ||
| 20 Dec 2023 | ||
| 23:31:29 | ||
| 21 Dec 2023 | ||
| 14:13:55 | ||
| 22 Dec 2023 | ||
| 06:58:40 | ||
| 23 Dec 2023 | ||
| 01:55:58 | ||
| 22:21:50 | ||
| 24 Dec 2023 | ||
| 14:03:45 | ||