Created
August 22, 2020 16:13
-
-
Save bewest/e6f1d5703d71248cf88f530efd91ddfb to your computer and use it in GitHub Desktop.
using consul with auth_request as ingress multiplexer
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
| + curl -siv localhost:2829/scheduled/consul/cluster/aaa/ | |
| + json | |
| * Trying ::1:2829... | |
| * TCP_NODELAY set | |
| * Connected to localhost (::1) port 2829 (#0) | |
| > GET /scheduled/consul/cluster/aaa/ HTTP/1.1 | |
| > Host: localhost:2829 | |
| > User-Agent: curl/7.65.3 | |
| > Accept: */* | |
| > | |
| * Mark bundle as not supporting multiuse | |
| < HTTP/1.1 200 OK | |
| < Server: restify | |
| < X-ELECTED-RUNNER: http://172.18.0.9:3434/environs/aaa | |
| < Content-Type: application/json | |
| < Content-Length: 5435 | |
| < Date: Sat, 22 Aug 2020 15:47:43 GMT | |
| < Connection: keep-alive | |
| < | |
| { [5435 bytes data] | |
| * Connection #0 to host localhost left intact | |
| HTTP/1.1 200 OK | |
| Server: restify | |
| X-ELECTED-RUNNER: http://172.18.0.9:3434/environs/aaa | |
| Content-Type: application/json | |
| Content-Length: 5435 | |
| Date: Sat, 22 Aug 2020 15:47:43 GMT | |
| Connection: keep-alive | |
| { | |
| "services": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-0", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.9", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88814, | |
| "ModifyIndex": 88814, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 1 | |
| } | |
| } | |
| }, | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "internal:cluster", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.14", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 89193, | |
| "ModifyIndex": 89193, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 30 | |
| } | |
| } | |
| } | |
| ], | |
| "preferred": { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| "tenants": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "aaa:backend:1", | |
| "ServiceName": "backends", | |
| "ServiceTags": [ | |
| "aaa", | |
| "aaa", | |
| "KoUvr2H4yRjZPbj", | |
| "tenant" | |
| ], | |
| "ServiceAddress": "172.18.0.9", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 5200 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 5200 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 5200, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88921, | |
| "ModifyIndex": 88921 | |
| } | |
| ], | |
| "candidates": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-0", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.9", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88814, | |
| "ModifyIndex": 88814, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 1 | |
| } | |
| } | |
| } | |
| ], | |
| "elected": { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-0", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.9", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88814, | |
| "ModifyIndex": 88814, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 1 | |
| } | |
| } | |
| }, | |
| "endpoint": "http://172.18.0.9:3434/environs/aaa" | |
| } | |
| + curl -si localhost:2831/environs/aaa | |
| + json | |
| HTTP/1.1 200 OK | |
| Server: nginx/1.17.10 | |
| Date: Sat, 22 Aug 2020 15:47:54 GMT | |
| Content-Type: application/json | |
| Content-Length: 391 | |
| Connection: keep-alive | |
| { | |
| "id": 1, | |
| "custom_env": { | |
| "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | |
| "envfile": "/opt/multi/working/environments/aaa.env", | |
| "base": "/app", | |
| "WORKER_DIR": "/opt/multi/working/workdir", | |
| "WORKER_ENV": "/opt/multi/working/environments", | |
| "HOSTEDPORTS": 5200, | |
| "internal_name": "aaa", | |
| "WEB_NAME": "aaa", | |
| "FOO": "BAR", | |
| "bazz": "buff", | |
| "PORT": 5200, | |
| "port": 5200 | |
| }, | |
| "state": "listening", | |
| "isDead": false | |
| } | |
| + curl -siv localhost:2829/scheduled/consul/cluster/afab9b2d/ | |
| + json | |
| * Trying ::1:2829... | |
| * TCP_NODELAY set | |
| * Connected to localhost (::1) port 2829 (#0) | |
| > GET /scheduled/consul/cluster/afab9b2d/ HTTP/1.1 | |
| > Host: localhost:2829 | |
| > User-Agent: curl/7.65.3 | |
| > Accept: */* | |
| > | |
| * Mark bundle as not supporting multiuse | |
| < HTTP/1.1 200 OK | |
| < Server: restify | |
| < X-ELECTED-RUNNER: http://172.18.0.14:3434/environs/afab9b2d | |
| < Content-Type: application/json | |
| < Content-Length: 5481 | |
| < Date: Sat, 22 Aug 2020 16:10:12 GMT | |
| < Connection: keep-alive | |
| < | |
| { [5481 bytes data] | |
| * Connection #0 to host localhost left intact | |
| HTTP/1.1 200 OK | |
| Server: restify | |
| X-ELECTED-RUNNER: http://172.18.0.14:3434/environs/afab9b2d | |
| Content-Type: application/json | |
| Content-Length: 5481 | |
| Date: Sat, 22 Aug 2020 16:10:12 GMT | |
| Connection: keep-alive | |
| { | |
| "services": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-0", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.9", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88814, | |
| "ModifyIndex": 88814, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 1 | |
| } | |
| } | |
| }, | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "internal:cluster", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.14", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 89193, | |
| "ModifyIndex": 89193, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 30 | |
| } | |
| } | |
| } | |
| ], | |
| "preferred": { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| "tenants": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "afab9b2d:backend:1", | |
| "ServiceName": "backends", | |
| "ServiceTags": [ | |
| "afab9b2d", | |
| "afab9b2d", | |
| "WzUVpyHP3aR9NAo", | |
| "tenant" | |
| ], | |
| "ServiceAddress": "172.18.0.14", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 5000 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 5000 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 5000, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 89202, | |
| "ModifyIndex": 89312 | |
| } | |
| ], | |
| "candidates": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "internal:cluster", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.14", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 89193, | |
| "ModifyIndex": 89193, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 30 | |
| } | |
| } | |
| } | |
| ], | |
| "elected": { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "internal:cluster", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.14", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 89193, | |
| "ModifyIndex": 89193, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 30 | |
| } | |
| } | |
| }, | |
| "endpoint": "http://172.18.0.14:3434/environs/afab9b2d" | |
| } | |
| + curl -si localhost:2831/environs/afab9b2d | |
| + json | |
| HTTP/1.1 200 OK | |
| Server: nginx/1.17.10 | |
| Date: Sat, 22 Aug 2020 16:10:33 GMT | |
| Content-Type: application/json | |
| Content-Length: 921 | |
| Connection: keep-alive | |
| { | |
| "id": 1, | |
| "custom_env": { | |
| "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | |
| "envfile": "/opt/multi/working/environments/afab9b2d.env", | |
| "base": "/app", | |
| "WORKER_DIR": "/opt/multi/working/workdir", | |
| "WORKER_ENV": "/opt/multi/working/environments", | |
| "HOSTEDPORTS": 5000, | |
| "WEB_NAME": "afab9b2d", | |
| "mongo": "mongodb://hosted.pepper.afab9b2d:0da2dd412af8dced8c04b12edadde3303cbcd2fc@hostedmongos/hosted-5ec3306981644c003bb6c5e6?authSource=admin", | |
| "internal_name": "afab9b2d", | |
| "MONGO_COLLECTION": "A.afab9b2d.i.entries", | |
| "MONGO_SETTINGS_COLLECTION": "A.afab9b2d.i.settings", | |
| "MONGO_TREATMENTS_COLLECTION": "A.afab9b2d.i.treatments", | |
| "MONGO_PROFILE_COLLECTION": "A.afab9b2d.i.profile", | |
| "MONGO_DEVICESTATUS_COLLECTION": "A.afab9b2d.i.devicestatus", | |
| "MQTT_MONITOR": "tcp://:[email protected]", | |
| "API_SECRET": "5ec33069bf6a07004726d1cf", | |
| "INSECURE_USE_HTTP": "true", | |
| "PORT": "5000", | |
| "port": "5000" | |
| }, | |
| "state": "listening", | |
| "isDead": false | |
| } | |
| + curl -siv localhost:2829/scheduled/consul/cluster/bbb/ | |
| + json | |
| * Trying ::1:2829... | |
| * TCP_NODELAY set | |
| * Connected to localhost (::1) port 2829 (#0) | |
| > GET /scheduled/consul/cluster/bbb/ HTTP/1.1 | |
| > Host: localhost:2829 | |
| > User-Agent: curl/7.65.3 | |
| > Accept: */* | |
| > | |
| * Mark bundle as not supporting multiuse | |
| < HTTP/1.1 200 OK | |
| < Server: restify | |
| < X-ELECTED-RUNNER: http://169.254.1.1:3638/environs/bbb | |
| < Content-Type: application/json | |
| < Content-Length: 3930 | |
| < Date: Sat, 22 Aug 2020 16:11:38 GMT | |
| < Connection: keep-alive | |
| < | |
| { [3930 bytes data] | |
| * Connection #0 to host localhost left intact | |
| HTTP/1.1 200 OK | |
| Server: restify | |
| X-ELECTED-RUNNER: http://169.254.1.1:3638/environs/bbb | |
| Content-Type: application/json | |
| Content-Length: 3930 | |
| Date: Sat, 22 Aug 2020 16:11:38 GMT | |
| Connection: keep-alive | |
| { | |
| "services": [ | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-0", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.9", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.9", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88814, | |
| "ModifyIndex": 88814, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 1 | |
| } | |
| } | |
| }, | |
| { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "internal:cluster", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "172.18.0.14", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "172.18.0.14", | |
| "Port": 3434 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3434, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 89193, | |
| "ModifyIndex": 89193, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 30 | |
| } | |
| } | |
| } | |
| ], | |
| "preferred": { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| "tenants": [], | |
| "candidates": [], | |
| "elected": { | |
| "ID": "ef8b2242-a960-a747-830a-6ba487da620f", | |
| "Node": "whimsy", | |
| "Address": "169.254.1.1", | |
| "Datacenter": "dc1", | |
| "TaggedAddresses": { | |
| "lan": "169.254.1.1", | |
| "lan_ipv4": "169.254.1.1", | |
| "wan": "169.254.1.1", | |
| "wan_ipv4": "169.254.1.1" | |
| }, | |
| "NodeMeta": { | |
| "consul-network-segment": "" | |
| }, | |
| "ServiceKind": "", | |
| "ServiceID": "cluster-1", | |
| "ServiceName": "cluster", | |
| "ServiceTags": [ | |
| "core", | |
| "api" | |
| ], | |
| "ServiceAddress": "169.254.1.1", | |
| "ServiceTaggedAddresses": { | |
| "lan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| }, | |
| "wan_ipv4": { | |
| "Address": "169.254.1.1", | |
| "Port": 3638 | |
| } | |
| }, | |
| "ServiceWeights": { | |
| "Passing": 1, | |
| "Warning": 1 | |
| }, | |
| "ServiceMeta": {}, | |
| "ServicePort": 3638, | |
| "ServiceEnableTagOverride": false, | |
| "ServiceProxy": { | |
| "MeshGateway": {}, | |
| "Expose": {} | |
| }, | |
| "ServiceConnect": {}, | |
| "CreateIndex": 88822, | |
| "ModifyIndex": 88822, | |
| "HealthStatus": { | |
| "total": { | |
| "active": 0 | |
| } | |
| } | |
| }, | |
| "endpoint": "http://169.254.1.1:3638/environs/bbb" | |
| } | |
| + curl -si localhost:2831/environs/bbb | |
| + json | |
| HTTP/1.1 200 OK | |
| Server: nginx/1.17.10 | |
| Date: Sat, 22 Aug 2020 16:11:46 GMT | |
| Content-Type: application/json | |
| Content-Length: 29 | |
| Connection: keep-alive | |
| { | |
| "id": null, | |
| "state": "missing" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment