Acknowledgments |
|
xiv | |
Introduction |
|
xv | |
What Is the Current State of DevOps? |
|
xvi | |
Who Should Read This Book? |
|
xvii | |
How This Book Is Organized |
|
xvii | |
Part I Infrastructure as Code, Configuration Management, Security, and Administration |
|
xvii | |
Part II Containerization and Deploying Modern Applications |
|
xviii | |
Part III Observability and Troubleshooting |
|
xviii | |
What You'll Need |
|
xviii | |
Downloading and Installing VirtualBox |
|
xx | |
Companion Repository |
|
xxi | |
Editor |
|
xxi | |
|
PART I INFRASTRUCTURE AS CODE, CONFIGURATION MANAGEMENT, SECURITY, AND ADMINISTRATION |
|
|
1 | (58) |
|
1 Setting Up A Virtual Machine |
|
|
3 | (10) |
|
Why Use Code to Build Infrastructure? |
|
|
3 | (1) |
|
Getting Started with Vagrant |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
Getting Started with Ansible |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
9 | (2) |
|
|
11 | (2) |
|
2 Using Ansible To Manage Passwords, Users, And Groups |
|
|
13 | (12) |
|
Enforcing Complex Passwords |
|
|
14 | (1) |
|
Installing libpam-pwquality |
|
|
14 | (1) |
|
Configuring pam_pwquality to Enforce a Stricter Password Policy |
|
|
15 | (1) |
|
|
16 | (1) |
|
Getting Started with the Ansible User Module |
|
|
16 | (1) |
|
Generating a Complex Password |
|
|
17 | (1) |
|
|
18 | (1) |
|
Getting Started with the Ansible Group Module |
|
|
18 | (1) |
|
Assigning a User to the Group |
|
|
19 | (1) |
|
Creating Protected Resources |
|
|
19 | (1) |
|
|
20 | (1) |
|
Testing User and Group Permissions |
|
|
21 | (2) |
|
|
23 | (2) |
|
3 Using Ansible To Configure SSH |
|
|
25 | (12) |
|
Understanding and Activating Public Key Authentication |
|
|
26 | (1) |
|
Generating a Public Key Pair |
|
|
26 | (1) |
|
Using Ansible to Get Your Public Key on the VM |
|
|
27 | (1) |
|
Adding Two-Factor Authentication |
|
|
28 | (1) |
|
Installing Google Authenticator |
|
|
29 | (1) |
|
Configuring Google Authenticator |
|
|
29 | (1) |
|
Configuring PAM for Google Authenticator |
|
|
30 | (1) |
|
Configuring the SSH Server |
|
|
31 | (1) |
|
Restarting the SSH Server with a Handler |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
35 | (2) |
|
4 Controlling User Commands With Sudo |
|
|
37 | (12) |
|
|
38 | (1) |
|
Planning a sudoers Security Policy |
|
|
38 | (1) |
|
Installing the Greeting Web Application |
|
|
39 | (2) |
|
Anatomy of a sudoers File |
|
|
41 | (1) |
|
Creating the sudoers File |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
45 | (1) |
|
Accessing the Web Application |
|
|
45 | (1) |
|
Editing greeting.py to Test the sudoers Policy |
|
|
46 | (1) |
|
Stopping and Starting with systemctl |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
48 | (1) |
|
5 Automating And Testing A Host-Based Firewall |
|
|
49 | (10) |
|
Planning the Firewall Rules |
|
|
50 | (1) |
|
|
50 | (3) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (1) |
|
PART II CONTAINERIZATION AND DEPLOYING MODERN APPLICATIONS |
|
|
59 | (48) |
|
6 Containerizing An Application with Docker |
|
|
61 | (16) |
|
|
62 | (1) |
|
Getting Started with Docker |
|
|
62 | (1) |
|
|
63 | (1) |
|
Container Images and Layers |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
Installing and Testing Docker |
|
|
65 | (1) |
|
Installing the Docker Engine with Minikube |
|
|
65 | (1) |
|
Installing the Docker Client and Setting Up Docker Environment Variables |
|
|
66 | (1) |
|
Testing the Docker Client Connectivity |
|
|
66 | (1) |
|
Containerizing a Sample Application |
|
|
66 | (1) |
|
Dissecting the Example telnet-server Dockerfile |
|
|
67 | (1) |
|
Building the Container Image |
|
|
68 | (1) |
|
Verifying the Docker Image |
|
|
69 | (1) |
|
|
70 | (1) |
|
Other Docker Client Commands |
|
|
71 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
74 | (1) |
|
|
74 | (1) |
|
Connecting to the Telnet-Server |
|
|
74 | (1) |
|
Getting Logs from the Container |
|
|
75 | (1) |
|
|
76 | (1) |
|
7 Orchestrating with Kubernetes |
|
|
77 | (18) |
|
Kubernetes from 30,000 Feet |
|
|
78 | (1) |
|
Kubernetes Workload Resources |
|
|
79 | (1) |
|
|
79 | (1) |
|
|
79 | (1) |
|
|
79 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (1) |
|
|
81 | (1) |
|
|
81 | (1) |
|
Deploying the Sample telnet-server Application |
|
|
82 | (1) |
|
Interacting with Kubernetes |
|
|
82 | (1) |
|
|
82 | (5) |
|
Creating a Deployment and Services |
|
|
87 | (1) |
|
Viewing the Deployment and Services |
|
|
88 | (1) |
|
Testing the Deployment and Services |
|
|
89 | (1) |
|
Accessing the Telnet Server |
|
|
89 | (2) |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
95 | (12) |
|
CI/CD in Modern Application Stacks |
|
|
96 | (1) |
|
|
97 | (1) |
|
Reviewing the skaffold.yaml File |
|
|
98 | (1) |
|
Reviewing the Container Tests |
|
|
99 | (1) |
|
Simulating a Development Pipeline |
|
|
100 | (2) |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
106 | (1) |
|
PART III OBSERVABILITY AND TROUBLESHOOTING |
|
|
107 | (46) |
|
|
109 | (16) |
|
|
110 | (1) |
|
Monitoring the Sample Application |
|
|
111 | (1) |
|
Installing the Monitoring Stack |
|
|
112 | (1) |
|
Verifying the Installation |
|
|
113 | (2) |
|
|
115 | (1) |
|
|
115 | (1) |
|
Adjusting the Monitoring Pattern |
|
|
115 | (1) |
|
The telnet-server Dashboard |
|
|
116 | (2) |
|
|
118 | (1) |
|
|
119 | (1) |
|
Reviewing Golden Signal Alerts in Prometheus |
|
|
119 | (2) |
|
Routing and Notifications |
|
|
121 | (2) |
|
|
123 | (2) |
|
|
125 | (28) |
|
Troubleshooting and Debugging: A Primer |
|
|
126 | (1) |
|
Scenario: High Load Average |
|
|
127 | (1) |
|
|
127 | (1) |
|
|
128 | (1) |
|
|
129 | (1) |
|
Scenario: High Memory Usage |
|
|
129 | (1) |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
131 | (1) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
133 | (1) |
|
Scenario: Hostname Resolution Failure |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
Scenario: Out of Disk Space |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
139 | (1) |
|
Scenario: Connection Refused |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
143 | (1) |
|
Common journalctl Commands |
|
|
144 | (2) |
|
|
146 | (2) |
|
|
148 | (1) |
|
|
148 | (5) |
|
|
Index |
|
153 | |