Learning paths › Automation › Flask, Docker and Jenkins
Flask, Docker and Jenkins
A small Flask app containerised and put behind a build server: a URL mapped to a Python function and HTML returned from a template, a Dockerfile written, the image built and run and a shell opened inside the container, then the build server unlocked, plugged into the repository, and expressed as checkout, build and test stages with a downstream job triggered — after which the lab router is reached over SSH from the Linux VM, and YANG is introduced as the shared schema that replaces screen-scraping, rendered as a tree with pyang. Explanation and checks; four written exercises.
Lessons
- Map a URL to a Python function
- Return rendered HTML from a template
- Script the Dockerfile and the build
- Build the image and run the container
- Get a shell inside a running container
- See how Jenkins ties the pieces together
- Create the hosted repo and the local one
- Push local commits to the remote branch
- Move the app off the port Jenkins needs
- Run Jenkins from a container image
- Unlock Jenkins and install its plugins
- Make a job that checks out your repo
- Run the repository's build script as a step
- Trigger a test job after a successful build
- Express checkout, build and test as stages
- Reach the router from your Linux VM over SSH
- Compare the hosted Cisco lab platforms
- Reserve an online topology for the labs
- Connect the VPN and open the lab portal
- Open the router console and set its hostname
- Replace screen-scraping with a shared schema
- Tell a module apart from its instance data
- Render a YANG module as a tree
- Check the pyang version and its options
More in Automation
- First scripts that configure devices
- NAPALM: structured data across vendors
- Concurrency, and the Python types device output returns
- Parsing show output and testing conditions
- Readable code, branching and loops
- Build the workstation and the toolchain
- Files, CSV, JSON and pickle
- Paramiko: SSH to devices from Python
- Netmiko at fleet scale
- Tuples, sets and dictionaries for device records
- Exceptions and your first classes
- Plan and build the automation lab
- Files, formatting and regular expressions
- Addresses, functions, modules and classes
- CSV inventories, logging and scheduling
- Netmiko, SCP and structured parsing
- Agents, async and model-driven workflows
- NETCONF, YANG and RESTCONF
- NX-API, pyATS and Genie
- A small GenAI app, end to end
- macOS, Linux and the virtual lab
- Agile delivery and Python fundamentals
- REST APIs, authentication and requests
- Managing a router with NETCONF and RESTCONF
- Ansible: inventory, ad-hoc commands and first playbooks
- Roles and zero-touch provisioning for Linux switches
- Installing the controller and applying a project
- Setting up Python 3
- The Ansible lab and the controller
- Vault, variables and config changes
- Parsing output and knowing which variable wins
- Jinja filters and PAN-OS automation
- Loops, callbacks, strategy and run control
- Roles, imports and writing your own module
- Running playbooks from AWX