{"id":13703019,"url":"https://github.com/EightSQ/libcluster_hcloud","last_synced_at":"2025-05-05T07:30:31.689Z","repository":{"id":57516030,"uuid":"288244503","full_name":"EightSQ/libcluster_hcloud","owner":"EightSQ","description":"A libcluster clustering strategy via Hetzner Cloud Server Labels.","archived":false,"fork":false,"pushed_at":"2024-02-18T19:36:32.000Z","size":14,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T07:45:10.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EightSQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-17T17:33:18.000Z","updated_at":"2025-04-04T12:29:01.000Z","dependencies_parsed_at":"2024-02-18T20:31:01.527Z","dependency_job_id":null,"html_url":"https://github.com/EightSQ/libcluster_hcloud","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Flibcluster_hcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Flibcluster_hcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Flibcluster_hcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EightSQ%2Flibcluster_hcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EightSQ","download_url":"https://codeload.github.com/EightSQ/libcluster_hcloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252458316,"owners_count":21751014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T21:00:48.988Z","updated_at":"2025-05-05T07:30:31.382Z","avatar_url":"https://github.com/EightSQ.png","language":"Elixir","funding_links":[],"categories":["Integrations"],"sub_categories":["Rust"],"readme":"[![Hex.pm Version](http://img.shields.io/hexpm/v/libcluster_hcloud.svg?style=flat)](https://hex.pm/packages/libcluster_hcloud)\n\n# ClusterHcloud\n\nThis is a [Hetzner Cloud](https://www.hetzner.de/cloud) clustering strategy for [libcluster](https://github.com/bitwalker/libcluster).\n\nThe `labels` strategy queries the [hcloud API](https://docs.hetzner.cloud/) using [HTTPoison](https://github.com/edgurgel/httpoison) and [Jason](https://github.com/michalmuskala/jason) to find nodes by given [label selectors](https://docs.hetzner.cloud/#label-selector).\n\n\n## Quick example\n\n```elixir\nconfig :libcluster,\n  topologies: [\n    labels_example: [\n      strategy: Elixir.ClusterHcloud.Strategy.Labels,\n      config: [\n        hcloud_api_access_token: \"xxx\",\n        label_selector: \"mylabel\",\n        app_prefix: \"app\",\n        show_debug: false,\n        private_network_name: \"my-network\",\n        polling_interval: 10_000]]],\n```\n\nYou can define your topologies in the location where you start the `Cluster.Supervisor` as well.\nIf you use the above, remember that you still have to add `Cluster.Supervisor` to the supervision tree.\nYou can get the configuration using `Application.get_env(:libcluster, :topologies)`.\n\nFor further details on configuration, see the [documentation](https://hexdocs.pm/libcluster_hcloud).\n\nTo practically use this on Hetzner Cloud, you need to make sure you run your\napplication appropriately, i.e., you have to make sure you run your nodes with\na `name` allowing for external connections. This means it has to be run with\nthe Erlang start parameter `--name {app_prefix}@{private_ip}` or `--name\n{app_prefix}@{public_ip}`! If you are using Mix Releases, the [documentation of\nmix-release](https://hexdocs.pm/mix/Mix.Tasks.Release.html) is a good read.\n\nTL;DR e.g. for use with **mix release** you need to set the environment variables `RELEASE_DISTRIBUTION=name` and `RELEASE_NODE={app_prefix}@{private_ip|public_ip}` when running you release.\n\n\n## Installation\n\nThe package can be installed by adding `libcluster_hcloud` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:libcluster_hcloud, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Acknowledgments\n\nThis package is heavily based on [libcluster_ec2](https://github.com/kyleaa/libcluster_ec2) by [kyleaa](https://github.com/kyleaa).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEightSQ%2Flibcluster_hcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEightSQ%2Flibcluster_hcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEightSQ%2Flibcluster_hcloud/lists"}