Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add Hetzner Cloud server template and configuration files #254

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

Closed
brymut wants to merge 9 commits into coder:main from brymut:brymut/add-hetzner-template

Conversation

Copy link

@brymut brymut commented Jul 25, 2025
edited
Loading

Closes #209
/claim #209

Description

Added template for Hetzner cloud. Video of template setting up a workspace and connecting using VScode

hetzner.mp4

Updated screen recording with fixes as of 19th Aug, this version shows the provisioning of multiple hetzner instances in coder with dynamic param enabled, running simultaneously and shown in the Hetzner console, checking labels on both the OS Filesystem and on the hetzner console and then shutting down through coder demonstrating clean up on hetzner and deleting workspaces without errors:

hetzner-fix-1.mp4

Type of Change

  • Feature/enhancement

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

#209

@brymut brymut force-pushed the brymut/add-hetzner-template branch from a70dd7c to ca222c3 Compare July 25, 2025 18:48
@brymut brymut force-pushed the brymut/add-hetzner-template branch 2 times, most recently from dacec3a to 6866f01 Compare July 25, 2025 19:34
@brymut brymut marked this pull request as ready for review July 25, 2025 19:34
@brymut brymut force-pushed the brymut/add-hetzner-template branch from ba8b12c to 536aca0 Compare July 29, 2025 15:07
Copy link
Author

brymut commented Jul 30, 2025

Hi @DevelopmentCats, could you please have a quick look when you have a chance?

Copy link
Member

@brymut, can you fix the failing CI? You may need to add an exception to the typos config.

https://github.com/coder/registry/actions/runs/16600024993/job/46963017795?pr=254#step:7:41

Copy link
Author

brymut commented Jul 30, 2025

@matifali Failing CI is because of a variable being mistaken for a spelling mistake. Please check again

Copy link
Member

@brymut you need to add an exception to this in .github/typos.toml

@brymut brymut force-pushed the brymut/add-hetzner-template branch from 536aca0 to 5ff1c7d Compare July 30, 2025 15:09
Copy link
Author

brymut commented Jul 30, 2025
edited
Loading

@brymut you need to add an exception to this in .github/typos.toml

Sorry, I missed that exception handling, I've added the word to the list. Please re-run CI and have a look @matifali

Copy link
Contributor

@DevelopmentCats DevelopmentCats left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I re-ran the CI but its still detecting it as a typo though. You might have to try setting the typo as just hel

brymut reacted with thumbs up emoji
@brymut brymut force-pushed the brymut/add-hetzner-template branch from ba2771b to 19e11a4 Compare July 31, 2025 07:17
Copy link
Author

brymut commented Jul 31, 2025
edited
Loading

I re-ran the CI but its still detecting it as a typo though. You might have to try setting the typo as just hel

Thanks for the feedback, I've tested locally and changing the typo exception to "hel" works. @matifali / @DevelopmentCats could you please re-run the CI

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few suggestions but looks good to me. I will approve after another review.

@brymut brymut force-pushed the brymut/add-hetzner-template branch from 19e11a4 to 96c431c Compare July 31, 2025 07:54
Copy link
Author

brymut commented Jul 31, 2025

Left a few suggestions but looks good to me. I will approve after another review.

Applied requested changes @matifali

Copy link
Author

brymut commented Jul 31, 2025

Hi @bpmct could you please have a look at this?

@brymut brymut force-pushed the brymut/add-hetzner-template branch from ebd9791 to 8c92754 Compare August 1, 2025 07:53
Copy link
Author

brymut commented Aug 1, 2025

Maybe @hugodutka could have a quick look?

@brymut brymut force-pushed the brymut/add-hetzner-template branch from 8c92754 to 6038fba Compare August 4, 2025 09:07
@brymut brymut force-pushed the brymut/add-hetzner-template branch 3 times, most recently from 1b56024 to cab40b4 Compare August 5, 2025 13:55
Copy link
Member

@brymut Hello, the team is pretty busy lately and we haven't been able to give proper attention to your PR.

That said, please refrain from pinging people (and especially at that rate), as it will not make it faster.
@bpmct and @hugodutka are not the go-to people for module reviews, and both are currently at capacity.
Atif (@matifali) has been busy lately, and will look into it when possible.

As you know, we are still a small company and things like this are tough to manage, but sending a lot of messages will only increase how hard it is for us to manage our workload. We are not ignoring your module intentionally, but do understand that with our different roles, there are things we have to prioritize.

I understand that this is important for you, but we are not able to review this instantly, and I will let @matifali and @DevelopmentCats handle this.

Thank you.

Copy link
Contributor

I'll give this a final review today. Sorry things have been crazy busy 🙂

phorcys420 and brymut reacted with heart emoji

Copy link
Contributor

DevelopmentCats commented Aug 7, 2025
edited
Loading

I loaded this up in my template and tested it a few times and it seems to work well.

The only thing that I notice is that the parameters for the Server Location, and the Server Type's should be Dynamic Parameters so that you can make it only give the server types that are available for each location since the workspace will fail if you select a server type that is not available in a specific location without any meaningful feedback.

Here are the docs for dynamic parameters: https://coder.com/docs/admin/templates/extending-templates/dynamic-parameters

Let me know if you have any questions @brymut

I do also notice that there are some issues with the lifecycle of the VM. When the workspace is stopped the server in hetzner stays running and the workspace hangs after that since it is supposed to be stopping the hetzner vm, but it never does.

Also the labels were not being applied

Copy link
Contributor

Something else that I am noticing while testing this module is that you can only provision a single workspace with this template since there are not unique names for the volume or the server and when its used again it would error out because they exist already.

Copy link
Contributor

@brymut any update on this?

@brymut brymut force-pushed the brymut/add-hetzner-template branch from cab40b4 to 6e9e5c4 Compare August 14, 2025 12:30
Copy link
Author

brymut commented Aug 14, 2025
edited
Loading

Hi, just pushed changes @DevelopmentCats. Dynamic params added, Hetzner cleans up as expected when workspace is shut & multiple workspaces can be started using the template. Issue regarding the cloud init label not applying to the home volume isn't solved yet but please have a look while I figure that out. Will update today

DevelopmentCats reacted with thumbs up emoji

@brymut brymut force-pushed the brymut/add-hetzner-template branch from 6e9e5c4 to bf9449e Compare August 15, 2025 13:15
Copy link
Author

brymut commented Aug 15, 2025

@DevelopmentCats label working on os fs level and added some labels at the hetzner console level too. I think this should all be ready to go now.

DevelopmentCats reacted with thumbs up emoji

Copy link
Contributor

DevelopmentCats commented Aug 18, 2025
edited
Loading

@DevelopmentCats label working on os fs level and added some labels at the hetzner console level too. I think this should all be ready to go now.

Sorry about the delay on this. Thank you for figuring out the label stuff. I will go ahead and test this again with the latest changes to make sure everything is working fine tonight.

brymut reacted with thumbs up emoji

Copy link
Author

brymut commented Aug 19, 2025
edited
Loading

Sorry about the delay on this. Thank you for figuring out the label stuff. I will go ahead and test this again with the latest changes to make sure everything is working fine tonight.

Created new recording with requested fixes @DevelopmentCats. This version shows the provisioning of multiple hetzner instances in coder with dynamic param enabled, running simultaneously and shown in the Hetzner console, checking labels on both the OS Filesystem and on the hetzner console and then shutting down through coder demonstrating clean up on hetzner and deleting workspaces without errors:

hetzner-fix-1.mp4

Copy link
Contributor

Sorry about the delay on this. Thank you for figuring out the label stuff. I will go ahead and test this again with the latest changes to make sure everything is working fine tonight.

Created new recording with requested fixes @DevelopmentCats. This version shows the provisioning of multiple hetzner instances in coder with dynamic param enabled, running simultaneously and shown in the Hetzner console, checking labels on both the OS Filesystem and on the hetzner console and then shutting down through coder demonstrating clean up on hetzner and deleting workspaces without errors:

hetzner-fix-1.mp4

Thank you so so much for providing the screen capture after updating the behavior. This is looking awesome overall, but the last question I have for this template in regards to hetzner is this. I think it might be worthwhile to maybe create a module for handling snapshot's with hetzner later on since as of right now none of the data will persist passed the workspace stopping from what I can see, but this can be done in another PR later on.

Copy link
Contributor

@brymut I removed count from the volume resource, since it was destroying the volume when the workspace stops.

This now has an optimal lifecycle:
Workspace Starts -> Volume Created, Server Created, Volume attached, Server Starts
Workspace Stops -> Server Stops, Volume Unattached, Server Destroyed
Workspace Starts Again -> Server Created, Volume Attached, Server Starts

brymut reacted with thumbs up emoji

Copy link
Author

brymut commented Aug 19, 2025

Sounds good, if you can create a separate issue to track the module you described, I'd happy to take it on once this is merged. Bounty or not @DevelopmentCats

Copy link
Author

brymut commented Aug 19, 2025

Anything else I can do here @DevelopmentCats ?

@brymut brymut force-pushed the brymut/add-hetzner-template branch 2 times, most recently from 2ceef2c to c5ab8a9 Compare August 23, 2025 13:31
@brymut brymut force-pushed the brymut/add-hetzner-template branch from c5ab8a9 to e8a4863 Compare August 25, 2025 05:47
@brymut brymut deleted the brymut/add-hetzner-template branch September 11, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@DevelopmentCats DevelopmentCats Awaiting requested review from DevelopmentCats

@matifali matifali Awaiting requested review from matifali

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Hetzner Cloud server template example

AltStyle によって変換されたページ (->オリジナル) /