Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build swarm+etcd+docker environment

2025-03-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to build a swarm+etcd+docker environment", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to build a swarm+etcd+docker environment" this article.

Machine allocation in experimental process

IP role 192.168.0.109Client192.168.0.201etcd192.168.0.202docker host1192.168.0.203docker host2192.168.0.204swarm management machine

Structure diagram

Description:

1. Etcd can be clustered, and any node in the cluster can read and write. You can experiment by yourself. Here, in order to simplify the whole structure, etcd uses a

2. Instead of using the image of the official website, the swarm in this experiment is compiled and installed on the physical machine.

3. Swarm management machine and all docker host hosts need to install swarm. The management node runs the swarm manage command and the docker host host runs the swarm join command

Etcd starts etcd on a stand-alone machine-- name etcd0-- initial-advertise-peer-urls http://192.168.0.201:2380\-- listen-peer-urls http://192.168.0.201:2380\-- listen-client-urls http://192.168.0.201:2379\-- advertise-client-urls http://192.168.0.201 : 2379\-- initial-cluster etcd0= http://192.168.0.201:2380swarm management machine starts

Swarm manage-H 0.0.0.0 2375 host configuration

First, configure docker to TCP listening mode, and the listening port for this experiment is 2375.

Next, add the docker host to the management machine and configure it as follows:

Docker host1

Swarm join-- advertise 192.168.0.202 etcd://192.168.0.201:2379/swarm

Docker host2

Swarm join-- advertise 192.168.0.203 etcd://192.168.0.201:2379/swarm

At this point, the whole structure is up.

These are all the contents of the article "how to build a swarm+etcd+docker Environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report