Note: Run this to setup DC4 in consul-server
We are setting up as DC4 as a dc for this setup
sudo tee /etc/consul.d/consul-server.json <<EOF
{
"datacenter": "dc4",
"server": true,
"bootstrap_expect": 1
}
EOF
Tip: We highly discourage single-server production deployments.
Ideal setup whould be 5 server setup so it will be helpfull during failover.
Bootstrap_expect should be changed based on number of servers.
Restart consul server:
service consul restart
service consul status
Once you restart consul server you will see Active as soon as you restart and see status
Where to Next?
To setup vagrant for Consul, joining nodes into a cluster, and interacting with the agent, check out: Use consul UI.