PY-304

Formats: | Asynchronous |
Blended | |
Online | |
Onsite | |
Part-time | |
Level: | Intermediate |
Prerequisites: | |
Recommended Knowledge | |
Linux/Windows command line experience | |
Core Python |
Formats: We offer our training content in a flexible format to suit your needs. Contact Us if you wish to know if we can accommodate your unique requirements.
Level: We are happy to customize course content to suit your skill level and learning goals. Contact us for a customized learning path.
Python for DevOps (PY-304)
Target Audience: Aspiring DevOps engineers, Python developers transitioning to DevOps, system administrators.
Prerequisites: Python Fundamentals (PCEP level), basic Linux/Windows command-line knowledge.
Objective: Equip students with Python skills for automation, CI/CD, containerization, and cloud operations, preparing them for DevOps roles.
1: Python Automation and Scripting
Introduction to DevOps with Python
- Role of Python in DevOps: automation, orchestration, monitoring.
- Overview of DevOps tools (Jenkins, Docker, Kubernetes, AWS).
Automation Basics
- Writing scripts with
os
,sys
,subprocess
for system tasks. - File handling: reading/writing logs, config files (
configparser
). - Practical: Automate file cleanup and log parsing.
Command-Line Interfaces
- Building CLI tools with
argparse
andclick
. - Practical: Create a CLI for system monitoring (e.g., disk usage).
2: CI/CD Pipelines with Python
CI/CD Fundamentals
- Concepts: continuous integration, delivery, deployment.
- Tools: Jenkins, GitHub Actions, GitLab CI.
Python in CI/CD
- Writing scripts to automate build/test/deployment tasks.
- Interacting with Git using
gitpython
. - Practical: Script a pipeline to build and test a Python app.
Testing Automation
- Unit testing with
unittest
andpytest
. - Practical: Automate test suite execution in a CI pipeline.
3: Containerization and Orchestration
Docker with Python
- Docker basics: containers, images, Dockerfiles.
- Using
docker-py
to manage containers programmatically. - Practical: Write a script to build and run a Docker container.
Kubernetes with Python
- Kubernetes basics: pods, deployments, services.
- Using
kubernetes
Python client for cluster operations. - Practical: Automate pod scaling with a Python script.
Configuration Management
- Managing config files with
yaml
orjson
. - Practical: Script dynamic configuration updates for containers.
4: Cloud Integration and Monitoring
Cloud Automation with Python
- Introduction to AWS, Azure, GCP SDKs (focus on
boto3
for AWS). - Automating cloud resources: EC2 instances, S3 buckets.
- Practical: Script deployment of an S3 bucket and file upload.
Monitoring and Logging
- Using
logging
for DevOps pipelines. - Integrating with monitoring tools (e.g., Prometheus via
prometheus-client
). - Practical: Create a script to monitor CPU usage and log alerts.
Capstone Project
- Build an end-to-end DevOps pipeline: automate build, test, containerize, deploy to cloud, and monitor.
- Example: Deploy a Flask app with Docker, Kubernetes, and AWS, with automated monitoring.
Learning Outcomes
- Automate system tasks and build CLI tools.
- Implement CI/CD pipelines with Python.
- Manage containers and Kubernetes clusters programmatically.
- Integrate Python with cloud platforms for resource management.
- Monitor and log DevOps workflows effectively.