Created
December 23, 2022 02:10
-
-
Save Ranjandas/14ab098509f5a6f1ac9a94a0d98fc8df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service { | |
name = "counting" | |
id = "counting" | |
port = 9003 | |
address = "127.0.0.2" | |
connect { | |
sidecar_service {} | |
} | |
check { | |
id = "counting-check" | |
http = "http://localhost:9003/health" | |
method = "GET" | |
interval = "1s" | |
timeout = "1s" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service { | |
name = "dashboard" | |
port = 9002 | |
address = "127.0.0.1" | |
connect { | |
sidecar_service { | |
proxy { | |
upstreams = [ | |
{ | |
destination_name = "counting" | |
local_bind_port = 5000 | |
destination_peer = "dc2" | |
}, | |
] | |
} | |
} | |
} | |
check { | |
id = "dashboard-check" | |
http = "http://localhost:9002/health" | |
method = "GET" | |
interval = "1s" | |
timeout = "1s" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kind = "exported-services" | |
Name = "default" | |
Services = [ | |
{ | |
Name = "counting" | |
Consumers = [ | |
{ | |
Peer = "dc1" | |
} | |
] | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kind = "proxy-defaults" | |
Name = "global" | |
MeshGateway { | |
mode = "local" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisite
If running on macOS, add an additional IP to loopback
Consul 1.14.3
A supported envoy binary
Steps
Start dc1 with dashboard service registered
Start dc2 with counting service registered
Generate peering token in dc1
Establish peering in dc2
Run mesh-gateway in dc1
Run mesh-gateway in dc2
Run dummy Python webservers for counting and dashboard
Run dashboard sidecar proxy
Run counting sidecar proxy
Export counting to dc1
Write proxy-defaults to both DCs