root@ubuntu:/home/nescafe/temp# cp consul /usr/bin
root@ubuntu:/home/nescafe/temp# consul -v
Consul v0.8.1
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
root@ubuntu:/home/nescafe/temp# consul agent -dev
root@ubuntu:/home/nescafe# consul members
Node Address Status Type Build Protocol DC
ubuntu 127.0.0.1:8301 alive server 0.8.1 2 dc1
root@ubuntu:/home/nescafe# sudo apt-get update
root@ubuntu:/home/nescafe/temp# sudo apt-get install virtualbox-5.1
root@ubuntu:/home/nescafe/temp# apt-get -f install
root@ubuntu:/home/nescafe/temp# apt install curl
root@ubuntu:/home/nescafe# curl localhost:8500/v1/catalog/nodes
root@ubuntu:/home/nescafe/temp# curl localhost:8500/v1/catalog/nodes
[
{
"ID": "fcde1a12-724a-b4b4-44b7-05fbb684bbac",
"Node": "ubuntu",
"Address": "127.0.0.1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"Meta": {},
"CreateIndex": 5,
"ModifyIndex": 6
}
]
root@ubuntu:/home/nescafe/temp# dig @127.0.0.1 -p 8600 Armons-MacBook-Air.node.consul
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @127.0.0.1 -p 8600 Armons-MacBook-Air.node.consul
; (1 server found)
#停止服务
ctrl+z
root@ubuntu:/home/nescafe/temp# mkdir /etc/consul.d
root@ubuntu:/home/nescafe/temp# echo '{"service": {"name": "web", "tags": ["rails"], "port": 80}}' \
> | sudo tee /etc/consul.d/web.json
{"service": {"name": "web", "tags": ["rails"], "port": 80}}
root@ubuntu:/home/nescafe/temp# consul agent -dev -config-dir=/etc/consul.d
#curl 7.53.1 for Windows
https://winampplugins.co.uk/curl/
nescafe@ubuntu:~$ curl http://localhost:8500/v1/catalog/service/web
[
{
"ID": "fcde1a12-724a-b4b4-44b7-05fbb684bbac",
"Node": "ubuntu",
"Address": "127.0.0.1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"NodeMeta": {},
"ServiceID": "web",
"ServiceName": "web",
"ServiceTags": [
"rails"
],
"ServiceAddress": "",
"ServicePort": 80,
"ServiceEnableTagOverride": false,
"CreateIndex": 7,
"ModifyIndex": 7
}
]
nescafe@ubuntu:~$ curl 'http://localhost:8500/v1/health/service/web?passing'
[
{
"Node": {
"ID": "fcde1a12-724a-b4b4-44b7-05fbb684bbac",
"Node": "ubuntu",
"Address": "127.0.0.1",
"TaggedAddresses": {
"lan": "127.0.0.1",
"wan": "127.0.0.1"
},
"Meta": {},
"CreateIndex": 5,
"ModifyIndex": 6
},
"Service": {
"ID": "web",
"Service": "web",
"Tags": [
"rails"
],
"Address": "",
"Port": 80,
"EnableTagOverride": false,
"CreateIndex": 7,
"ModifyIndex": 7
},
"Checks": [
{
"Node": "ubuntu",
"CheckID": "serfHealth",
"Name": "Serf Health Status",
"Status": "passing",
"Notes": "",
"Output": "Agent alive and reachable",
"ServiceID": "",
"ServiceName": "",
"CreateIndex": 5,
"ModifyIndex": 5
}
]
}
]
root@ubuntu:/home/nescafe# consul agent -ui
https://demo.consul.io/ui/
相关推荐
国内不能下载了,得翻墙!...1.解压后执行命令 sudo scp consul /usr/local/bin/。 2.在bin目录下执行consul命令,输出相关命令表示安装成功。 3.启动consul,执行命令consul agent -dev 4.启动后访问地址: ...
consul可以进入后台,威胁敏感信息,对网络设备进行操作
Consul 是一个支持多数据中心分布式高可用的服务发现和配置共享的服务软件,由 HashiCorp 公司用 Go 语言开发, 基于 Mozilla Public License 2.0 的协议进行开源. Consul 支持健康检查,并允许 HTTP 和 DNS 协议调用 ...
C# consul 服务注册发现及健康检查以及consul写的分布式锁,也不知道对不对。看看吧
consul(windows)安装包
consul下载包(Linux、Windows)
consul客户端来进行本地微服务的服务注册和发现的开发测试
consul的启动脚本,用于和kong网关进行结合使用,用来分流
SpringCloud 构建微服务系统之服务注册和发现(nacos和consul)
Consul 1.9.0 linux版
Mac版本的 consul,官网太难下载了
在 Spring Cloud 体系中,几乎每个角色都会有两个以上的产品提供选择,比如在注册中心有:Eureka、Consul、zookeeper、etcd 等;网关的产品有 Zuul、Spring Cloud Gateway 等。在注册中心产品中,最常使用的是 ...
consul
consul启动不成功,8301端口被ip-guard占用,原因是ip-guard这个监控软件引起,winrdlv3.exe。普通方案解决不了,优化版本,实测真实有效。
consul_1.6.2_linux_amd64.zip Linux上的consul版本,直接解压 unzip consul_1.6.2_linux_amd64.zip ; 然后把 mv consul ~/bin 里面去,就可以执行consul命令了。
完美实现了.net core + consul的功能,直接可以运行。分为两个项目,分别为两个服务。 Consul 是一个用来实现分布式系统服务发现与配置的开源工具。它内置了服务注册与发现框架、分布一致性协议实现、健康检查、...
Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置。与其它分布式服务注册与发现的方案,Consul 的方案更“一站式”,内置了服务注册与发现框架、分布一致性协议实现、健康检查、Key/...
Consul是一个支持多数据中心分布式高可用的服务发现和配置共享的服务软件,由 HashiCorp公司用Go语言开发,基于Mozilla Public License 2.0的协议进行开源.。Consul支持健康检查,并允许HTTP和DNS协议调用API存储...
Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置。与其他分布式服务注册与发现的方案,Consul的方案更“一站式”,内置了服务注册与发现框 架、分布一致性协议实现、健康检查、Key/...
这个主要是方便我们在window环境下一键启动consul服务器,不需要每次通过cmd命令去敲那么多命令,节省时间