colmena
colmena copied to clipboard
Boostrapping from ISO
- Suppose I have a headless machine with link-local connectivity
- That machine has a specially prepared live iso with a well-known (static & link-local) ip address
- The mount point of the store is to be construed at
/mnt/nix/...
- Let's call the still anonymous host (no own IP, no crypto identiy)
larva
- Now we want to:
colmena apply --on butterfly --over [fe80::47]:2222 --store /mnt/nix
Can you give me a few pointers where to implement this?
- Option 1:
colmena bootstrap butterfly --over [fe80::47]:2222
- colmena takes care of the mounting and formatting - Option 2: as above - mounting and formatting is to be manual step over ssh
For this usecase, I currently use an external script that calls colmena eval
to evaluate and build system profiles outside of the normal deployment flow: https://github.com/zhaofengli/colmena/issues/42#issuecomment-1004528027
Awesome, thank you.
Why are you using nix-env
& nix-build
instead of nix profile
& nix build
?
But still nix copy
.
Why are you using
nix-env
&nix-build
instead ofnix profile
&nix build
?But still nix copy.
Oops, missed this one. nix profile
is not compatible with nix-env
and has different semantics. The output of nix-build
is also easier to work with in scripts compared to nix build --json
.
I'm using nix copy
instead of nix-copy-closure
because the former allows you to directly copy to a chroot store.
Notably nix profile
doesn't support priority
, yet. This leads sometimes to installation failures.
We have a simple python installer wizard on a custom image, which formats the disk with labels according to a standard, sets up the correct IP address and sets up SSH with proper users. After that is run, we can simply adopt with colmena.
Maybe a similar approach could work for you too?
@dminuoso is it available somewhere?