Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delft: allow deployment through colemena #400

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

mweinelt
Copy link
Member

@mweinelt mweinelt commented Mar 7, 2024

Provide an output that translates nixosConfigurations to a colmena- compatible output.

Colmena provides a convenient wrapper around building and deploying machines, than the bare nixos-rebuild we had been using up until now.

Provide an output that translates nixosConfigurations to a colmena-
compatible output.

Colmena provides a convenient wrapper around building and deploying
machines, than the bare nixos-rebuild we had been using up until now.
@mweinelt mweinelt requested a review from a team as a code owner March 7, 2024 16:54
@mweinelt
Copy link
Member Author

mweinelt commented Mar 7, 2024

❯ colmena build
[INFO ] Using flake: git+file:///home/hexa/git/nixos/infra?dir=delft
[INFO ] Enumerating nodes...
[INFO ] Selected all 3 nodes.
       ✅ 3m All done!
 (...) ✅ 24s Evaluated pluto, rhea, and haumea
haumea ✅ 1s Built "/nix/store/6ad5kxcgj7h762kl837jkv0nq3k7yl41-nixos-system-haumea-23.11.20240228.747e63c"
 pluto ✅ 1s Built "/nix/store/c6nrj676rybwbxwccmb3a3szc3csl2qx-nixos-system-pluto-23.11.20240228.747e63c"
  rhea ✅ 2m Built "/nix/store/vh47l0l2fy0wfppw1lhwsk6rwj02qrq7-nixos-system-rhea-23.11.20240228.747e63c"   

@RaitoBezarius
Copy link
Member

So you may want to grab a fresh copy of zhaofengli/colmena#198 it's really good.

@mweinelt
Copy link
Member Author

mweinelt commented Mar 7, 2024

I think incremental improvements are fine. This looks decent, and I would like to defer to @zhaofengli regarding its integration in colmena.

@lf-
Copy link
Member

lf- commented Mar 10, 2024

I think incremental improvements are fine. This looks decent, and I would like to defer to @zhaofengli regarding its integration in colmena.

imo just copy the wrapper to your own repo because it's not obvious how this stuff can be made applicable to all repos with stuff like main vs master and so on, and the way the script works is relatively self-descriptive. It's in a contrib directory and licensed CC0 for that reason: it works perfectly but any properly generalized solution will be much harder to implement and one might want customization anyway, so it seems reasonable to just do an easy fix now and if a nicer feature happens, adopt that.

bonus win with the script: you can easily modify it to nixos-rebuild as well, if you want.

@zimbatm zimbatm merged commit b24c882 into master Mar 11, 2024
2 checks passed
@zimbatm zimbatm deleted the build-infra-colmena branch March 11, 2024 08:32
@zimbatm
Copy link
Member

zimbatm commented Mar 11, 2024

too bad colmena doesn't work for the macOS boxes, but it at least makes the NixOS boxes easier to deploy.

@delroth
Copy link
Contributor

delroth commented Mar 11, 2024 via email

@RaitoBezarius
Copy link
Member

In theory doesn't colmena only require SSH and a switch-to-configuration script? It might not be impossible to make it work with nix-darwin.

On Mon, 11 Mar 2024, 17:33 Jonas Chevalier, @.> wrote: too bad colmena doesn't work for the macOS boxes, but it at least makes the NixOS boxes easier to deploy. — Reply to this email directly, view it on GitHub <#400 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABRQLTMMB46E7J6NAUJXN3YXVT7FAVCNFSM6AAAAABELLRMQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXHA3TCMRVGE . You are receiving this because your review was requested.Message ID: @.>

Yes, I am planning to introduce generic hooks for "bring your own switch-to-configuration logic" for Liminix and others systems, we discussed it in https://matrix.to/#/!UKDpaKNNsBpOPfLWfX:zhaofeng.li/$DFKVuVYaMjCn1drriPf2xA9w9Qwl4yMB07dxnbQKgHM?via=nixos.org&via=matrix.org&via=nixos.dev FWIW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants