Apstra ZTP - SONiC
Enterprise SONiC and ZTP Overview
Apstra ZTP 4.0 used with Apstra version 4.0 has support for SONiC Enterprise Distribution devices. There is no support for any SONiC devices with earlier versions of Apstra ZTP or the software.
Apstra ZTP manages the bootstrap and life-cycle of Enterprise SONiC devices with onbox agents installed. It uses a custom script to create onbox agents, create local users and set other system configuration.
As part of the ZTP process a new OS image is copied to the switch. Before installing Apstra ZTP ensure that the switch has sufficient disk space for the OS image.
If you are using ONIE to install Enterprise SONiC on a device, you must copy the
image to the /containers_data/tftp
directory and rename it to
onie-installer
or another ONIE download name
(onie-installer-x86_64-dell_z9100_c2538-r0
for example).
When rebooting in ONIE, the device searches for this file on the HTTP then TFTP
server. If the file is not found, ZTP fails. Once ONIE SONiC installation
successfully completes, the SONiC device starts ZTP automatically.
Example: Enterprise SONiC -ztp.json
SONiC Onbox Agent / Apstra ZTP 4.0
{ "sonic": { "sonic-versions": [ "SONiC-OS-3.2.0-Enterprise_Advanced" ], "sonic-image": "http://192.168.59.4/sonic-3.2.0-GA-adv-bcm.bin", "device-root-password": "root-password", "device-user": "admin", "device-user-password": "admin-password", "custom-config": "sonic_custom.sh", "system-agent-params": { "agent_type": "onbox", "job_on_create": "install" } } }
If you use another device-user
besides
admin
(aosadmin
for example) Apstra
ZTP creates this new user, but it does not change the password for the
default SONiC admin
user (password set to
YourPaSsWoRd
by default).
Enterprise SONiC Custom Config File
When configuring custom-config
for Enterprise SONiC devices, refer
to the example sonic_custom.sh
, a bash executable file executed
during the ZTP process. It can set system configuration (such as Radius
authentication) prior to device system agent installation.
#!/bin/bash sed -i s/"#Banner.*"/"Banner \/etc\/issue.net"/ /etc/ssh/sshd_config cat >& /etc/issue.net << EOF Provisioned by AOS Date: $(date) EOF service ssh restart
Restart Enterprise SONiC ZTP
To restart the SONiC ZTP process, use the sudo ztp enable
and
sudo ztp run
commands.
admin@sonic:~$ sudo ztp enable admin@sonic:~$ sudo ztp run ZTP will be restarted. You may lose switch data and connectivity, continue?[yes/NO] yes admin@sonic:~$