エージェント構成ファイル (デバイス)
コントローラセクション
[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サーバーに直接登録します。Apstraサーバーは、静的IPまたはDNSから検出できます。
ダイナミック DNS - デフォルトでは、Apstraデバイスエージェントは、dhcpが提供するDNS解決とホスト名解決に依存して、DNSエントリ aos-serverを指します。Apstraサーバーでは、 metadb 接続エントリーがDNSエントリーを指している場合、ApstraエージェントもそのDNSエントリーを解決できる必要があります。DNSは、aos-serverが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に登録する際に使用するサーバーインターフェイスです。例えば、サーバー上で、デバイス・エージェントをデフォルトの eth0 ではなく eth1 にバインドするには、 を指定します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エージェントは起動し、指定した時間(この例では15分)が経過すると、実行コンフィギュレーションを最も既知の以前の状態に置き換えます。具体的には、設定の復元期間が終了すると、 からの /.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)できます。個々のログファイルは、適切な最大サイズに近づくとローテーションされます。デフォルトでは、ログのローテーションは 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