HashiCorp Consul is a service networking solution that enables teams to manage secure network connectivity between services and across on-premises and multi-cloud environments and runtime. Consul provides service discovery, service meshing, traffic management, and automated updates for network infrastructure devices. You can use these features individually or together in a single Consul deployment.
Consul provides a control plane that enables you to register, query, and secure services deployed across networks. The control plane is a part of the network infrastructure that maintains a central registry to track services and their respective IP addresses. It is a distributed system that runs on a cluster of nodes, such as physical servers, cloud instances, virtual machines, or containers.
Review:
Download Address:
The hyperlink login is visible.
The hyperlink login is visible.
Consul (CLI) commands:
The hyperlink login is visible.
The hyperlink login is visible.
First, download consul_1.15.3_windows_amd64 and create a new onestart.batscript to start consul, the script is as follows:
Then execute the start.bat script, as shown in the image below:
Browser open:http://127.0.0.1:8500/, as shown in the figure below:
Attached is the command to build a consul test environment using docker:
Consul startup command parameter information:
Field resolution | -server | Start as server. The default is client. | -bootstrap | It is used to control whether a server is in bootstrap mode, only one server can be in bootstrap mode in a data center, and when a server is in bootstrap mode, it can be elected as the server-leader. | -bootstrap-expect=1 | If the minimum number of servers required by the cluster is less than this number, the cluster will be invalidated. | -ui | Specify to open the UI interface, so that you can access the web UI interface that comes with consul through an address like http://localhost:8500/ui. | -data-dir | Specify the datastore directory. | -bind | The address specified for communication within the cluster must be reachable to all nodes in the cluster, and the default is 0.0.0.0. | -client | Specify which client address consul is bound to, which provides services such as HTTP, DNS, RPC, etc., and the default is 127.0.0.1. | -node | The name of a node in a cluster must be unique in a cluster, and the default is the hostname of the node. | -datacenter | Specify the name of the data center, which defaults to DC1. |
After starting Consul, it listens to 6 ports by default:
8300 | Replication and leader farwarding ports (replica synchronization, forwarding ports) | 8301 | LAN Cossip port (port connected to the cluster) | 8302 | WAN Gossip port (port connected to the outside of the cluster) | 8500 | Port of the web ui interface (access port of the web interface) | 8600 | Ports that use DNS protocol to view node information (ports used by DNS protocols) | 8503 | gRPC TLS: gRPC API with TLS connection |
For more information about consul ports, see:The hyperlink login is visible.
(End) |