Python App - Containerized, K8s AWS deployment, K8s manifests
- All Github Actions pipelines are maintained in .github/workdflows
- All Application Code and Dockerfile for containerizing the Python App are maintained in Application-Code
- All IaC Terraform Code to deploy the EKS cluster is maintained in K8s-Terraform-Code
- All K8s manifest to deploy the Python App are maintained in K8s-Deployment-Manifests
Secrets used by CI/CD pipelines are kept in GitHub Secrets(not coded in Pipelines)
1. Package the Python App into a Docker container and push it to Docker Hub Registry (docker-image.yml)
Steps:
- Login to Docker Hub Registry
- Build the Docker image from the Dockerfile and Source Code in Application-Code folder
- Push built image to Docker HUB Registry
- Delete the Local Image Built (House-keeping)
Image in Docker Hub:
Testing locally:
Steps:
- Checkout the Github Repo
- Configure AWS Credentials CLI for TF deploy to take place.
- Setup Terraform on build machine
- TF Init
- TF Plan
- TF Apply with auto-approve set to true
Note: I have stored the state file in a private S3 bucket that I hosted for testing purposes
Cluster deployed:
Worker Nodes:
Steps:
- Checkout the Github Repo
- Kubectl install on build machine
- Config AWS credentials
- Get Kube config from EKS using AWS CLI
- Login to the Docker HUB Registry
- Kubectl commands to deploy the K8s objects Service and Deployment
Kubectl to get status if K8s objects:
Access the app from the browser using the EXTERNAL-IP stated above
Docker Build pipeline:
TF INIT PLAN APPLY pipeline:
K8s objects deploy pipeline: