Movatterモバイル変換


[0]ホーム

URL:


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

example: added hetzner cloud workspace#1884

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

ntimo
Copy link
Contributor

@ntimontimo commentedMay 29, 2022
edited
Loading

This PR adds an example forHetzner Cloud.
The general idea is to let the user create a cloud instance and mount a persistent volume to it. And when the workspace is stopped to unmount the volume and delete the instance to save costs (only the volume will be paid during the stopped time).

In summary this template does:

  • Creates a Hetzner Cloud instance
  • Create a Hetzner Cloud volume
  • Create a default block inbound firewall policy
  • Add volumes and firewall policy to the instance
  • Ask the user if code-server should be installed and if so installs it

Note: I had to create a new PR because the fork relation of my fork from#1044 broke.

bpmct, kylecarbs, and ammario reacted with thumbs up emoji
@ntimo
Copy link
ContributorAuthor

Note: For some reasoncoder ssh <name>.dev does not work with version 0.6.0 of coder with this template yet.

@bpmct
Copy link
Member

Note: For some reasoncoder ssh <name>.dev does not work with version 0.6.0 of coder with this template yet.

@kylecarbs any idea why the agent is showing up for the non-server resources?

┌─────────────────────────────────────────────────────────────────────────────────────────┐│ RESOURCE                                   STATUS              ACCESS                   │├─────────────────────────────────────────────────────────────────────────────────────────┤│ hcloud_firewall.root                       ephemeral                                    │├─────────────────────────────────────────────────────────────────────────────────────────┤│ hcloud_firewall_attachment.root_fw_attach  ephemeral                                    ││ └─ dev (linux, amd64)                      ⦾ connecting [15s]   coder ssh hetztest.dev  │├─────────────────────────────────────────────────────────────────────────────────────────┤│ hcloud_server.root                         ephemeral                                    ││ └─ dev (linux, amd64)                      ⦾ connecting [15s]   coder ssh hetztest.dev  │├─────────────────────────────────────────────────────────────────────────────────────────┤│ hcloud_volume.root                         ephemeral                                    │├─────────────────────────────────────────────────────────────────────────────────────────┤│ hcloud_volume_attachment.root              ephemeral                                    ││ └─ dev (linux, amd64)                      ⦿ connected          coder ssh hetztest.dev  │└─────────────────────────────────────────────────────────────────────────────────────────┘

@kylecarbs
Copy link
Member

kylecarbs commentedMay 29, 2022
edited
Loading

Hmm, I'll check this out. I think the DAG needs adjustment to use the closest node, and not work its way entirely up the tree.

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Nice work, thanks for your contribution@ntimo!

ntimo reacted with heart emoji
@ntimo
Copy link
ContributorAuthor

I just tested this again with coder version 0.6.5 and coder detects the wrong terraform resource as the server (the firewall attachment resource is detected)@kylecarbs@bpmct
Screenshot from 2022-06-09 20-14-47

@kylecarbs
Copy link
Member

@ntimo this is certainly a bug on our end. I'll pull the template and try it out.

@kylecarbs
Copy link
Member

@ntimo found the bug! Pushing a fix in ~1hr

ntimo reacted with heart emoji

@ntimo
Copy link
ContributorAuthor

Thanks@kylecarbs you are awesome

kylecarbs reacted with heart emoji

@ntimontimoforce-pushed thetask/hetzner-cloud-workspace-template branch frombf9af6e todd57b0eCompareJune 9, 2022 19:31
@ntimo
Copy link
ContributorAuthor

I just added the option to chose if code-server should be installed or not when creating the workspace. This is done by using if statements inside of the cloud init file and a counter to add the coder_app resource if needed.

@ntimo
Copy link
ContributorAuthor

I will still need to "workarround" a "issue" where hetzner is going to send the admin an email for every server that gets created. Because the server has no ssh key.

kylecarbs added a commit that referenced this pull requestJun 9, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
@ntimontimoforce-pushed thetask/hetzner-cloud-workspace-template branch from714bb9c todb360b6CompareJune 9, 2022 21:26
kylecarbs added a commit that referenced this pull requestJun 9, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
kylecarbs added a commit that referenced this pull requestJun 9, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
kylecarbs added a commit that referenced this pull requestJun 9, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
kylecarbs added a commit that referenced this pull requestJun 9, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
kylecarbs added a commit that referenced this pull requestJun 10, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
@mafredri
Copy link
Member

I think this one got closed by accident, reopening.

@mafredrimafredri reopened thisJun 10, 2022
@kylecarbs
Copy link
Member

Oh, it certainly was! It was deleted by linking it to the commit 😅.

Thanks@mafredri!

@ntimo try now, it shouldjust work!

kylecarbs added a commit that referenced this pull requestJun 10, 2022
This cleans up agent association code to explicitly map a singleagent to a single resource. This willfix#1884, and unblocka prospect from beginning a POC.
@ntimo
Copy link
ContributorAuthor

@kylecarbs looks good thank you :)

@ntimo
Copy link
ContributorAuthor

I guess this is ready for merge@mafredri :) What do you think?

@mafredri
Copy link
Member

Great work on this template@ntimo, love that you even included code-server! We've decided to showcase community templates by linking to them in the examples readme. Would you mind turning this PR into a personal repo that we can link to?

I'll make a PR today for adding a community templates section.

@ntimo
Copy link
ContributorAuthor

@mafredri
Copy link
Member

Thanks@ntimo! I've added it to#2401 and I'm leaving this open until that one is merged.

ntimo reacted with heart emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mafredrimafredriAwaiting requested review from mafredri

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@ntimo@bpmct@kylecarbs@mafredri@tjcran

[8]ページ先頭

©2009-2025 Movatter.jp