Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
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.2
{}
Change Release
date_range 07-Feb-24

Augment Juniper Apstra GUI functionality with Apstra CLI, Apstra's command line utility. You can use Apstra CLI on any system that's running a compatible version of Docker.

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.2.0.11.tar.gz.) For example:
    content_copy zoom_out_map
    scp apstracli-release_4.2.0.11.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.2.0.11.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.2.0.11
    admin@aos-server:~$ 

Start Apstra CLI

  1. Start the Apstra CLI Docker container with the docker run command. In the example below, replace 4.2.0.11 with your Apstra CLI version, and replace 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.2.0.11 -s 10.28.65.3
    Password [admin]:
    Welcome to Juniper Apstra CLI! Press TAB for suggestions
    Juniper Apstra CLI version: release-4.2.0.11
    Juniper Apstra Server URL: https://10.28.65.3:443, Version: 4.2.0.11
    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. For assistance with using Apstra CLI, contact Juniper Support .
footer-navigation