Junos Automation Stack and DevOps Concepts

Introduction to Agile

Agile software development practices:

Manifesto for Agile Software Development

  • Highest priority is customer satisfaction through early and continuous delivery of valuable software.
  • Welcome changing requirements.
  • Shorter release timescales preferred with frequent delivery.
  • Business people and developers must work together throughout the project.
  • Working software is the primary measure of progress
  • The art of maximising the amount of work not done (simplicity) is essential.

Values

  • Individuals and Interactions over processes and tools.
  • Working Software over comprehensive documentation.
  • Customer Collaboration over contract negotiation.
  • Responding to Change over following a plan.

DevOps Overview

Culture of collaboration – DevOps is a set of practices and values, people and communication are key – lots of overlap between Developers and Operational people in terms of goals and meetings.

Three ways:
-Flow or Systems Thinking
The flow refers to the flow of the system as a whole. This is about not letting the local improvements of an individual area of the system hinder the flow of the system as a whole. Systems should work well together. (And avoid technical debt – band aid solutions, you should use best practices) – We should always try and make the flow quicker, while avoiding technical debt.
-Feedback
Quick feedback is key to making quick course directions. The faster you can get feedback on an element of the system the better it is (more time to fix it less time implementing something that doesn’t work properly). Feedback should be analysed at every stage of development, and it should be part of development workflows. It speeds up flow and reduces errors.
-Continuous experimentation and learning
Fostering an environment of taking risks and learning from failures. Through taking risks and experimenting you can work out the best way to do something. Through working with the ops team – who will be able to most readily see the issues that could be improved on.

DevOps ideology:
Improvements to speed/cost/reliability through automation and testing.

Continuous Practices CI/CD

CI: Continuous Integration: Practice of frequently committing and automatic testing of code. At every stage there are automated tests (unit tests.etc) executed against the code.

Order:
1- Code First step code is written, much smaller changes than in the traditional waterfall model.
2- Version Control
3- Review – Another programmer will review any changes that have been made and approve them.
4- Integrate
5- Deliver to staging environment for testing
6- Deploy to the live site

CD: Continuous Delivery/Deployment CD: Delivering code bases frequently and deploying changes to production frequently.

Junos Automation Overview

Junos supports many forms of automation, the jsd process (jet) and the mgd process (all other automation for the JNCIA-Devops)

Open API Graph
Graph taken from here

JET and REST API (occurs over JRPC)
JET uses the JET Services Process – jsd
It Exposes internal APIs for automation, and deals with them directly rather than going through the management Deamon.
It enables 3rd aprty applications to run on the box, such as Puppet and Chef agents. Supports for Python and C++ applications on-box.
Allows for fast programmatic config changes (1000s per second)
JSD and MQTT Notification broker are seperate services on different TCP ports (running through a seperate service).

JSNAPy
The Python version of JSNAP
Allows us to take snapshots of configuration and compares them to predefined rules (snap check) or previous snapshots (snap snap check).

ZTP
Zero touch provisioning uses DHCP options to provide ZTP information. Both configuration files and software upgrades can both be applied using ZTP. Requires both DHCP server and FTP/TFPT/HTTP server to serve software and configs.

Process:

  • Unbox cables, and power up the switch.
  • Device requests DHCP address.
  • DHCP server responds with the IP address along with the image name, config gile name, and the location of these files.
  • Device downloads the image file and also the config file from the location indicated in the DHCP response.
  • Device compares the running software version with the downloaded software version and if they are different, installs the downloaded software and reboots.
  • Device installs the downloaded configuration file and stops the ZTP process.

Ansible – Agentless
Salt – Agentless (But uses a salt master)
Chef – Requires Agent
Puppet – Requires Agent