Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alisinabh/libcluster_yasd
YASD strategy implementation for libcluster. YASD is a minimal service discovery service.
https://github.com/alisinabh/libcluster_yasd
Last synced: about 2 months ago
JSON representation
YASD strategy implementation for libcluster. YASD is a minimal service discovery service.
- Host: GitHub
- URL: https://github.com/alisinabh/libcluster_yasd
- Owner: alisinabh
- License: mit
- Created: 2020-10-10T06:32:40.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-10T17:24:49.000Z (about 4 years ago)
- Last Synced: 2024-03-15T08:09:24.633Z (10 months ago)
- Language: Elixir
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YASD Strategy for libcluster
This is the [YASD](https://github.com/alisinabh/yasd) strategy implementation for libcluster to join Erlang nodes.
## Installation
Add `:libcluster_yasd` to you deps:
```elixir
def deps do
[
{:libcluster_yasd, "~> 0.1.0"}
]
end
```The docs can be found at [https://hexdocs.pm/libcluster_yasd](https://hexdocs.pm/libcluster_yasd).
## Usage
Make sure your application is started with correct node name.
Node name should be in format of `{app_name}@{node_ip}` for example `:"[email protected]"`.To start your app with the correct node name you can use `--name` switch. Example:
```
elixir --name "[email protected]" --cookie "secret_cookie" -S mix run --no-halt
```NOTE: **All nodes should have the same cookie in order to connect**
```elixir
topologies = [
my_yasd: [
strategy: ClusterYASD.Strategy,
config: [
base_url: "http://yaasd:4001"
]
]
]
```
And finally add it to your supervision tree.```elixir
{Cluster.Supervisor, [topologies, [name: MyApp.ClusterSupervisor]]}
```## What is YASD?
Your can learn more about YASD on its github page [github.com/alisinabh/yasd](https://github.com/alisinabh/yasd).
## License
MIT