This post follows on from my last post about the Junos EZ Library, Jeremy Schulman’s work to make Junos devices easily manageable via Python, even for those of us who are not hard core programmers by trade.
In order to run the Junos EZ library I had to prepare my Ubuntu system with a few pre-requisites. Jeremy’s first post talks about what’s required on his CentOS Developer Workstation; this post does the same for Ubuntu server.
Pre-Requisites
# Install the NETCONF 'ncclient' library:
pip-2.7 install git+https://github.com/Juniper/ncclient.git
# Install the Junos "EZ" library:
pip-2.7 install git+https://github.com/jeremyschulman/py-junos-eznc.git
But hold on, because those commands need other things to be in place in order to succeed. At the very least, along with the above, you will need Python 2.7 and the “pip–2.7” tool. On my Ubuntu server, I had Python 2.7 installed, but the rest took a few more steps.
Read more
Junos PyEZ is a Python "micro-framework" to remotely manage or automate Junos OS devices. The user is NOT required to be a software programmer, have sophisticated knowledge of Junos OS, or have a complex understanding of the Junos OS XML API.
This library was built for two types of users:
Non-Programmers - Python as a Power Shell
This means that non-programmers, for example, the Network Engineer, can use the native Python shell on their management server (laptop, tablet, phone, and so on) as their point-of-control for remotely managing Junos OS devices. The Python shell is an interactive environment that provides the necessary means to perform common automation tasks, such as conditional testing, for-loops, macros, and templates. These building blocks are similar enough to other "shell" environments, like Bash, to enable the non-programmer to use the Python shell as a power tool, instead of a programming language. From the Python shell, a user can manage Junos OS devices using native hash tables, arrays, and so on, instead of using device-specific Junos OS XML or resorting to "screen scraping" the actual Junos OS CLI.
Programmers - Open and Extensible
There is a growing interest and need to automate the network infrastructure into larger IT systems. To do so, traditional software programmers, DevOps, hackers, and so on, need an abstraction library of code to further those activities. Junos PyEZ is designed for extensibility so that the programmer can quickly and easily add new widgets to the library in support of their specific project requirements. There is no need to "wait on the vendor" to provide new functionality. Junos PyEZ is not specifically tied to any version of Junos OS or any Junos OS product family.
Read more
Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
Ansible’s goals are foremost those of simplicity and maximum ease of use. It also has a strong focus on security and reliability, featuring a minimum of moving parts, usage of OpenSSH for transport (with an accelerated socket mode and pull modes as alternatives), and a language that is designed around auditability by humans – even those not familiar with the program.
Read more