安装

https://www.consul.io/downloa...
直接解压

启动

➜  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/#/dc...


codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...


引用和评论

0 条评论