代理配置文件(设备)
控制器部分
[controller] # <metadb> provides directory service for AOS. It must be configured properly # for a device to connect to AOS controller. metadb = tbt://aos-server:29731 # Use <web> to specify AOS web server IP address or name. This is used by # device to make REST API calls to AOS controller. It is assumed that AOS web # server is running on the same host as metadb if this option is not specified web = # <interface> is used to specify the management interface.This is currently # being used only on server devices and the AOS agent on the server device will # not come up unless this is specified. interface =
元
代理服务器发现是一种客户端服务器模型。Apstra 设备代理通过 metadb
连接直接注册至 Apstra 服务器。可以从静态 IP 或 DNS 中发现 Apstra 服务器。
动态 DNS - 默认情况下,Apstra 设备代理依靠 dhcp 提供的 DNS 解析和主机名解析,指向 DNS 条目 aos 服务器。在 Apstra 服务器上,如果 元 连接入口点进入 DNS 条目,那么 Apstra 代理也必须能够解决该 DNS 条目。DNS 必须配置,以便 aos 服务器解决到 Apstra 服务器本身的接口,因此代理配置为 metadb = tbt://aos-server:29731
静态 DNS - 我们可以添加一个直接指向 aos 服务器 IP 的静态 DNS 条目。添加静态 DNS 条目,或在设备上使用 DNS 名称服务配置。
Arista 和 Cisco 静态主机名
localhost(config)#ip host aos-server 192.168.25.250
从 Apstra 服务器获取 IP
admin@aos-server:~# ip addr show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:8a:39:05 brd ff:ff:ff:ff:ff:ff inet 192.168.59.250/24 brd 192.168.59.255 scope global eth0 inet6 fe80::a00:27ff:fe8a:3905/64 scope link valid_lft forever preferred_lft forever
然后,代理将配置为 metadb = tbt://aos-server:29731
。
Web
在未来的版本中,Apstra REST API 将能够在独立服务器上与 Apstra 服务器本身运行。此功能仅适用于 Apstra 的内部使用。
接口
设备代理源接口仅适用于 Linux 服务器(Ubuntu、CentOS)。此源 IP 是设备代理在注册 Apstra 时使用的服务器接口。例如,在服务器上,要将设备代理绑定到 eth1 ,而不是默认 eth0,请指定 interface = eth1
。
服务部分
[service] # AOS device agent by default starts in "telemetry-only" mode.Set following # variable to 1 if you want AOS agent to manage the configuration of your # device. enable_configuration_service = 0 # When managing device configuration AOS agent will restore backup config if it # fails to connect to AOS controller in <backup_config_restoration_timeout>, # specified as <hh:mm:ss>. Set it to 00:00:00 to disable backup restoration backup_config_restoration_timeout = 00:00:00
服务部分管理与配置渲染和遥测服务相关的特定代理配置。
enable_configuration_service
此字段指定了设备代理的操作模式:仅限遥测或完全控制。
enable_configuration_service = 0
要仅推送遥测(警报),请保留默认值 0
。除非网络管理员指定配置文件,否则配置文件不会修改。
enable_configuration_service = 1
设置此字段以 1
允许 Apstra 全面管理设备代理配置,包括推推发现和基于意图的完整配置。
backup_config_restoration_timeout
配置不 存储 在设备上。这会阻止设备启动并立即参与可能尚未正确配置的交换矩阵。发现阶段完成后,将配置 Apstra 设备代理。
backup_restoration_timeout = 00:00:00
如果 Apstra 设备代理无法与 Apstra 服务器联系,则此禁用状态(默认)会阻止其更换运行中的配置。未恢复任何之前的配置状态。
backup_restoration_timeout = 00:15:00
除默认 00:00:00
值以外的任何值,Apstra 代理均可在指定时间段之后(在此示例中十五分钟)后启动并替换运行中的配置,并替换为已知的前一状态。具体来说,配置恢复期到期后,这些 /.aos/rendered/
文件将恢复为系统。
登录部分
[logrotate] # AOS has builtin log rotate functionality. You can disable it by setting # <enable_log_rotate> to 0 if you want to use linux logrotate utility to manage # your log files. AOS agent reopens log file on SIGHUP enable_log_rotate = 1 # Log file will be rotated when its size exceeds <max_file_size> max_file_size = 1M # The most recent <max_kept_backups> rotated log files will be saved. Older # ones will be removed. Specify 0 to not save rotated log files, i.e. the log # file will be removed as soon as its size exceeds limit. max_kept_backups = 5 # Interval, specified as <hh:mm:ss>, at which log files are checked for # rotation. check_interval = 1:00:00
Apstra 在一系列文件下登录到 /var/log/aos
文件夹。Apstra 实施自己的日志旋转方法, /var/log/aos
以防止填充。您可以启用 (2) 或禁用 (1) 日志旋转。每个日志文件在接近适当的最大大小时都会旋转。默认情况下,每小时都会进行日志旋转。
设备信息部分
[device_info] # <model> is used to specify the device's hardware model to be reported to AOS # device manager. This is only used by servers, so can be ignored for non- # server devices such as switches. By default a server reports "Generic Model" # which matches a particular HCL entry's selector::model value in AOS. Specify # another model for the server to be classified as a different HCL entry. model = Generic Model
模型
设备信息部分用于在服务器注册到 Apstra 时修改其默认设备模型。例如, Server 2x10G
将服务器更改为双连接 L3 服务器。所有有效选项 model
包括:
- 通用模型
- 服务器 2x10G
- 服务器 1x25G
- 服务器 1x40G
- 服务器 4x10G
设备配置文件部分
# <device_profile_id> is used to specify the device profile to be associated to # the device. Selector in the specified device profile should match the # reported device facts. device_profile_id = [credential] username = admin