领事+领事代理

帮助了解领事节点和领事代理人的启动。 我有一个虚拟机上的consul + vault + 2领事nodes 。 在VM 3 ip LAN中。 所有这些在docker集装箱。 当我尝试从另一个虚拟机连接到这个领事。 那么代理连接到第一个控制台,不能连接到领事的其他节点。

据我了解,我需要在独立的IP主机虚拟机上运行所有3个控制台节点,这将能够达到他们的领事代理。 只有如何做到这一点?

我用这个docker工人启动consul + vault – 撰写:

 version: "2" services: consul1: image: "consul.1.0.1" container_name: "consul12" hostname: "consul12" volumes: - ./consul/config:/config/ ports: - "8400:8400" - "8500:8500" - "8600:53" - "8300:8300" - "8301:8301" command: "agent -config-dir=/config -ui -server -bootstrap-expect 3" consul2: image: "consul.1.0.1" container_name: "consul2"do hostname: "consul2" volumes: - ./consul/config:/config/ expose: - "8400" - "8500" - "8600" - "8300" - "8301" command: "agent -config-dir=/config -server -join consul1" depends_on: - consul1 consul3: image: "consul.1.0.1" container_name: "consul3" hostname: "consul3" volumes: - ./consul/config:/config/ expose: - "8400" - "8500" - "8600" - "8300" command: "agent -config-dir=/config -server -join consul1" depends_on: - consul1 vault: depends_on: - consul1 image: "vault" hostname: "vault" links: - "consul1:consul1" environment: VAULT_ADDR: http://127.0.0.1:8200 ports: - "8200:8200" volumes: - ./vault/tools/wait-for-it.sh:/wait-for-it.sh - ./vault/config/vault:/config - ./vault/config/vault/policies:/policies entrypoint: /wait-for-it.sh -t 20 -h consul1 -p 8500 -s -- vault server -config=/config/with-consul.hcl 

领事设置:

 { "data_dir": "/data", "client_addr": "0.0.0.0", "ports": { "dns": 53 }, "disable_update_check": true, "addresses": { "https": "0.0.0.0" } }