{"id":19241074,"url":"https://github.com/binocarlos/smesh","last_synced_at":"2025-10-15T05:24:35.560Z","repository":{"id":18858203,"uuid":"22074773","full_name":"binocarlos/smesh","owner":"binocarlos","description":"manage a mesh of etcd hosts","archived":false,"fork":false,"pushed_at":"2014-08-25T22:05:52.000Z","size":264,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T02:56:36.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binocarlos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-21T18:11:44.000Z","updated_at":"2014-11-14T10:44:56.000Z","dependencies_parsed_at":"2022-08-29T11:01:34.681Z","dependency_job_id":null,"html_url":"https://github.com/binocarlos/smesh","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/binocarlos%2Fsmesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fsmesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fsmesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fsmesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binocarlos","download_url":"https://codeload.github.com/binocarlos/smesh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240326653,"owners_count":19783883,"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-11-09T17:10:11.191Z","updated_at":"2025-10-15T05:24:30.531Z","avatar_url":"https://github.com/binocarlos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"smesh\n=====\n\nmanage a mesh of etcd hosts\n\n![Smesh](https://github.com/binocarlos/smesh/raw/master/exchange.jpg)\n\n## install\n\nFirst - ensure your hostname is set correctly.\n\nThen [install docker](https://github.com/binocarlos/docker-install).\n\n```bash\n$ wget -qO- https://raw.github.com/binocarlos/docker-install/master/bootstrap.sh | sudo bash\n```\n\nif you are using vagrant - run this command to allow the vagrant user access to the docker socket:\n\n```bash\n$ sudo usermod -aG docker vagrant\n```\n\nYou will then need to restart your command line session.\n\nThen pull the required images:\n\n```bash\n$ docker pull binocarlos/smesh\n$ docker pull coreos/etcd\n```\n\n## usage\n\nTo make a smesh cluster you first need an etcd token:\n\n```bash\nnode1:~$ export SMESH_TOKEN=$(docker run --rm binocarlos/smesh token)\n```\n\nThen set the SMESH_IP variable to the IP address of an interface accesible by other members of the cluster:\n\n```bash\nnode1:~$ export SMESH_IP=192.168.8.120\n```\n\nThen we can use these values to boot an etcd server\n\n```bash\nnode1:~$ $(docker run --rm binocarlos/smesh start --token $SMESH_TOKEN --hostname $HOSTNAME --address $SMESH_IP)\n```\n\nAnd then on the other servers:\n\n```bash\nnode2:~$ SMESH_TOKEN=https://discovery.etcd.io/f349523a1502f4e53fabd2b9df22bd72\nnode2:~$ SMESH_IP=192.168.8.121\nnode2:~$ $(docker run --rm binocarlos/smesh start --token $SMESH_TOKEN --hostname $HOSTNAME --address $SMESH_IP)\n```\n\nNow there is a cluster of 3 etcd servers running - you can run etcdctl on one of the servers:\n\n```bash\nnode1:-$ docker run --rm binocarlos/etcdctl --peers 192.168.8.120:4001 set /apples hello\nnode1:-$ docker run --rm binocarlos/etcdctl --peers 192.168.8.120:4001 ls / --recursive\n```\n\nto stop the smesh container:\n\n```bash\nnode1:~$ docker stop smesh \u0026\u0026 docker rm smesh\n```\n\n## manual peers\n\nYou can use the --peers option rather than --token if you want to manually co-ordinate the cluster:\n\n```bash\nnode1:~$ $(docker run --rm binocarlos/smesh start --hostname $HOSTNAME --address 192.168.8.120 --peers boot)\n```\n\n```bash\nnode2:~$ $(docker run --rm binocarlos/smesh start --hostname $HOSTNAME --address 192.168.8.121 --peers 192.168.8.120:7001,192.168.8.122:7001)\n```\n\n```bash\nnode3:~$ $(docker run --rm binocarlos/smesh start --hostname $HOSTNAME --address 192.168.8.122 --peers 192.168.8.120:7001,192.168.8.121:7001)\n```\n\n## license\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fsmesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinocarlos%2Fsmesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fsmesh/lists"}