Consul is a service networking solution to automate network configurations, discover services, and enable secure connectivity across any cloud or runtime.

Install

Consul by HashiCorp
Consul is a service networking solution to automate network configurations, discover services, and enable secure connectivity across any cloud or runtime.

Start and Setup Agent Token

  • Create a setting file named consul-config.json
{
    "primary_datacenter": "dc1",
    "data_dir": "D:\\Projects\\consul_1.7.3_windows_amd64",
    "server": true,
    "server_name": "TopNguyen",
    "bootstrap": true,
    "ui": true,
    "ports": {
      "http": 8500
    },
    "acl" : {
      "enabled": true,
      "default_policy": "deny",
      "enable_token_persistence": true,
      "tokens": {
        "default": "26e3ea3a-81d5-c460-8abb-b74b4874648a",
        "master": "26e3ea3a-81d5-c460-8abb-b74b4874648a"
      }
    }
}
  • Run Consul Agent by CLI
consul agent -config-file="/Users/top/Workspaces/Consul/consul-config.json"
  • Default Consul will run on localhost:8500

Run Consul as a Service

  • Use nssm to add Consul as a Service
NSSM - the Non-Sucking Service Manager

Integration

Add Fabio (Load Balancing) integration with Consul

Fabio
Install and setup Fabio