Browse Source

website: minor example and copy fix for multi-dc

pull/4275/head
Jack Pearkes 7 years ago
parent
commit
9acba60271
  1. 15
      website/source/discovery.html.erb

15
website/source/discovery.html.erb

@ -155,7 +155,7 @@ web-frontend.service.consul. 0 IN A <code class='keyword'>10.0.1.109</code></cod
<div> <div>
<div> <div>
<h3>Multi Datacenter</h3> <h3>Multi Datacenter</h3>
<p>Consul supports to multiple datacenters out of the box with no complicated configuration. Look up services in other datacenters or keep the request local. Advanced features like Prepared Queries enable automatic failover to other datacenters.</p> <p>Consul supports multiple datacenters out of the box with no complicated configuration. Look up services in other datacenters or keep the request local. Advanced features like Prepared Queries enable automatic failover to other datacenters.</p>
<p> <p>
<a class="learn-more" href='/docs/guides/datacenters.html'>Learn more<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10"><g fill="none" fill-rule="evenodd" transform="translate(-6 -3)"><mask id="a" fill="#fff"><path d="M7.138 3.529a.666.666 0 1 0-.942.942l3.528 3.53-3.529 3.528a.666.666 0 1 0 .943.943l4-4a.666.666 0 0 0 0-.943l-4-4z"/></mask><g fill="#1563FF" mask="url(#a)"><path d="M0 0h16v16H0z"/></g></g></svg></a> <a class="learn-more" href='/docs/guides/datacenters.html'>Learn more<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10"><g fill="none" fill-rule="evenodd" transform="translate(-6 -3)"><mask id="a" fill="#fff"><path d="M7.138 3.529a.666.666 0 1 0-.942.942l3.528 3.53-3.529 3.528a.666.666 0 1 0 .943.943l4-4a.666.666 0 0 0 0-.943l-4-4z"/></mask><g fill="#1563FF" mask="url(#a)"><path d="M0 0h16v16H0z"/></g></g></svg></a>
</p> </p>
@ -168,6 +168,19 @@ web-frontend.service.consul. 0 IN A <code class='keyword'>10.0.1.109</code></cod
<code>$ curl http://localhost:8500/v1/catalog/datacenters <code>$ curl http://localhost:8500/v1/catalog/datacenters
<code class='keyword'>["dc1", "dc2"]</code> <code class='keyword'>["dc1", "dc2"]</code>
$ curl http://localhost:8500/v1/catalog/nodes?<code class='keyword'>dc=dc2</code> $ curl http://localhost:8500/v1/catalog/nodes?<code class='keyword'>dc=dc2</code>
[
{
"ID": "7081dcdf-fdc0-0432-f2e8-a357d36084e1",
"Node": "10-0-1-109",
"Address": "10.0.1.109",
"Datacenter": "dc2",
"TaggedAddresses": {
"lan": "10.0.1.109",
"wan": "10.0.1.109"
},
"CreateIndex": 112,
"ModifyIndex": 125
},
...</code> ...</code>
</div> </div>
</div> </div>

Loading…
Cancel
Save