|LER0ever a70d5b0fe4 change license to apache 2.0||7 months ago|
|etc/systemd||7 months ago|
|frp||7 months ago|
|gitea||7 months ago|
|mastodon||7 months ago|
|verdaccio||7 months ago|
|.gitignore||7 months ago|
|LICENSE.md||7 months ago|
|README.md||7 months ago|
|monitor-stack.yml||7 months ago|
|swarm-stack.yml||7 months ago|
This repo contains configurations for my servers and workstation clustering setup.
(And now also contains detailed explanations and guide:)
This is achieved using Weave Net.
sudo curl -L git.io/weave -o /usr/local/bin/weave sudo chmod a+x /usr/local/bin/weave
Before starting the swarm, weave is started in docker and created an overlay network between hosts both in my dorm and in the cloud, so as to create a virtual subnet containing all the nodes.
weave expose is executed to not only connects docker containers to that
virtual network, but also brings the physical hosts in, which enables me to later
create a swarm without having to manually expose 2377, 4xxx ports on each
computers which are behind the firewall.
After doing these, my addresses for each node would become for example:
And they can reach each other using the above addresses.
Additionally, one can use Weave scope to visualize the virtual network and manage containers in the network.
Once the nodes have their own
10.x.x.x virtual address, docker swarm mode
can be easily setup by running the following:
eval $(weave env) docker swarm init --advertise-addr 10.40.0.0:2377 # and you'll get a command for workers to join
eval $(weave env) docker swarm join --token xxxx --advertise-addr 10.3x.x.x:2377
The monitor stack and the actual services are seperated so that they won’t affect each other.
# Deploy monitor stack docker stack deploy -c monitor-stack.yml m_prod_180625 # Deploy services docker stack deploy -c swarm-stack.yml prod_180625
My own stack visualizer is live (or not) at swarm.rongyi.io
The code and configuration in this repo is open source under the terms of Apache 2.0