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
+65-63Lines changed: 65 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,36 @@
1
1
# DevOps and Cloud Based Software
2
2
3
-
## FastAPI GitOps Starter
3
+
#1. Introduction
4
4
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.
5
+
In this tutorial will use GitOps practices with FastAPI including CI/CD pipelines, code quality tools, and automated testing.
1. How can you ensure that your tests cover edge cases and error scenarios?
240
268
2. How do you run tests and view coverage reports?
241
269
3. What are the benefits of maintaining high code coverage in a project?
242
270
4. What other metrics can be used to assess code quality besides code coverage?
243
271
244
272
245
-
####Exercise 3: Add a CI Pipeline
273
+
## Exercise 3: Add a CI Pipeline
246
274
247
275
1. Open `.github/workflows/ci-cd.yml`
248
276
2. Add a step to lint the code using Ruff
249
277
3. Add a step to run tests with coverage. The pipeline should fail if coverage is below 80%
250
278
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
251
279
252
-
#####Questions
280
+
### Questions
253
281
254
282
1. What are some strategies for rolling back deployments in case of failures in the CI/CD pipeline?
255
283
2. How can you ensure your application is always up to date with the latest security patches and dependencies?
256
284
3. How can you set up automatic deployments in a production environment while minimizing downtime and ensuring KPOs are met?
257
285
258
-
####Exercise 4: Deploy on a K8s "production" Cluster
286
+
## Exercise 4: Deploy on a K8s "production" Cluster
259
287
260
288
1. Set up a Kubernetes cluster (e.g., using Minikube or a cloud provider)
261
289
2. Deploy the application using the Helm chart
@@ -270,40 +298,14 @@ kubectl get hpa -n default -w
270
298
```
271
299
7. Note how much time it takes for the pods to scale up and down based on the load
272
300
273
-
#####Questions
301
+
### Questions
274
302
1. The auto-scaling did not work as expected. What could be the possible reasons?
275
303
2. How does Horizontal Pod Autoscaling (HPA) work in Kubernetes?
276
304
3. How can you add custom metrics for scaling decisions in HPA?
277
305
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