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

Add support for Hetzner #73

Open
frafra opened this issue Dec 26, 2018 · 6 comments · May be fixed by #167
Open

Add support for Hetzner #73

frafra opened this issue Dec 26, 2018 · 6 comments · May be fixed by #167

Comments

@frafra
Copy link

frafra commented Dec 26, 2018

Would it be possible? Hetzner Cloud API supports custom labels.

@tomschlenkhoff
Copy link

Would be fantastic, any help needed? Please merge #167

@marco-m
Copy link

marco-m commented Oct 9, 2021

Although for sure I would appreciate if #167 were merged, I want to point out that it is already possible to, for example, deploy Consul with automatic boostrap and join in Hetzner Cloud. The trick is to use private IP addresses, via what hcloud calls "networks".

To give an idea: from https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server#server-creation-with-network:

Terraform

resource "hcloud_network" "foo" {
  name     = "foo"
  ip_range = "10.0.0.0/8"
}

resource "hcloud_network_subnet" "lab" {
  network_id = hcloud_network.foo.id
  type       = "cloud"
  network_zone = "eu-central"
  ip_range     = "10.0.0.0/24"
}

resource "hcloud_server" "consul" {
  count       = 3
  name        = "consul-${1 + count.index}" # hostname
  ...

  network {
    network_id = hcloud_network.foo.id
    ip         = "10.0.0.${10 + 1 + count.index}"
  }

  depends_on = [
    hcloud_network_subnet.lab
  ]
}

Then start the 3 Consul agents pointing to the same IP address:

consul agent -server -data-dir=/tmp/consul -bootstrap-expect 3 -retry-join=10.0.0.11

:-)

@MagicRB
Copy link

MagicRB commented Jun 17, 2022

While this works, it depends on the first node being online at all times, if that one fails for any reason, now ones won't be able to join so not an ideal solution.

@dverbeek84
Copy link

dverbeek84 commented Jun 27, 2022

@MagicRB You can also add all the server ip's to the retry-join

@MagicRB
Copy link

MagicRB commented Jun 28, 2022

Yup I realized later that in fact all IPs will work

@ronaldburns
Copy link

Updated the implementation of hcloud in go-discover.
Better error handling and location finding.
HBGames/go-discover

Pre-compiled consul binaries are available. Can add 1.13.x versions if requested.
HBGames/consul 1.14.0-beta1

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

Successfully merging a pull request may close this issue.

6 participants