two/conf/agent/config.exemple.yml
GnomeZworc d4b83bdb17
f-86: hostsvc: relais DNS et NTP par hôte, socket de contrôle #86
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-10-26 23:25:04 +01:00

129 lines
4.7 KiB
YAML

# Path to the Badger key-value database directory
database:
path: "/var/lib/two/data/"
# REST API server
api:
address: "0.0.0.0"
port: 8080
# Prometheus metrics server
prometheus:
address: "0.0.0.0"
port: 9090
# Worker pool that executes dispatched commands
worker:
# Number of concurrent worker goroutines
count: 4
# Maximum number of commands queued before Dispatch blocks
buffer_size: 100
# Timing (in seconds) for commands that wait on resource state transitions
times:
# Graceful VM shutdown before QMP quit
timeout_vms_stop: 300
# Interval between two system_powerdown during the shutdown
next_vms_shutdown: 30
# Subnet deletion: wait for its VMs still deleting
timeout_subnet_stop: 360
# VPC deletion: wait for its subnets still deleting
timeout_vpc_stop: 420
# Subnet creation: wait for its VPC to be running
timeout_subnet_start: 300
# VM creation: wait for the subnets of its interfaces to be running
timeout_vms_start: 300
# Interval between each state check
poll_interval: 2
# Bridge interface used when the requested iface_type is not found in interfaces
default_interface: br-000000
# Map of logical interface types to physical bridge names on this host.
# internet: public bridge, carrying vxlan-public (deploy.sh --public_vni); every VPC
# plugs its vp-<id>-e veth into it. br-public when absent, never default_interface.
interfaces:
vms: br-000000
internet: br-public
admin: br-000000
# MTU, identical on every hypervisor.
# mtu_vm: MTU of the VMs and of every bridge, veth, tap and VXLAN the agent creates,
# announced by DHCP option 26 and QEMU host_mtu. 1500 at most; below 1500 only with
# allow_mtu_vm_below_1500, never below 1280.
# allow_mtu_underlay_below_9000: a vxlan subnet (or a VPC with l3vni) is refused when
# its underlay is not at exactly 9000, unless this is true. The underlay must always
# carry mtu_vm plus 50 bytes of VXLAN header.
network:
mtu_vm: 1500
allow_mtu_vm_below_1500: false
allow_mtu_underlay_below_9000: false
# BGP control plane of the hypervisor (optional).
# Absent: the agent leaves FRR alone. Present: at every start, before serving its
# API, the agent applies the base BGP configuration through vtysh (router-id = the
# primary IPv4 of default_interface) and saves it with "write memory".
# Changing the asn requires removing the previous instance by hand.
# bgp:
# asn: 64600
# route_reflectors: [10.255.255.1]
# Metadata server runtime directory (cloud-init files per VM)
metadata:
run_dir: "/run/two/metadata"
# DHCP backend used for the subnets created by this agent.
# dnsmasq : dnsmasq@ instances driven by generated config files
# two : the built-in dhcp binary, driven over a unix socket
# Switching backends is a manual operation: drain the hypervisor, change this
# value, restart the agent. There is no hot migration.
# The per-subnet control socket and state file live in /run/two/dhcp, which is
# not configurable: the wrapper script hardcodes it too.
dhcp:
backend: two
# DNS and NTP relay of the VMs (two-hostsvc, one process per hypervisor).
# It listens on 169.254.169.253 in every VPC netns of the host; the VMs reach it
# through their gateway (interface_ip, announced by DHCP options 6 and 42).
# dns_upstream : resolvers queried first (ip or ip:port, port 53 by default);
# the host resolver (/etc/resolv.conf) comes after them
# ntp_upstream : NTP servers relayed first (ip or ip:port, port 123 by
# default); without an answer, the host clock replies
# rate_limit_per_vpc : requests per second, DNS and NTP together, per VPC
# Its control socket and state file live in /run/two/hostsvc.
hostsvc:
dns_upstream: []
ntp_upstream: []
rate_limit_per_vpc: 100
# QEMU runtime paths
qemu:
# UEFI firmware (requires apt install ovmf on Debian/Ubuntu)
ovmf_code_path: "/usr/share/OVMF/OVMF_CODE.fd"
ovmf_vars_template: "/usr/share/OVMF/OVMF_VARS.fd"
# Per-VM UEFI variable store (writable copy, created at start / deleted at stop)
uefi_vars_dir: "/run/two/vms/uefi"
# QEMU Unix socket directories
serial_dir: "/run/two/vms/serial"
monitor_dir: "/run/two/vms/monitor"
qmp_dir: "/run/two/vms/qmp"
# Consistency watchdog: periodically checks that resources marked running in the
# database still exist on the system, and reports the gaps. Read-only, never repairs.
# A persisting gap is reported at every tick (no deduplication).
watchdog:
enabled: true
interval_seconds: 60
# Admin API (read-only DB inspection, loopback only)
admin:
enabled: false
address: "127.0.0.1"
port: 9091
# Logging configuration
logger:
# Log level: debug, info, warn, error (default: info)
level: info
# Force debug level regardless of level setting (default: false)
debug: false