{"id":17946783,"url":"https://github.com/ler0ever/swarm-setup","last_synced_at":"2026-01-28T11:12:17.413Z","repository":{"id":108911070,"uuid":"138646204","full_name":"LER0ever/Swarm-Setup","owner":"LER0ever","description":"Code that powers my server cluster","archived":false,"fork":false,"pushed_at":"2018-06-25T20:26:12.000Z","size":281,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T14:01:44.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://code.rongyi.io/LER0ever/Swarm-Setup","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LER0ever.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-06-25T20:25:51.000Z","updated_at":"2021-09-30T00:04:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"d495bef3-c56b-4830-b878-9bae9a266296","html_url":"https://github.com/LER0ever/Swarm-Setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LER0ever/Swarm-Setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LER0ever%2FSwarm-Setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LER0ever%2FSwarm-Setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LER0ever%2FSwarm-Setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LER0ever%2FSwarm-Setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LER0ever","download_url":"https://codeload.github.com/LER0ever/Swarm-Setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LER0ever%2FSwarm-Setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-29T07:07:34.871Z","updated_at":"2026-01-28T11:12:17.394Z","avatar_url":"https://github.com/LER0ever.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server Manifest\nThis repo contains configurations for my servers and workstation clustering setup.  \n(And now also contains detailed explanations and guide:)\n\n## Features\n- Basic Load-Balancing using Reverse Proxy Round-Robin\n- Dynamic Reverse Proxy from Docker Flow\n- Cluster Visualizer using Docker Swarm Visualizer\n- Vitualized subnet for both local dorm computers and remote servers\n- High Availability, Service auto-restarting\n\n## Services\n- My own git hosting (gitea)\n- Continuous Integration (drone-ci)\n- LAN Ports forwarding (frp)\n- Kanban Task Board (kanboard)\n- Status pages for each node (netdata)\n- Dev branch of my personal website (caddy, gatsby)\n- Shadowsocks\n- Transmission Daemon for downloading you-know-what\n- Portainer Management\n- Mastodon (deleted, too memory consuming)\n- More to come\n\n## Screenshots\n#### Swarm Visualizer\n![Swarm Visualizer](https://i.imgur.com/mCOhH4K.png)\n#### Code Hosting\n![Gitea](https://i.imgur.com/nQVZpzy.png)\n#### NPM Registry\n![NPM Registry](https://i.imgur.com/sJTxFkt.png)\n#### Kanban (one of the boards)\n![Kanboard](https://i.imgur.com/gjRTBMS.png)\n#### Drone CI\n![drone](https://i.imgur.com/XCcCIib.png)\n#### Transmission WebUI\n![transmission](https://i.imgur.com/693g9yN.png)\n\n\n## Technical Details\n\n### 1. Private networking\n**This is achieved using Weave Net.**\n\nInstallation:  \n```bash\nsudo curl -L git.io/weave -o /usr/local/bin/weave\nsudo chmod a+x /usr/local/bin/weave\n```\n\nBefore starting the swarm, weave is started in docker and created an overlay\nnetwork between hosts both in my dorm and in the cloud, so as to create a \nvirtual subnet containing all the nodes.\n\nThen, `weave expose` is executed to not only connects docker containers to that\nvirtual network, but also brings the physical hosts in, which enables me to later\ncreate a swarm without having to manually expose 2377, 4xxx ports on each\ncomputers which are behind the firewall.\n\nAfter doing these, my addresses for each node would become for example:\n\n- Main Server: 10.40.0.0\n- Singapore Server: 10.44.0.0\n- LosAngeles Server: 10.48.0.0\n- Dorm Desktop: 10.38.0.0\n- Dorm Samsung: 10.34.0.0\n- Laptop Somewhere: 10.32.0.1\n\nAnd they can reach each other using the above addresses.\n\nAdditionally, one can use Weave scope to visualize the virtual network and\nmanage containers in the network.\n\n### 2. Swarm Setup\nOnce the nodes have their own `10.x.x.x` virtual address, docker swarm mode\ncan be easily setup by running the following:\n\n##### On the master node:\n```bash\neval $(weave env)\ndocker swarm init --advertise-addr 10.40.0.0:2377\n# and you'll get a command for workers to join\n```\n\n##### On every worker node:\n```bash\neval $(weave env)\ndocker swarm join --token xxxx --advertise-addr 10.3x.x.x:2377\n```\n\n### 3. Docker Stack deploy\nThe monitor stack and the actual services are seperated so that they won't affect each other.\n\n```bash\n# Deploy monitor stack\ndocker stack deploy -c monitor-stack.yml m_prod_180625\n\n# Deploy services\ndocker stack deploy -c swarm-stack.yml prod_180625\n```\n\nMy own stack visualizer is live (or not) at [swarm.rongyi.io](https://swarm.rongyi.io)\n\n## License\nThe code and configuration in this repo is open source under the terms of Apache 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fler0ever%2Fswarm-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fler0ever%2Fswarm-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fler0ever%2Fswarm-setup/lists"}