Skip to main content

Stockpiler

Stockpiler gathers network device configurations and stores them in a local Git repository.

Stockpiler utilizes Nornir, Netmiko, and GitPython for a fully self-contained backup solution, and has been tested to function on Linux, MacOS, and Windows.

By default, it will read in device inventory from /etc/stockpiler/, and output backups to /opt/stockpiler/. Both are configurable by command line arguments.

Installation

Notes:

  1. Stockpiler utilizes a very recent release of Netmiko. This requires some specific handling (as outlined below), until other libraries update their dependencies.
  2. Stockpiler requires Python 3.7 or higher.
  3. Stockpiler utilizes Python Virtual Environments for isolation of the code/environment.

Installation Steps

  1. Create a directory for the Stockpiler virtual environment: mkdir stockpiler
  2. Create a virtual environment in that directory: python3 -m venv stockpiler
  3. Navigate to the new directory and activate it: cd stockpiler;source bin/activate
  4. Install Nornir: pip install nornir
  5. Edit the dependencies, this will require you to find the Napalm and Nornir METADATA files in your virtual environment:
    • Paths should be similar to:
      • lib/python3.7/site-packages/napalm-2.5.0.dist-info/METADATA
      • lib/python3.7/site-packages/nornir-2.3.0.dist-info/METADATA
    • In each file, find the lines similar to below that reference Netmiko:
      • Requires-Dist: netmiko (==2.4.2)
      • Requires-Dist: netmiko (>=2.3.3,<3.0.0)
    • Edit it to include 3.0.0, similar to the below:
      • Requires-Dist: netmiko (>=2.4.2)
      • Requires-Dist: netmiko (>=2.3.3)
  6. Install Stockpiler: pip install stockpiler

Configuration

As Stockpiler utilizes Nornir for the underlying inventory and task handling, see the Nornir documentation for more information on creating an inventory file or your configuration options

While we have provided a simple nornir_conf.yaml file, you are welcome to provide your own or customize the one provided by the package.

If you are using Windows (or wish to host your inventory in a different location than /etc/stockpiler/inventory), you will need to create a custom Nornir config file with your inventory paths.

Release files for stockpiler 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stockpiler 0.5.1
File Size Uploaded
stockpiler-0.5.1.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stockpiler 0.5.1
File Interpreter ABI Platform
stockpiler-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / stockpiler-0.5.1.tar.gz

Download URL stockpiler-0.5.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4025e668019fe25635c59d456ab3948ecb7a83c6dece38684778a9db53a4b2d5
BLAKE2b-256 checksum
How to use checksums
7326a078661e0ca16770f85f36a4080da5f4e1ad6c964c2aeb1e764f60e9111c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

Release files / stockpiler-0.5.1-py3-none-any.whl

Download URL stockpiler-0.5.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4094cf0826230369d8dd650fcf3eddb839c15670107ed13f12f2b76de86879b1
BLAKE2b-256 checksum
How to use checksums
236fe692c25a6f9cb17966ec2ecd9cd59484dcee83c7d1396f2a2114714dfeb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

Release history Release notifications | RSS feed

0.5.3

2 release files

0.5.2

2 release files

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page