{"id":24623710,"url":"https://github.com/moomerman/libcluster_tailscale","last_synced_at":"2025-05-07T16:21:31.129Z","repository":{"id":107936493,"uuid":"609609464","full_name":"moomerman/libcluster_tailscale","owner":"moomerman","description":"A libcluster strategy for discovering and connecting Elixir nodes over Tailscale","archived":false,"fork":false,"pushed_at":"2023-03-06T21:28:55.000Z","size":5,"stargazers_count":79,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-03T16:16:36.852Z","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/moomerman.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":"2023-03-04T17:40:43.000Z","updated_at":"2024-11-01T16:51:34.000Z","dependencies_parsed_at":"2023-03-13T14:29:50.734Z","dependency_job_id":null,"html_url":"https://github.com/moomerman/libcluster_tailscale","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moomerman%2Flibcluster_tailscale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moomerman%2Flibcluster_tailscale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moomerman%2Flibcluster_tailscale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moomerman%2Flibcluster_tailscale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moomerman","download_url":"https://codeload.github.com/moomerman/libcluster_tailscale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252913061,"owners_count":21824092,"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":"2025-01-25T03:58:07.945Z","updated_at":"2025-05-07T16:21:31.120Z","avatar_url":"https://github.com/moomerman.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libcluster_tailscale\n\nThis library adds a `libcluster` strategy for discovering and connecting Elixir nodes over Tailscale.\n\nSee [this blog post](https://www.richardtaylor.dev/articles/globally-distributed-elixir-over-tailscale) for a detailed walkthrough.\n\n## Installation\n\nThe package can be installed by adding `libcluster_tailscale` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:libcluster_tailscale, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Config\n\nConfigure your `libcluster` topology with the following config.\n\n```elixir\nconfig :libcluster,\n  topologies: [\n    tailscale: [\n      strategy: Cluster.Strategy.Tailscale,\n      config: [\n        authkey: \"tskey-api-xxx-yyy\",\n        tailnet: \"example.com\",\n        hostname: \"app.example.com\",\n        appname: \"app\"\n      ]\n    ]\n  ]\n```\n\n## Example Phoenix Application\n\nLet us say we're deploying a phoenix application called `hello`.\n\nWhen you bring your tailscale service up on your node, provide a `hostname` that is consistent across your cluster and this strategy can then find all the IP addresses on your Tailnet belonging to that service and automatically cluster them together.\n\n```sh\ntailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname=hello-app\n```\n\nConfigure your release to use the tailscale IP address as part of the node name:\n\n```sh\nip=$(tailscale ip --4)\nexport RELEASE_DISTRIBUTION=name\nexport RELEASE_NODE=\u003c%= @release.name %\u003e@$ip\n```\n\nThen configure your cluster as follows\n\n```elixir\nconfig :libcluster,\n  topologies: [\n    tailscale: [\n      strategy: Cluster.Strategy.Tailscale,\n      config: [\n        authkey: \"tskey-api-xxx-yyy\",\n        tailnet: \"example.com\",\n        hostname: \"hello-app\",\n        appname: \"hello\"\n      ]\n    ]\n  ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoomerman%2Flibcluster_tailscale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoomerman%2Flibcluster_tailscale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoomerman%2Flibcluster_tailscale/lists"}