Introduction
Part 1, Chapter 1
It's easy to follow a basic tutorial for building your own blog using your favorite web framework. It's also fairly easy to create a GitHub repository and push your code there. It's another story altogether to set up new project for your team to enable fast delivery of high quality software to production.
This course will teach you how to:
- structure a Git repository
- perform code reviews
- document your API
- manage multiple configurations and environments
- deploy and monitor your application
- reproduce your infrastructure environment
- configure and manage a CI/CD pipeline
- continuously deploy
- manage a database and database migrations
- build, publish, and use private Python packages
- write and run end-to-end tests
- develop an application with small, test-driven iterations
- use feature flags
App Overview
By the end of this course, you'll have developed a web API for managing your conference engagement. We'll cover the following use cases:
- users can request talks
- you can accept or reject talk requests
- you can list all talk requests
- automatically reject talk submissions if the requested duration is more than 90 minutes or less than 20 minutes
You'll set up a Git repository from scratch, build the initial application, set up a CI/CD pipeline, monitor your application, extend your application, do a code review, and deploy a new version of the application.
What's This Course About?
Although you'll be using a number of different tools throughout this course, it's less about them. It's more about the approaches and ideas. It's about setting up a workflow that can help you deliver high-quality software with less pain. It's about making your life easier and ensuring predictable software delivery. You'll learn how to organize your work and project in order to achieve that. From Test-driven Development (TDD), for faster and more reliable development, to continuous deployment and feature flags. You'll see how to develop with small, predictable iterations that make your development faster and more predictable by shortening feedback loops.
The end goal of this course is to enable continuous deployment for a well-tested, scalable FastAPI API. To achieve that you will:
- develop in small iterations
- use Terraform to manage Infrastructure as Code
- follow Test-driven Development using pytest to build an API
- use AWS ECS for zero-downtime deployments
- automate database migrations inside your CI/CD pipeline using Alembic and health checks
- use feature flags to slowly roll-out new features
- use monitoring to make sure your app is healthy
Tools, Frameworks, and Services
Along the way, you'll be using several development tools. Feel free to swap out the tools used in this course for the ones that solve your problems.
GitLab
GitLab is an open-source solution for managing the full software development lifecycle. You'll use it for:
- external git repository
- private PyPI repository
- CI/CD pipeline
- issue tracking
- code reviews
You can replace it with:
- Bitbucket (with pipelines) + PyDist
- GitHub (with GH Actions) + PyDist
- GitHub + CircleCI + PyDist
- Bitbucket + TravisCI + Jira + own PyPI server
Poetry
Poetry is a tool used for Python packaging and dependency management. You'll use it for managing dependencies and publishing packages to PyPI repository.
You can replace it with:
- pip + twine
- pipenv + twine
FastAPI
FastAPI is a high-performance, easy-to-learn, fast-to-code, ready-for-production web framework for building APIs with Python. You'll use it for building a web application.
You can replace it with:
- Flask
- Django
- Pyramid
pytest
The pytest framework makes it easy to write Python tests. You'll use it to write tests for the web application.
You can replace it with:
- unittest
- nose
AWS Cloudwatch
Amazon CloudWatch is a monitoring and observability service. You'll use it to gather and search logs and monitor resources (like CPU and memory usage) used by the web application.
You can replace it with:
- Prometheus
- Datadog
- New Relic
- Splunk
AWS ECR
Amazon Elastic Container Registry (ECR) is a fully managed container registry that makes it easy to store, manage, share, and deploy your container images. You'll use it to store the Docker images for your web application.
You can replace it with:
- GitLab's built-in Docker registry
- Docker Hub
- JFrog's Container Registry
AWS ECS
Amazon Elastic Container Service (ECS) is a fully managed container orchestration service. You'll deploy your application there. You can replace it with:
- Kubernetes
- AWS Elastic Kubernetes Service
- Azure Kubernetes Service
- Google Kubernetes Engine
Terraform
Terraform is an open-source Infrastructure as Code (IaC) software tool. It supports all major cloud services. You'll use it to manage the AWS infrastructure (VPC, RDS, ECS, etc.) required for running your application.
You can replace it with:
- AWS CloudFormation
- Ansible
- Pulumi
Codecov
Codecov is service that helps you track the coverage of your code. You can track changes and compare branches and commits. It helps to focus on changes instead of the current code coverage percentage.
You can replace it with:
- Coveralls
- GitLab's Test Coverage Visualization
Sentry
Sentry is service that helps you track unhandled errors inside your applications. It provides you with as much details as possible so you're able to reproduce the error and solve the problem.
You can replace it with:
- Rollbar
- Raygun
✓ Mark as Completed