mgmt/nomad-configs/nodes/hcp1.hcl

137 lines
3.0 KiB
HCL
Raw 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.

# GitOps Test Configuration - Auto Update Test
# This is a test configuration to verify GitOps automation
# Added at: 2025-10-09 06:45 UTC
datacenter = "dc1"
data_dir = "/opt/nomad/data"
plugin_dir = "/opt/nomad/plugins"
log_level = "INFO"
name = "hcp1"
# Test configuration block - meaningless but harmless
test_config {
enabled = true
test_value = "gitops-automation-test"
timestamp = "2025-10-09T06:45:00Z"
}
bind_addr = "hcp1.tailnet-68f9.ts.net"
addresses {
http = "hcp1.tailnet-68f9.ts.net"
rpc = "hcp1.tailnet-68f9.ts.net"
serf = "hcp1.tailnet-68f9.ts.net"
}
advertise {
http = "hcp1.tailnet-68f9.ts.net:4646"
rpc = "hcp1.tailnet-68f9.ts.net:4647"
serf = "hcp1.tailnet-68f9.ts.net:4648"
}
ports {
http = 4646
rpc = 4647
serf = 4648
}
server {
enabled = false
}
client {
enabled = true
network_interface = "tailscale0"
# 配置七仙女服务器地址使用完整FQDN
servers = [
"semaphore.tailnet-68f9.ts.net:4647",
"ash1d.tailnet-68f9.ts.net:4647",
"ash2e.tailnet-68f9.ts.net:4647",
"ch2.tailnet-68f9.ts.net:4647",
"ch3.tailnet-68f9.ts.net:4647",
"onecloud1.tailnet-68f9.ts.net:4647",
"de.tailnet-68f9.ts.net:4647"
]
# 配置host volumes
host_volume "fnsync" {
path = "/mnt/fnsync"
read_only = false
}
host_volume "vault-storage" {
path = "/opt/nomad/data/vault-storage"
read_only = false
}
host_volume "traefik-certs" {
path = "/opt/traefik/certs"
read_only = false
}
host_volume "waypoint-data" {
path = "/opt/waypoint"
read_only = false
}
# 禁用Docker驱动只使用Podman
options {
"driver.raw_exec.enable" = "1"
"driver.exec.enable" = "1"
}
# 配置节点元数据
meta {
consul = "true"
consul_version = "1.21.5"
consul_server = "true"
}
# 激进的垃圾清理策略
gc_interval = "5m"
gc_disk_usage_threshold = 80
gc_inode_usage_threshold = 70
}
plugin "nomad-driver-podman" {
config {
socket_path = "unix:///run/podman/podman.sock"
volumes {
enabled = true
}
}
}
consul {
address = "ch4.tailnet-68f9.ts.net:8500,ash3c.tailnet-68f9.ts.net:8500,warden.tailnet-68f9.ts.net:8500"
server_service_name = "nomad"
client_service_name = "nomad-client"
auto_advertise = true
server_auto_join = false
client_auto_join = true
}
vault {
enabled = true
address = "http://master.tailnet-68f9.ts.net:8200,http://ash3c.tailnet-68f9.ts.net:8200,http://hcp1.tailnet-68f9.ts.net:8200"
token = "hvs.A5Fu4E1oHyezJapVllKPFsWg"
create_from_role = "nomad-cluster"
tls_skip_verify = true
}
telemetry {
collection_interval = "1s"
disable_hostname = false
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
}
# Additional test configuration for GitOps verification
# This block will be ignored by Nomad but shows in config
gitops_test {
deployment_id = "test-$(date +%s)"
automation_status = "active"
last_updated = "2025-10-09T06:45:00Z"
test_purpose = "verify-automatic-deployment"
}