Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation  Back up to About Overview 

Installing Junos Snapshot Administrator in Python

You install Junos Snapshot Administrator in Python (jsnapy) on a remote server in the network. Prior to installing jsnapy, ensure that the remote server is running an OS that is capable of running Python 2.6 or later. This includes, but is not limited to:

  • Linux (Debian, Ubuntu, Fedora, CentOS, and FreeBSD)

  • Mac OS X

Note: Although Microsoft Windows can run Python 2.6, jsnapy is not supported on Windows.

Due to the wide range of possible supported OSs, there are dependencies within each OS that must also be fulfilled. Table 1 shows the dependencies for each OS.

Table 1: jsnapy Dependencies

OS

Dependencies

CentOS

  • pip

  • python-devel

  • libxml2-devel

  • libxslt-devel

  • gcc

  • openssl

  • libffi-devel

Debian

  • python-pip

  • python-dev

  • libxml2-dev

  • libxslt-dev

  • libssl-dev

  • libffi-dev

Fedora

  • python-pip

  • python-devel

  • libxml2-devel

  • libxslt-devel

  • gcc

  • openssl

  • libffi-devel

FreeBSD

  • py27-pip

  • libxml2

  • libxslt

OSX

  • xcode

  • xquartz

  • pip

Ubuntu

  • python-pip

  • python-dev

  • libxml2-dev

  • libxslt-dev

  • libssl-dev

  • libffi-dev

There are two methods that can be used to install jsnapy: using the Python package manager, pip, or using a Python setup script, setup.py, from cloned github source code.

To install jsnapy using pip, enter the following command

user@jsnapy-server:~> sudo pip install git+https://github.com/Juniper/jsnapy.git

To download the source code and install with the setup script:

  1. Clone the source code from github using one of the following options:
    1. Use the git command at the server CLI:

      user@jsnapy-server:~> git clone https://github.com/Juniper/jsnapy.

    2. Download the source code as a zip file from https://github.com/Juniper/jsnapy by clicking the Clone or Download button.

      Note: One of the options after clicking the Clone or Download button is to Open in Desktop. This option refers to the GitHub Desktop. This installation guide does not cover the installation or use of GitHub Desktop or installing jsnapy using GitHub Desktop.

  2. Unzip the downloaded file:

    user@server:~> unzip jsnapy-master.zip

  3. Go to the jsnapy-master folder:

    user@server:~> cd jsnapy-master

  4. Use pip to install jsnapy:

    user@server:~> sudo pip install dist/jsnapy-0.1.tar.gz

Jsnapy is under ongoing development by Juniper and is posted on GitHub. As such, there are often updates available. To update jsnapy to the latest development code after it is installed on your server, use the pip command with the update flag, as shown:

user@server:~> sudo pip install -U git+https://github.com/Juniper/jsnapy.git

To update to the latest release code, use the pip command with the update flag, as shown:

user@server:~> sudo pip install -U jsnapy

The jsnapy installer creates the files and directories listed in Table 7 on the jsnapy server under /etc/jsnapy:

Table 2: Directories and Files Contained in /etc/jsnapy

Directory or File Name

Purpose

jsnapy.cfg

This file specifies the default paths for configuration files, snapshot files, and test files.

logging.yml

This file specifies the settings for logging of jsnapy events and messages.

samples

This directory contains an assortment of sample configuration and test files.

snapshots

This directory is the default location for the storage of snapshot files created by jsnapy. The snapshots are stored here by device and test.

testfiles

This directory is the default location for storing jsnapy test files.

 

Related Documentation

  • Junos Snapshot Administrator in Python Overview

  • Understanding Junos Snapshot Administrator in Python Configuration Files

 

Modified: 2018-07-18