You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-47Lines changed: 47 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
% DevOps and Cloud Based Software
1
+
#DevOps and Cloud Based Software
2
2
3
-
# FastAPI GitOps Starter
3
+
##FastAPI GitOps Starter
4
4
5
5
A comprehensive starter template for learning GitOps practices with FastAPI. This repository demonstrates modern software development workflows including CI/CD pipelines, code quality tools, and automated testing.
6
6
7
-
## 🎯 Learning Objectives
7
+
###🎯 Learning Objectives
8
8
9
9
This tutorial will teach you:
10
10
- Building REST APIs with FastAPI
@@ -14,23 +14,23 @@ This tutorial will teach you:
14
14
- Using pre-commit hooks for automated code validation
1. How can you ensure that your tests cover edge cases and error scenarios?
239
239
2. How do you run tests and view coverage reports?
240
240
3. What are the benefits of maintaining high code coverage in a project?
241
241
4. What other metrics can be used to assess code quality besides code coverage?
242
242
243
243
244
-
### Exercise 3: Add a CI Pipeline
244
+
####Exercise 3: Add a CI Pipeline
245
245
246
246
1. Open `.github/workflows/ci-cd.yml`
247
247
2. Add a step to lint the code using Ruff
248
248
3. Add a step to run tests with coverage. The pipeline should fail if coverage is below 80%
249
249
4. Add a step to build the Docker image if tests pass. If we do a release, tag the image appropriately (with its version and the tag 'latest') and push it to GitHub registry
250
250
251
-
#### Questions
251
+
#####Questions
252
252
253
253
1. What are some strategies for rolling back deployments in case of failures in the CI/CD pipeline?
254
254
2. How can you ensure your application is always up to date with the latest security patches and dependencies?
255
255
3. How can you set up automatic deployments in a production environment while minimizing downtime and ensuring KPOs are met?
256
256
257
-
### Exercise 4: Deploy on a K8s "production" Cluster
257
+
####Exercise 4: Deploy on a K8s "production" Cluster
258
258
259
259
1. Set up a Kubernetes cluster (e.g., using Minikube or a cloud provider)
260
260
2. Deploy the application using the Helm chart
@@ -269,41 +269,41 @@ kubectl get hpa -n default -w
269
269
```
270
270
7. Note how much time it takes for the pods to scale up and down based on the load
271
271
272
-
#### Questions
272
+
#####Questions
273
273
1. The auto-scaling did not work as expected. What could be the possible reasons?
274
274
2. How does Horizontal Pod Autoscaling (HPA) work in Kubernetes?
275
275
3. How can you add custom metrics for scaling decisions in HPA?
276
276
4. The helm chart provides a way to perform canary and blue-green deployments. How would you set this up in a production environment? What other tools you need to use to make this work?
0 commit comments