Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

In-Place and VM-to-VM ZTP Upgrade

Starting in Juniper Apstra Data Center Director 6.1.0, both in-place and VM-to-VM ZTP upgrades are automated. This means that you don't have to manually deploy a new ZTP VM from the image and copy over the configuration files. The current version of Apstra needs to be version 5.0.0 or later in order to upgrade. You can upgrade from 5.0.0, 5.1.0, and 6.0.0 to 6.1.0 and from 5.0.0, 5.1.0, and 6.1.0 to 6.1.1.

Download the Apstra ZTP Upgrade Installer

Before you can perform either an in-place upgrade or VM-to-VM upgrade, locate and download the Apstra ZTP Upgrade Installer.

  1. Navigate to https://support.juniper.net/support/downloads/?p=apstra.

  2. In the All Products edit box, enter Juniper Apstra Data Center Director.

  3. Select 6.1.0 from the Version drop-down window.

  4. Navigate to the Application Tools table and scroll down to the Apstra ZTP Upgrade Installer row.

  5. Download the Apstra ZTP Upgrade Installer in the Downloads column.

In-Place Upgrade

This section describes what happens before, during, and after an in-place upgrade. An in-place upgrade occurs on the VM that is currently running.

To initiate an in-place upgrade, issue the sudo bash apstra-ztp.run command on your VM.

Pre-Upgrade Validation

When you start the installation, the installer performs the following pre-checks:

  • Verifies the Ubuntu version

  • Verifies the Docker version

  • Verifies that the upgrade path is supported

    The current version of Apstra needs to be version 5.0.0 or later in order to upgrade to 6.1.0.

  • Verifies the device ZTP state

If you want to only perform these pre-validation checks, you can append the --dry-run precondition flag to the sudo bash apstra-ztp.run command--for example, sudo bash apstra-ztp.run --dry-run

Perform an In-Place Upgrade

Follow these steps to perform an in-place upgrade.

  1. Issue the sudo bash /opt/apstra_ztp/apstra-ztp.run

    command. As you can see, ZTP requires these versions--docker-ce:5:27.5.1-1~ubuntu.22.04~jammy--for a successful installation.

    You need to download and install these versions manually.

  2. To upgrade the Docker version, issue the opt-get update

    command. This command locates and downloads the Ubuntu and Docker updates.

    The new versions of Docker and Ubuntu have been installed.

  3. Now you can issue the sudo bash /opt/apstra_ztp/apstra-ztp.run command to continue with the upgrade. After you complete the upgrade, you will see a screen similar to this one.

  4. To verify the version of ZTP, issue the cat /etc/apstra_ztp/version command.

Forcing an Upgrade to the Same Version of ZTP

There might be situations where you want to upgrade to the same version of ZTP that is already installed on your ZTP server. In this scenario, you will need to "force" the upgrade.

If you want to force the upgrade, append the -f option to the /apstra-ztp-6.1.0.run --command.

For example:

Restoring/Backing Up the State of a VM after a Failed Upgrade

After the system performs its pre-upgrade checks and before the ZTP upgrade starts, the ZTP installer takes a snapshot of the existing state of the VM. You can find the snapshot at the /var/lib/apstra_ztp/snapshot directory.

To restore the VM to its pre-upgrade state, issue the ztp_restore command.

VM-to-VM ZTP Upgrade

This section describes what happens during a VM-to-VM upgrade, as well as the steps you need to take to perform a VM-to-VM ZTP upgrade.

You can perform a VM-to-VM upgrade from Apstra 5.0.0 and later to Apstra 6.1.0.

You need to have a VM with 6.1 installed.. From this device, you can import the details of the VM that is running an earlier version of Apstra and upgrade that VM to 6.1.0.

To initiate a VM-to-VM upgrade, issue the ztp_import_state command on the VM that is running 6.1.0.

During the upgrade, the ztp_import_state command performs the following tasks:

  • Stops running the apstra-ztp service.

  • Copies the configuration files from the old VM to the new VM.

  • Updates the ZTP server IP address in the configuration files on the new VM.

  • Copies the secret key from the old VM.

  • Imports the database from the old VM.

  • Starts new Apstra ZTP service on the new VM.

Pre-Upgrade Validation

When you start the installation, the following pre-checks are performed:

  • Verifies that the upgrade path is supported.

    The current version of Apstra needs to be version 5.0.0 or later in order to upgrade to 6.1.0.

  • Checks resource utlization.

  • Checks the state of ZTP on a device.

Performing a VM-to-VM ZTP Upgrade

Follow these steps to perform a VM-to-VM ZTP upgrade.

  1. Issue the ztp_import_state command on the VM that is running 6.1.0.

    You need to append the following flags to the ztp_import_state command to import the IP address, username, password, and root password from the VM that is running a previous version of Apstra.

    • --ip address

    • --username

    • --password

    • --root-password

  2. You can optionally append the following flags to the ztp_import_state command to perform other tasks.

    • --dry-run-precondition

      Executes only precondition checks and skips the upgrade process.

      For example:

    • --skip-resource-validation

      Skips validating that ZTP has the required memory and disk usage for an upgrade.

    • --skip-ztp-inprogress-check

      Skips checking that ZTP is in progress on any device.

Restoring/Backing Up the State of a VM after a Failed Upgrade

After the system performs its pre-upgrade checks and before the ZTP upgrade starts, the ZTP installer takes a snapshot of the existing state of the VM. You can find the snapshot at the /var/lib/apstra_ztp/snapshot directory.

To restore the VM to its pre-upgrade state, issue the ztp_restore command.

Rollback the New VM to its Pre-Upgrade State

You can rollback the new VM you just upgraded to its pre-upgrade state. If there have been any changes on the new VM, they are not rolled back to the old VM.

To rollback the new VM to its pre-upgrade state, perform the following steps:

  1. Stop the Apstra ZTP service on new VM by issuing the following commands:

    • sudo systemctl stop apstra-ztp.service
    • sudo systemctl disable apstra-ztp.service
  2. Start the Apstra ZTP service on the old VM by running following commands:

    • sudo systemctl enable apstra-ztp.service
    • sudo systemctl start apstra-ztp.service