【Docker】Docker installs Consul


点击跳转:Docker安装MySQL、Redis、RabbitMQ、Elasticsearch、Nacos等常见服务全套(质量有保证,内容详情)

1. What is Consul?

Consul is an open source software launched by HashiCorp, which provides service governance, configuration center, control bus and other functions in microservice systems. Each of these features can be used individually as needed, or used together to build a comprehensive service mesh. In short, Consul provides a complete service mesh solution.

2. Docker installation and start Consul

  • Pull the Consul image
docker pull consul # 默认拉取latest
docker pull consul:1.6.1 # 拉取指定版本
  • Install and run
docker run -d -p 8500:8500 --name=consul \
consul:1.6.1 \
consul agent -dev \
-ui -node=n1 -bootstrap-expect=1 -client=0.0.0.0

The following is an introduction to consul commands or parameters:

  • consul agent -devStart using development mode
  • -uiOpen the web page visual management interface
  • -nodeSpecify the node name. Note that the name of each node must be unique and cannot be repeated ! The name of the first server node is specified above n1, then other nodes must use other names.
  • -bootstrap-expectThe minimum Servernumber of nodes in the cluster. If it is less than this value, the cluster will fail. This option must be specified . Since this is a stand-alone deployment, it 1can be set to
  • -clientSpecify the address that can be connected externally, 0.0.0.0indicating that all external networks can be connected.
  • Visit Consul's UI: http://localhost:8500/

Guess you like

Origin blog.csdn.net/yuchangyuan5237/article/details/132053741