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

Boostrapping from ISO #68

Open
blaggacao opened this issue Mar 30, 2022 · 6 comments
Open

Boostrapping from ISO #68

blaggacao opened this issue Mar 30, 2022 · 6 comments

Comments

@blaggacao
Copy link
Contributor

blaggacao commented Mar 30, 2022

  • 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
@zhaofengli
Copy link
Owner

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: #42 (comment)

@blaggacao
Copy link
Contributor Author

Awesome, thank you.

Why are you using nix-env & nix-build instead of nix profile & nix build?

But still nix copy.

@zhaofengli
Copy link
Owner

Why are you using nix-env & nix-build instead of nix 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.

@blaggacao
Copy link
Contributor Author

Notably nix profile doesn't support priority, yet. This leads sometimes to installation failures.

@dminuoso
Copy link
Contributor

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?

@otavio
Copy link
Contributor

otavio commented May 24, 2022

@dminuoso is it available somewhere?

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

No branches or pull requests

4 participants