-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Hetzner Cloud support #35
Comments
BTW until that is done, I've successfully brought NixOS onto the new Hetzner Cloud machines by using https://github.com/jeaye/nixos-in-place; it worked at first try. CC @jeaye |
Hetzner Cloud now also offers an NixOS ISO to boot the server in rescue mode with. |
@eliasp Where can I find that ISO? |
Ah, I see it in the GUI under |
I've got a working prototype in https://github.com/nh2/nixops/tree/hetznercloud Currently requires the user to first make a NixOS snapshot as described on jeaye/nixos-in-place#41 |
Hey! Just putting this out here: https://github.com/hetznercloud/awesome-hcloud There's also a little sponsoring plan going on for which this project might be eligible: |
There's significant costs to keeping your own nixos snapshot on hetzner cloud (close to the cost of running a server). It would be great if the existing NixOS 18.03 iso which can be mounted on any running instance could be installed over ubuntu/debian/whatever and thus bring up NixOS without needing to pay for a snapshot. That would be significantly cheaper. |
fyi, this is the API for attaching the NixOS ISO to a running server: https://docs.hetzner.cloud/#resources-server-actions-post-13 |
This is based on the digital ocean backend. It also uses nixos-infect. I extended nixos-infect to be generic for both backends. Fixes #855
This is based on the digital ocean backend. It also uses nixos-infect. I extended nixos-infect to be generic for both backends. Fixes #855
I'm planning to use @cleverca22's kexec approach (see here to get rid of the snapshot requirement. A bit surprised about the
though, isn't it just "€ 0.01/GB per month"? |
@nh2 Any progress on this? I might have reason to help a little, and would like to know where I should start. |
It looks like there's a NixOS ISO available on Hetzner now. Using that should be much simpler than kexec. EDIT: ...is what I thought initially, but there seems to be no way to programmatically access the console. Hmm. Maybe not, then. |
I was able to easily install nixos by mounting the ISO, rebooting and using the remote console. But you're probably right that it isn't automatable. Also the ISO could be updated I think. |
This is based on the digital ocean backend. It also uses nixos-infect. I extended nixos-infect to be generic for both backends. Fixes #855
This is based on the digital ocean backend. It also uses nixos-infect. I extended nixos-infect to be generic for both backends. Fixes #855
The Python API I used for my prototype is now deprecated: lsymds/hetznercloud-py#8 (comment) Hetzner has a new official Python API: https://github.com/hetznercloud/hcloud-python |
I've just written a simple script to install NixOS from the Hetzner Cloud provided NixOS ISO image: https://gist.github.com/nh2/c02612e05d1a0f5dc9fd50dda04b3e48 |
Thanks @nh2 for you work, a version with luks/encrypted option could be really cool. Like here : https://gitlab.com/shellmachine/nixos-config-phoenix/-/blob/master/phoenix/nixos-init.sh |
I got an email about https://github.com/lukebfox/nixops-hetznercloud being created out of this but it seems to disappeared here now. |
Hey! I'm the author of the nixops-hetznercloud plugin. It seemed like this was a wanted integration that no one really had the time to complete. I've pulled together the ideas in this thread and wrote the start of a NixOps 2.0 plugin for managing both servers and resources. It uses the hcloud python library from hetznercloud, and a stripped down nixos-infect. Please go break it! In regards to the email, I posted a comment here similar to my words above but decided to hold off releasing it until nixops#1410 was merged so that the plugin could be mixed with other plugins in https://github.com/lukebfox/nixops-plugged, and people could easily start using it. In any case the patch hasn't been merged yet, and I got tired of waiting therefore currently nixops-plugged will let you use the hetznercloud plugin, but to avoid a (nixops) dependency conflict with other plugins you can't mix it with other plugins just yet. Thanks for the work so far everyone and I'm looking forward to some fresh issues as there is much work still to be done :) |
A few days ago Hetzner made public their new Cloud platform including very cheap and powerful VM servers and a new API to allocate and manage them.
It would be great for NixOps to support it.
Here are the API docs, they have extensive examples.
These VMs also support the Hetzner Rescue Mode which should make it relatively easy to get NixOS onto them.
The text was updated successfully, but these errors were encountered: