Hands-On Enterprise Automation with Python Free PDF Download

Hands-On Enterprise Automation with Python starts by covering the set up of a Python environment to perform automation tasks, as well as the modules, libraries, and tools you will be using.

We’ll explore examples of network automation tasks using simple Python programs and Ansible. Next, we will walk you through automating administration tasks with Python Fabric, where you will learn to perform server configuration and administration, along with system administration tasks such as user management, database management, and process management.

You will be able to get following content from this PDF:

  1. Setting Up Our Python Environment
  • An introduction to Python
  • Python versions
  • Why are there two active versions?
  • Should you only learn Python 3?
  • Does this mean I can’t write code that runs on both Python 2 and Pyt hon 3?
  • Python installation
  • Installing the PyCharm IDE
  • Setting up a Python project inside PyCharm
  • Exploring some nifty PyCharm features
  • Code debugging
  • Code refactoring
  • Installing packages from the GUI
  1. Common Libraries Used in Automation
  • Understanding Python packages
  • Package search paths
  • Common Python libraries
  • Network Python Libraries
  • System and cloud Python libraries
  • Accessing module source code
  • Visualizing Python code
  1. Setting Up the Network Lab Environment
  • Technical requirements
  • When and why to automate the network
  • Why do we need automation?
  • Screen scraping versus API automation
  • Why use Python for network automation?
  • The future of network automation
  • Network lab setup
  • Getting ready – installing EVE-NG
  • Installation on VMware Workstation
  • Installation over VMware ESXi
  • Installation over Red Hat KVM
  • Accessing EVE-NG
  • Installing EVE-NG client pack
  • Loading network images into EVE-NG
  • Building an enterprise network topology
  • Adding new nodes
  • Connecting nodes together
  1. Using Python to Manage Network Devices
  • Technical requirements
  • Python and SSH
  • Paramiko module
  • Module installation
  • SSH to the network device
  • Netmiko module
  • Vendor support
  • Installation and verification
  • Using netmiko for SSH
  • Configuring devices using netmiko
  • Exception handling in netmiko
  • Device auto detect
  • Using the telnet protocol in Python
  • Push configuration using telnetlib
  • Handling IP addresses and networks with netaddr
  • Netaddr installation
  • Exploring netaddr methods
  • Sample use cases
  • Backup device configuration
  • Building the python script
  • Creating your own access terminal
  • Reading data from an Excel sheet
  • More use cases
  1. Extracting Useful Data from Network Devices
  • Technical requirements
  • Understanding parsers
  • Introduction to regular expressions
  • Creating a regular expression in Python
  • Configuration auditing using CiscoConfParse
  • CiscoConfParse library
  • Supported vendors
  • CiscoConfParse installation
  • Working with CiscoConfParse
  • Visualizing returned data with matplotLib
  • Matplotlib installation
  • Hands-on with matplotlib
  • Visualizing SNMP using matplotlib
  1. Configuration Generator with Python and Jinja2
  • What is YAML?
  • YAML file formatting Text editor tips
  • Building a golden configuration with Jinja2
  • Reading templates from the filesystem
  • Using Jinja2 loops and conditions
  1. Parallel Execution of Python Script
  • How a computer executes your Python script
  • Python multiprocessing library
  • Getting started with multiprocessing
  • Intercommunication between processes
  1. Preparing a Lab Environment
  • Getting the Linux operating system
  • Downloading CentOS Downloading Ubuntu
  • Creating an automation machine on a hypervisor
  • Creating a Linux machine over VMware ESXi
  • Creating a Linux machine over KVM
  • Getting started with Cobbler
  • Understanding how Cobbler works
  • Installing Cobbler on an automation server
  • Provisioning servers through Cobbler
  1. Using the Subprocess Module
  • The popen() subprocess
  • Reading stdin, stdout, and stderr
  • The subprocess call suite
  1. Running System Administration Tasks with Fabric
  • Technical requirements
  • What is Fabric?
  • Installation
  • Fabric operations
  • Using run operation
  • Using get operation
  • Using put operation
  • Using sudo operation
  • Using prompt operation
  • Using reboot operation
  • Executing your first Fabric file
  • More about the fab tool
  • Discover system health using Fabric
  • Other useful features in Fabric
  • Fabric roles Fabric context managers
  1. Generating System Reports and System Monitoring
  • Collecting data from Linux
  • Sending generated data through email
  • Using the time and date modules
  • Running the script on a regular basis
  • Managing users in Ansible
  • Linux systems
  • Microsoft Windows
  1. Interacting with the Database
  • Installing MySQL on an automation server
  • Securing the installation
  • Verifying the database installation
  • Accessing the MySQL database from Python
  • Querying the database
  • Inserting records into the database
  1. Ansible for System Administration
  • Ansible terminology
  • Installing Ansible on Linux
  • On RHEL and CentOS
  • Ubuntu
  • Using Ansible in ad hoc mode
  • How Ansible actually works
  • Creating your first playbook
  • Understanding Ansible conditions, handlers, and loops
  • Designing conditions
  • Creating loops in ansible
  • Trigger tasks with handlers
  • Working with Ansible facts
  • Working with the Ansible template
  1. Creating and Managing VMware Virtual Machines
  • Setting up the environment
  • Generating a VMX file using Jinja2
  • Building the VMX template
  • Handling Microsoft Excel data
  • Generating VMX files
  • VMware Python clients
  • Installing PyVmomi
  • First steps with pyvmomi
  • Changing the virtual machine state
  • There’s more
  • Using Ansible playbook to manage instances
  1. Interacting with the OpenStack API
  2. Automating AWS with Boto3
  3. Using the Scapy Framework
  4. Building a Network Scanner Using Python

Download PDF

Leave a Reply

Your email address will not be published. Required fields are marked *