My personal study notes for the JNCIA-DEVOPS. I do this so that I can quickly reference and update them and hopefully others might find them useful. There’s multiple training modules and videos available for free on Junos Genius, and if you complete the training and practice test they offer a free voucher to take the exam (usually around $200 USD). https://cloud.contentraven.com/junosgenius

 

Exam Outline:

Exam topics outline is from the juniper website:

https://www.juniper.net/us/en/training/certification/certification-tracks/devops/?tab=jnciadevops

1. Junos Automation Stack and DevOps Concepts

Identify concepts and general features of Junos automation and DevOps.

 

  • Automation tools
  • Automation frameworks
  • Automation APIs
  • DevOps culture, practices, and tools
2. XML/NETCONF

Identify concepts and general features of Junos automation and DevOps.

  • Automation tools
  • Automation frameworks
  • Automation APIs
  • DevOps culture, practices, and tools
3. Data Serialization

Identify the concepts, benefits, or operation of data serialization.

  • YAML
  • JSON
4. Ansible

Identify the use of Ansible for automating Junos tasks.

  • Architecture and capabilities
  • Playbooks
  • Juniper Junos Ansible modules (modifying configurations, operations commands, software updates, and more)
  • Basic inventory files
5. Python or PyEZ

Identify Python or Junos PyEZ tools for automating Junos.

  • Syntax and concepts
  • Remote Procedure Calls (RPCs)
  • PyEZ exception handling
  • Device status and configuration handling
6. REST API

Identify the concepts, benefits, or operation of the Junos REST API.

  • Configuring the Junos REST API
  • Using the REST API Explorer
  • Using curl to access the REST API

Study Notes:

1. Junos Automation Stack and DevOps Concepts

In the above image you’ll want to focus on the “jsd process” and “mgd process” and then notice what services they support above. There will be questions on the test about which service runs on which process. Its pretty easy to just memorize JET and gRPC is on the jsd process, then everything else is running on the mgd process (other than SNMP). 


Automation Tool  |  Agent required?
Salt                                No
Chef                              Yes
Ansible                          No
Puppet                          Yes

Waterfall: 

Requirements > Design > Code > Test > Deploy

  • Next phase only starts after finishing previous one
  • Generally considered as lacking flexibility and slow to develop new features
  • The larger the new codebase, the more likely there will be issues in production

Devops: 

  • A software or systems development methodology
  • Initially “agile infrastructure” 2008
  • Unifies development, operations, and other teams (enables communication, collaboration, and integration) 
  • Influenced by lean manufacturing
  • Changes in functionality happen frequently to quickly move improvements into production (automation and orchestration, roll back easily if errors are detected)
Infrastructure as code:
Code > Version Control > Code Review > Integrate > Deploy 
Agile: 
  • Customer satisfaction, via contnuous delivery of valuable software, is highest priority.
  • Frequent releases
  • Welcome changing requirements
  • Daily cooperation between developers and business people
  • Self-organizing teams reflecting how to become more effective, adjusting accordingly

Image result for manifesto of agile methodology

2. XML & NETCONF

XML concepts and syntax:

An extensible markup language, a tool used for storing and transporting data. 

Consists of many nested elements. Example: 

	
		1234 
		MX960
XPath concepts and syntax:

A query language for selecting nodes from an XML document. 

A way of searching and parsing data from XML. 

Note: XPath and XML uses the term “nodes”, but does not correlate to typical network nomenclature of nodes. These nodes refer to the following XML data:

  • Root
  • Element
  • Text
  • Attribute
  • Comment

Absolute Path- uses complete path from the root element to the desired element. 

Relative Path- 

Predicate, 

Good resource for delving into XPath definitions: https://www.tutorialspoint.com/xpath/index.htm

NETCONF concepts:

A network configuration protocol. (RFC 6241)

Content: XML Data.

Operations: (retrieve all or part of specified configuration datastore), (edit a configuration datastore by creating, deleting, merging, or replacing content). 

Messages: (push / request) (reply to RPC request), and (ex. subscribe to updates for operational service status).

Transport:  SSH & TLS, NETCONF over SSH uses port 830

JTAC will support Java and Pearl NETCONF API library’s 

XML API concepts and syntax:
 

3. Data Serialization 

Structuring data to be machine readable. 

  • YAML (YAML Ain’t a Markup Language) –  uses white space to denote structure.
  • JSON (Javascript Object Notation) – uses square brackets & curly brackets to denote structure. 
  JSON YAML
Does it ignore whitespace Yes No, spaces denote structure, though tabs aren’t allowed
How do you create a comment Doesn’t support comments #

4. Ansible

Configuration management and deployment tool. Declarative, idempotent, client-less. 

Ansible core Junos (written and produced by Juniper)

Galaxy Juniper.Junos (written and produced by Juniper)

Inventory location: /etc/ansible/hosts

Variables: Inventory, group_vars, host_vars, custom files 

Playbooks: YAML (the main part of instructions for ansible), example: 

---
- name: Load and commit configuration data on a device running Junos OS
  hosts: dc1
  roles:
    - Juniper.junos 
  connection: local
  gather_facts: no
  tasks: 
    - name: Checking NETCONF connectivity
      wait_for: 
        host: "{{ inventory_hostname }}" 
        port: 830  
        timeout: 5
    - name: Merge configuration data from a file and commit
      juniper_junos_config: 
        load: "merge"
        format: "text"
        src: "build_conf/{{ inventory_hostname }}/junos-config.conf"
        comment: "Configuring op script with Ansible"
      register: response
    - name: Print the response
      debug:
        var: response

Roles: useful for organizing and splitting up scripts to be re-used elsewhere. 

5. Python or PyEZ

  • Syntax and concepts
  • Remote Procedure Calls (RPCs)
  • PyEZ exception handling
  • Device status and configuration handling
 
  Python
Does it ignore whitespace No, it is used to denote code blocks
How do you create a comment #
Is it compiled No
Interpreted language Yes

6. REST API

  • Configuring the Junos REST API
  • Using the REST API Explorer
  • Using curl to access the REST API
 

Additional things to know: 

Who develops the Ansible core modules for Junos OS? 

Who develops the Ansible Galaxy modules for Junos OS ? 

Know the difference between json and yaml. 

Know what a python dictionary looks like.