Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Apstra CLI Utility

Release: Juniper Apstra 4.1
{}
Change Release
date_range 15-Jun-23

You can augment Juniper Apstra GUI functionality with Apstra's command-line interface utility called Apstra CLI (previously known as AOS CLI). Apstra CLI is delivered in a Docker container. You can use it on any system that's running a compatible version of Docker.

As of Apstra version 4.1.1, Apstra-CLI is GA. Prior versions are considered experimental. For more information on experimental versions, see Juniper Support Knowledge Base article KB36747.

For steps on installing and accessing Apstra CLI, see sections below.

Install Apstra-CLI

  1. Download the Apstra CLI Utility for your Apstra version from the Application Tools section of Juniper Support Downloads.
  2. Copy the Apstra CLI Docker container tar.gz file to the Apstra server. (The file name is something like, apstracli-release_4.1.2.5.tar.gz.) For example:
    content_copy zoom_out_map
    scp apstracli-release_4.1.2.5.tar.gz admin@10.28.65.3/home/admin
  3. Load the provided Docker image into Docker with the docker image load command. For example:
    content_copy zoom_out_map
    admin@aos-server:~$ docker image load -i apstracli-release_4.1.2.5.tar.gz
    beee9f30bc1f: Loading layer [==================================================>] 5.862MB/5.862MB
    3fc750b41be7: Loading layer [==================================================>] 821.8kB/821.8kB
    20a7b70bdf2f: Loading layer [==================================================>] 59.53MB/59.53MB
    879c0d8666e3: Loading layer [==================================================>] 6.749MB/6.749MB
    ba4121fa2557: Loading layer [==================================================>] 3.451MB/3.451MB
    ee87976d1e1f: Loading layer [==================================================>] 470.4MB/470.4MB
    Loaded image: apstracli:release_4.1.2.5
    admin@aos-server:~$ 

Access Apstra-cli

  1. Start the Juniper Apstra CLI Docker container with the docker run command. In the example below replace 4.1.2.5 with your Apstra CLI version, and 10.28.65.3 with the IP address of your Apstra server. The password is your Apstra GUI password (not the VM password.
    content_copy zoom_out_map
    admin@aos-server:~$ docker run --rm -ti -v ~:/mytmp apstracli:release_4.1.2.5 -s 10.28.65.3
    Password [admin]:
    ----------------------------------------------------------------------------------------------------
    ****************************************************************************************************
                                 NOTE: This is a Limited Availability tool
                    Use it ONLY under the strict supervision of Juniper Apstra personnel
    ****************************************************************************************************
    ----------------------------------------------------------------------------------------------------
    Welcome to Juniper Apstra CLI! Press TAB for suggestions
    Juniper Apstra CLI version: release-4.1.2.5
    Juniper Apstra Server URL: https://10.28.65.3:443, Version: 4.1.2-269
    apstra-cli>
  2. Apstra-CLI comes with a built-in feature that auto-completes commands. Press the TAB key, then the up and down arrow keys to explore this tool and its functionality. You can also type --help for descriptions of each function.
For examples of how to use apstra-cli, see Apstra-CLI Commands in the References section.
footer-navigation