Apstra ZTP - Cumulus
Cumulus Linux
Apstra ZTP has limited support for virtual Cumulus VX (CVX) devices.
- ZTP Cumulus Linux upgrades are not supported on CVX devices. Cumulus Linux
versions for CVX device must match
cumulus-versions
set inztp.json
file. - ZTP Logging to the controller does not work for CVX devices due to an unsupported device serial number (MAC address). This will be addressed in a future version.
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.
cumulus@cumulus:~$ df -h /dev/sda4 Filesystem Size Used Avail Use% Mounted on /dev/sda4 5.8
If ZTP is installing Cumulus Linux image, copy the image (for example
cumulus-linux-3.7.12-bcm-amd64.bin
) to the
/containers_data/tftp
directory. Modify the file permissions to
allow for download via tftp or http, for example:
admin@aos-server:/containers_data/tftp$ sudo chmod a+r cl-3.7.12-mlx-amd64.bin [sudo] password for admin: admin@aos-server:/containers_data/tftp$
If you're using ONIE to install Cumulus Linux 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_s3000_c2338-r0
for example).
When rebooting in ONIE, the device searches for this file on the TFTP server. If
the file is not found, ZTP fails.
Example: Cumulus Linux ztp.json
Cumulus Linux On-box Agent / Apstra ZTP 4.0
{ "cumulus": { "cumulus-versions": [ "3.7.12" ], "cumulus-image": "http://192.168.59.4/cumulus-linux-3.7.12-bcm-amd64.bin", "device-root-password": "root-password", "license": "cumulus_license_file", "custom-config": "cumulus_custom.sh", "device-user": "admin", "device-user-password": "admin-password", "system-agent-params": { "agent_type": "onbox", "job_on_create": "install" } } }
Cumulus Linux Custom Config File
When configuring custom-config
for Cumulus Linux devices, refer to
the example cumulus_custom.sh
, a bash executable file executed
during the ZTP process. It can set the SSH login banner or other system
configuration to be set 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 Cumulus Linux ZTP
If an agent is already installed on the device, before you restart the device ZTP process remove the agent either via the UI device agent installer or manually via the device CLI.
admin@cumulus:mgmt-vrf:~$ sudo dpkg -r aos-device-agent (Reading database ... 25366 files and directories currently installed.) Removing aos-device-agent (2.0.0-210) ... Processing triggers for systemd (215-17+deb8u4) ...
See Cumulus Device Agents for more information.
To restart the ONIE install and Cumulus Linux ZTP process:
cumulus@cumulus:mgmt-vrf:~$ sudo curl -o image.bin tftp://<tftpserver-ip>/cumulus-linux-3.7.5-bcm-amd64.bin cumulus@cumulus:mgmt-vrf:~$ sudo onie-install -a -f -i image.bin cumulus@cumulus:mgmt-vrf:~$ sudo reboot
To just do the Cumulus Linux ZTP process:
cumulus@cumulus:mgmt-vrf:~$ sudo echo "cumulus" >& /etc/hostname cumulus@cumulus:mgmt-vrf:~$ sudo net del vrf mgmt && net commit cumulus@cumulus:mgmt-vrf:~$ sudo ztp -R && sudo ztp -s cumulus@cumulus:mgmt-vrf:~$ sudo reboot
Troubleshoot Cumulus Linux ZTP
When in ZTP mode, the switch downloads the ztp.py
,
ztp.json
, OS image and license files to the
/mnt/persist
directory. For diagonstics, take note of the
/mnt/persist/aosztp.log
file.
Additional useful messages can be found in /var/log/syslog
(search
for 'ztp')