Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

SONiC Device Agent

SONiC Device Agent Overview

Although the preferred method of installing device system agents is from the Apstra GUI, you can manually install Apstra agents from the CLI. Only in rare exceptions would you need to manually install agents, which requires more effort and is error-prone. Before manually installing agents, you should have an in-depth understanding of the various device states, configuration stages, and agent operations . For assistance, contact Juniper Support.

Note:

You can also use Apstra ZTP to automatically boot and install agents and prerequisite configuration on switches. Using Apstra ZTP is simpler and easier to support at scale than manually installing agents.

The SONiC device agent manages the following files in the filesystem:

  • /etc/sonic/config_db.json - The main configuration file for SONiC, specifying interfaces, IP addresses, port breakouts etc.
  • /etc/sonic/frr/frr.conf - frr.conf contains all of the routing application configuration for BGP on the device.
CAUTION:

Do not edit the config_db.json or frr.conf files manually at any time, before or after device system agent installation. The agent overwrites any existing configuration in these files.

Configure Management IP Manually (SONiC)

SONiC automatically creates a management VRF for the "eth0" management interface. By default, "eth0" gets a DHCP address from the management network. In most cases, no management configuration should be needed.

However, if you need to manually configure a SONiC device management IP address, you must configure it using the sonic-cli interface.

You can check the Managment VRF from the SONiC Linux command line.

Install Agent Manually (SONiC)

To manually install SONiC device agents you'll download, install and configure the agent software, then acknowledge it to bring it under Apstra management.
  1. Download the Apstra agent with the ​sudo cgexec -g l3mdev:mgmt curl -o /tmp/aos.run -k -O https://{{aos-ip-address}}/ device_agent_images/aos_device_agent{{aos-version}}-{{aos-build}}.runcurl​​` command.
  2. Install the Apstra agent with the sudo /bin/bash /tmp/aos.run -- --no-start command.
  3. Update /etc/aos/aos.conf with the sudo vi /etc/aos/aos.conf command to set the IP of the Apstra server and enable configuration service.
    • For the following, replace "aos-server" with the IP address or valid FQDN of your Apstra server.
    • For example
    • For the following, add the management interface (usually eth0).
    • For the following, set "enable_configuration_service" to 1 to enable "full control" mode from Apstra.
    • Add the following, "credential" configuration with "username = " and the local Linux user to be used for the agent (usually "admin").
  4. Start the agent with the sudo service aos start command and check its status with the sudo service aos status command.
  5. From the left navigation menu in the Apstra GUI, navigate to Devices > Managed Devices to acknowledge the device, then you can assign it to a blueprint.

Uninstall Agent Manually (SONiC)

To manually uninstall SONiC Apstra device agents you'll stop Apstra server, uninstall the agent, and remove any remaining Apstra files.
  1. Stop the Apstra agent with the sudo service aos stop command.
  2. Uninstall the Apstra agent with the sudo dpkg --purge --force-all aos-device-agent command.
  3. Remove remaining Apstra files with the sudo rm -fr /etc/aos /var/log/aos /mnt/persist/.aos /opt/aos /run/aos /run/lock/aos /tmp/aos_show_tech /usr/sbin/aos* command.