mgmt/infrastructure/consul/jinja2-output/ch2-consul.hcl

82 lines
1.2 KiB
HCL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Consul 客户端配置模板
# 适用于所有13个节点服务器由Nomad接管
# 基础配置
datacenter = "pacific"
data_dir = "/opt/consul/data"
log_level = "INFO"
node_name = "ch2"
bind_addr = "100.117.106.135"
# 客户端模式服务器由Nomad接管
server = false
# 连接到Consul服务器集群
retry_join = [
"100.117.106.136", # ch4 (韩国)
"100.122.197.112", # warden (北京)
"100.116.80.94" # ash3c (美国)
]
# 性能优化
performance {
raft_multiplier = 5
}
# 端口配置
ports {
grpc = 8502
http = 8500
dns = 8600
}
# 启用Connect服务网格
connect {
enabled = true
}
# 缓存配置
cache {
entry_fetch_max_burst = 42
entry_fetch_rate = 30
}
# 节点元数据
node_meta = {
region = "pacific"
zone = "client"
}
# UI配置
ui_config {
enabled = False
}
# ACL配置
acl = {
enabled = false
default_policy = "allow"
}
# 日志配置
log_file = "/var/log/consul/consul.log"
log_rotate_duration = "24h"
log_rotate_max_files = 7
# 服务发现
services {
name = "ch2-service"
port = 8080
tags = ["ch2", "client"]
}
# 健康检查
checks {
name = "ch2-health"
tcp = "100.117.106.135:8080"
interval = "10s"
timeout = "3s"
}
# 自动加密