Colmena | 301 Members | |
| A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena | 101 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Apr 2023 | ||
In reply to @me:indeednotjames.com building to verify feels wrong in an environment where all inputs (config & packages) is managed declaratively. the list of affected hosts should be queryable - e.g. within a CI/CD pipeline because we have all the inventory information available | 19:44:51 | |
In reply to @dantefromhell:matrix.org I am confused. you can probably use a pre-apply hook, to fetch the current system generation and compare it with your locally build one (you are trying to apply) and stop if they are already the same or whatever. | 19:55:09 | |
| we built something like that at work, kinda | 20:21:19 | |
| but it's quite intertwined with our own CI logic | 20:21:34 | |
| definitely works | 20:21:37 | |
In reply to @me:indeednotjames.com* building to verify feels wrong in an environment where all inputs (config & packages) are managed declaratively. the list of affected hosts should be queryable - e.g. within a CI/CD pipeline because we have all the inventory information available | 22:56:02 | |
I disagree. For 1 commit this query should always be doable without contacting any host because the desired inventory state is declared. The situation I can think of where you need to check the deployed closures is if you are trying to solve "configuration drift" and deployment of patches with a single solution - which is kinda the common pattern in non-declarative environments. But if you're looking at config drift (which I'm still wondering if that can actually be a reasonable thing within NixOS given the generations mechanism 🤔) and the "affected query" as 2 separate problems the aforementioned query actually becomes independent of colmena itself (and therefore the stateless limitation). | 23:01:33 | |
*
I disagree. For 1 commit this query should always be doable without contacting a host because the old & new desired state is clearly defined. The situation I can think of where you need to check the deployed closures is if you are trying to solve "configuration drift" and deployment of patches with a single solution - which is kinda the common pattern in non-declarative environments. But if you're looking at config drift (which I'm still wondering if that can actually be a reasonable thing within NixOS given the generations mechanism 🤔) and the "affected query" as 2 separate problems the aforementioned query actually becomes independent of colmena itself (and therefore the stateless limitation). | 23:03:20 | |
*
I disagree. For 1 commit this query should always be doable without contacting a host because the old & new desired state are clearly defined. The situation I can think of where you need to check the deployed closures is if you are trying to solve "configuration drift" and deployment of patches with a single solution - which is kinda the common pattern in non-declarative environments. But if you're looking at config drift (which I'm still wondering if that can actually be a reasonable thing within NixOS given the generations mechanism 🤔) and the "affected query" as 2 separate problems the aforementioned query actually becomes independent of colmena itself (and therefore the stateless limitation). | 23:04:24 | |
In reply to @whentze:matrix.orgsweet! Is any of the work publicly available for inspiration? | 23:04:35 | |
| here's another question occupying my mind as I'm thinking about the structure for a new hive. From reading past conversations in this channel it seems that one can define a host in (at least) 3 different ways
As I'm guessing there's no "decision chart" available 😉 Could y'all help me to figure out what the pros/ cons/ limitations for the approaches are? | 23:18:04 | |
In reply to @dantefromhell:matrix.orgsadly no, but this part is pretty banal | 23:44:23 | |
| basically our CI builds all hosts and then checks for each one if the built hash is different than the one on there | 23:44:53 | |
| where it differs, it creates a deployment job | 23:45:05 | |
| in order to not have to SSH to check the hashes (which also works though) we have a little activation script that writes the current system hash to a textfile where the Prometheus node exporter (via plaintext exporter) picks it up so you can querry it via monitoring | 23:46:30 | |
| yes indeed we check the real deployment precisely to solve configuration drift | 23:47:46 | |
| looking at a commit and saying which hosts it changes would be super useful though, for code review for example | 23:49:42 | |
| 11 Apr 2023 | ||
| 15:02:29 | ||
| 15:09:39 | ||
| 15:29:23 | ||
| 12 Apr 2023 | ||
| 09:11:10 | ||
| 15:26:03 | ||
| 15:31:25 | ||
| 21:27:22 | ||
| 21:28:08 | ||
| 21:30:35 | ||
| 21:41:17 | ||
| 21:42:27 | ||
| 13 Apr 2023 | ||
| 00:13:02 | ||
| hi there, I am trying to move from morph to colmena, having some trouble | 00:13:27 | |