過去的十年間,技術(shù)發(fā)生了很大的變化。數(shù)據(jù)炙手可熱,云計算無處不在,許多組織都需要某種形式的自動化。在這些變化中,Python已經(jīng)一躍成為世界上***的語言之一。這本實用指南向你展示了如何使用Python配合當今最有用的DevOps工具(包括Docker、kubernetes、Terraform)來完成日常的Linux系統(tǒng)管理任務(wù)。
學習如何與Linux打交道和自動化對于數(shù)百萬專業(yè)人士來說是必不可少的。Python使這個過程變得輕松多了。通過本書,你將學會如何使用容器來開發(fā)軟件和解決問題,以及如何對軟件進行監(jiān)控、檢測、負載測試和操作。還在尋找用Python“把活兒搞定”的高效方法?這本就是你的操作指南。
Noah Gift是西北一杜克大學研究生數(shù)據(jù)科學與工程計劃的講師和顧問。
Preface
1. Python Essentials for DevOps
Installing and Running Python
The Python Shell
Jupyter Notebooks
Procedural Programming
Variables
Basic Math
Comments
Built-in Functions
Print
Range
Execution Control
if/elif/else
for Loops
while Loops
Handling Exceptions
Built-in Objects
What Is an Object?
Object Methods and Attributes
Sequences
Functions
Anatomy of a Function
Functions as Objects
Anonymous Functions
Using Regular Expressions
Searching
Character Sets
Character Classes
Groups
Named Groups
Find All
Find Iterator
Substitution
Compiling
Lazy Evaluation
Generators
Generator Comprehensions
More IPython Features
Using IPython to Run Unix Shell Commands
Exercises
2. Automating Files and the Filesystem
Reading and Writing Files
Using Regular Expressions to Search Text
Dealing with Large Files
Encrypting Text
Hashing with Hashlib
Encryption with Cryptography
The os Module
Managing Files and Directories Using os.path
Walking Directory Trees Using os.walk
Paths as Objects with Pathlib
3. Working with the Command Line
Working with the Shell
Talking to the Interpreter with the sys Module
Dealing with the Operating System Using the os Module
Spawn Processes with the subprocess Module
Creating Command-Line Tools
Using sys.argv
Using argparse
Using click
……
4. Useful Linux Utilities
5. Package Management
6. Continuous Integration and Continuous Deploymen
7. Monitoring and Logging
9. Cloud Computing
10. Infrastructure as Code
11. Container Technologies: Docker and Docker Compose
12. Container Orchestration: Kubernetes
13. Serverless Technoloaies
14. MLOps and Machine learning Engineering
15. Data Engineering
16. DevOps War Stories and Interviews
Index