Visão Geral
O curso Python for DevOps Scripts CI/CD foi projetado para profissionais que desejam integrar Python aos pipelines de Integração Contínua (CI) e Entrega Contínua (CD). O participante aprenderá a criar scripts automatizados para compilação, testes, implantação e monitoramento de aplicações em ambientes modernos de DevOps, utilizando ferramentas como Jenkins, GitLab CI, GitHub Actions e Docker.
Conteúdo Programatico
Introduction to DevOps and CI/CD
- What is DevOps and why automate?
- Overview of CI/CD pipelines
- The role of Python in automation
Setting Up the Development Environment
- Installing Python, pip, and virtual environments
- Overview of Jenkins, GitLab CI, and GitHub Actions
- Setting up Docker and Git repositories
Python Scripting Fundamentals for DevOps
- Writing modular and reusable scripts
- Handling system commands with subprocess
- Reading and writing configuration files (YAML, JSON, INI)
Version Control Automation
- Automating Git commits, merges, and branches
- Working with GitPython
- Integrating scripts for pre-commit and post-deploy hooks
Continuous Integration Automation
- Triggering builds with Python scripts
- Automating unit and integration tests
- Reporting build results and test outcomes
Jenkins Integration with Python
- Jenkins API basics
- Creating and managing jobs using Python
- Triggering Jenkins pipelines programmatically
GitLab CI/CD and GitHub Actions Automation
- Writing YAML pipeline definitions
- Integrating Python scripts into CI/CD workflows
- Handling artifacts and environment variables
Containerization and Deployment Automation
- Building and pushing Docker images with Python
- Automating deployments to Kubernetes or cloud environments
- Managing environment configuration dynamically
Monitoring and Logging Automation
- Using Python to gather build metrics
- Integrating with Prometheus and Grafana
- Sending notifications via Slack or email
Error Handling and Pipeline Resilience
- Exception handling in CI/CD scripts
- Retrying failed stages automatically
- Logging and debugging best practices
Security and Secrets Management
- Managing credentials securely with environment variables and vaults
- Encrypting sensitive data in pipelines
- Auditing automation scripts
Real-World Projects and Best Practices
- Automated build and deployment pipeline using Jenkins
- GitLab CI/CD integration with Docker and Python
- Best practices for Python DevOps scripting