mac安装consul

安装

https://www.consul.io/downloads.html
直接解压

启动

➜  devtool consul agent -dev
==> Starting Consul agent...
==> Starting Consul agent RPC...
==> Consul agent running!
           Version: 'v0.7.2'
         Node name: 'Mars.local'
        Datacenter: 'dc1'
            Server: true (bootstrap: false)
       Client Addr: 127.0.0.1 (HTTP: 8500, HTTPS: -1, DNS: 8600, RPC: 8400)
      Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
    Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false
             Atlas: <disabled>

==> Log data will now stream in as it occurs:

    2017/05/06 11:03:40 [INFO] raft: Initial configuration (index=1): [{Suffrage:Voter ID:127.0.0.1:8300 Address:127.0.0.1:8300}]
    2017/05/06 11:03:40 [INFO] serf: EventMemberJoin: Mars.local 127.0.0.1
    2017/05/06 11:03:40 [INFO] raft: Node at 127.0.0.1:8300 [Follower] entering Follower state (Leader: "")
    2017/05/06 11:03:40 [INFO] serf: EventMemberJoin: Mars.local.dc1 127.0.0.1
    2017/05/06 11:03:40 [INFO] consul: Adding LAN server Mars.local (Addr: tcp/127.0.0.1:8300) (DC: dc1)
    2017/05/06 11:03:40 [INFO] consul: Adding WAN server Mars.local.dc1 (Addr: tcp/127.0.0.1:8300) (DC: dc1)
    2017/05/06 11:03:45 [WARN] raft: Heartbeat timeout from "" reached, starting election
    2017/05/06 11:03:45 [INFO] raft: Node at 127.0.0.1:8300 [Candidate] entering Candidate state in term 2
    2017/05/06 11:03:45 [DEBUG] raft: Votes needed: 1
    2017/05/06 11:03:45 [DEBUG] raft: Vote granted from 127.0.0.1:8300 in term 2. Tally: 1
    2017/05/06 11:03:45 [INFO] raft: Election won. Tally: 1
    2017/05/06 11:03:45 [INFO] raft: Node at 127.0.0.1:8300 [Leader] entering Leader state
    2017/05/06 11:03:45 [INFO] consul: cluster leadership acquired
    2017/05/06 11:03:45 [INFO] consul: New leader elected: Mars.local
    2017/05/06 11:03:45 [DEBUG] consul: reset tombstone GC to index 3
    2017/05/06 11:03:45 [INFO] consul: member 'Mars.local' joined, marking health alive
    2017/05/06 11:03:45 [INFO] agent: Synced service 'consul'
    2017/05/06 11:03:45 [DEBUG] agent: Node info in sync

访问

http://127.0.0.1:8500/ui/#/dc1/services

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,841评论 18 139
  • 上一篇提到,项目用的分布式服务发现与注册组件是consul,这篇文章主要来讲下consul组件在项目中的应用以及相...
    aoho阅读 11,395评论 1 13
  • [TOCM] Consul版本 v0.9.2 1. 配置 1.1 CLI配置 Consul Agent有各种各样的...
    Liberalman阅读 8,084评论 18 3
  • 你自己不喜欢别人对你做的事 你也不能对别人做
    猫fi阅读 260评论 0 1
  • 大学谈之二 浮生 写在前面 有人说,真没有意思,每天都过得太没有意思了,经常或多或少在沟通中,面对这个话题,似乎没...
    青楹阅读 264评论 0 1