Full Stack Network Automation

Network Automation with Python, Django, SQLite & Docker - from fundamentals to deployment

Chapter Summaries

Part I: Foundation & Environment

The 'Why' and the Toolkit

Chapter 1: Build Docker Image

Build a Production-Ready, Portable Network Automation Environment. Learn to create a custom Docker image pre-loaded with Python, Ansible, and all required libraries. Deploy this foundational image to Docker Hub for guaranteed, consistent environments across your team and deployment targets.

Chapter 2: Build Network Topology

Set the Stage for Real-World Automation. Design and provision a realistic, multi-site network topology featuring Cisco CSRs (Active/Standby), switches, and a FortiGate firewall. You'll establish the initial, basic routing configurations, providing a production-grade testing lab for all subsequent automation tasks.

Chapter 3: Python Basics

Master the Essential Python for Automation. Quickly acquire the core Python knowledge you need for network tasks: variables, control flow, loops, and object-oriented concepts. This chapter is laser-focused on teaching you just enough Python to immediately transition into hands-on network scripting.

Part II: From Script to System

Traditional Automation

Chapter 4: Network Automation with Paramiko

Secure CLI Automation with Python. Dive into Paramiko, the foundational Python SSH library. Learn to establish secure, direct connections to network devices. Start with simple scripts and progressively refactor your code into a modular, reusable structure capable of handling multiple devices and complex CLI commands.

Chapter 5: Write Object Oriented Code

Professionalize Your Scripts. Elevate your automation code by creating your first Object-Oriented Python class, Connectivity. This class will contain methods for logging into devices, sending commands, securely receiving output, and handling command-line interactions, turning simple scripts into reliable systems.

Chapter 6: Configuring with Paramiko

Achieve Direct Device Control. Use your new, object-oriented Connectivity class to execute real-world configuration changes. You will configure new subnets on Cisco devices and establish cross-site connectivity, proving the power and reliability of direct Python-based configuration management.

Part III: Configuration Management & Security

Ansible Mastery

Chapter 7: Automation with Ansible

Ansible Fundamentals for Network Engineers. Master the key components of Ansible and write your first effective playbook. Learn how Ansible simplifies repetitive network tasks, dramatically increasing configuration speed and consistency compared to custom Python scripts.

Chapter 8: Configuration Management with Ansible

Deploy Consistent Configurations. Use the power of Ansible to perform large-scale configuration deployments across the entire topology. Apply the same networking goals achieved in previous chapters, but now using the declarative, idempotent power of Ansible for reduced configuration complexity.

Chapter 9: Template Device Configurations with Ansible

Standardize Deployments with Jinja2. Unlock advanced configuration management using the Jinja2 templating engine. Separate logic and variables from the configuration text itself, making your automation flexible, reusable, and scalable for massive environments.

Chapter 10: Zero Touch Provisioning

Implement End-to-End ZTP. Combine device templates and inventory files to generate complete device configurations. Deploy these files to a TFTP server and provision new devices that automatically pick up their configuration, joining the network with Zero Touch intervention.

Chapter 11: Ansible Vault

Secure Your Automation Pipeline. Protect sensitive data like usernames, passwords, and API keys. Learn how to encrypt these credentials using Ansible Vault, ensuring your automation remains secure and compliant in any production environment.

Part IV: The API Transition

Modern Network Control

Chapter 12: Working with REST APIs

Shift from CLI to Code-Driven APIs. Learn how modern networks are managed via APIs. Use Python's requests library to interact with native Cisco IOS XE REST APIs and explore API endpoints for configuration management. Gain essential skills for managing modern vendor platforms like Fortinet FortiGate through their official APIs.

Part V: Full Stack Deployment

The Application

Chapter 13: Django Basics

Build the Full Stack Web Frontend. Introduce the Django Web Framework. Set up a simple application and master the MVC pattern (Models, Views, Templates) to create the interface for your final project. Learn how to transform your automation scripts into a user-friendly, enterprise-ready web application.

Chapter 14: Setup Final Project

Design the Full Stack Automation Engine. Architect and build the core skeleton of your final Zero Touch Provisioning (ZTP) Django application. Make critical design decisions on models, database utilization (SQLite), user interaction, and dependency management to ensure a robust, scalable system.

Chapter 15: Finalize and test our application

Deployment and Validation. Bring all components together: Python, Ansible, Jinja2, Docker, and Django. Finalize the full-stack web application, perform comprehensive testing, and prepare your production-ready, browser-based ZTP tool for deployment.

← Back to Book Details