This repository contains a Flask application that displays the IP address of the container it's running in. The project demonstrates a complete CI/CD pipeline using GitHub, AWS services (CodePipeline, CodeBuild), and ArgoCD for deployment to Kubernetes.
The core application is a simple Flask app that shows the IP address of its container. It's containerized using a multi-stage Dockerfile for optimal build and runtime environments.
Our CI/CD pipeline consists of the following components:
- Source Control: GitHub (this repository)
- Continuous Integration: AWS CodePipeline and CodeBuild
- Container Registry: DockerHub
- Continuous Deployment: ArgoCD
- Deployment Platform: Kubernetes
The CI process is managed by AWS CodePipeline and executed by CodeBuild. The buildspec.yml
file in this repository defines the build process:
- Install dependencies
- Run tests (placeholder for actual tests)
- Build Docker image
- Push Docker image to DockerHub
ArgoCD is used for continuous delivery to our Kubernetes cluster. It watches this repository for changes in the Kubernetes manifests and ensures that the cluster state matches the desired state defined in the repository.
/ip_app
: Contains the Flask application code(https://github.com/Deepak128404/argo-cd-menifest-python/tree/main/python-flask-cd)
: Contains Kubernetes manifests (deployment.yaml, service.yaml)Dockerfile
: Multi-stage Dockerfile for building the applicationbuildspec.yml
: AWS CodeBuild specification filerequirements.txt
: Python dependencies for the Flask app
The (https://github.com/Deepak128404/argo-cd-menifest-python/tree/main/python-flask-cd)
repo contains:
deployment.yaml
: Defines the Kubernetes Deployment for the Flask appsvc.yaml
: Defines the Kubernetes Service to expose the app
- Fork this repository
- Set up AWS CodePipeline and CodeBuild, pointing to your forked repository
- Configure AWS Systems Manager Parameter Store with your DockerHub credentials
- Install ArgoCD in your Kubernetes cluster
- Configure ArgoCD to watch this repository
- Push changes to the repository to trigger the CI/CD pipeline
Sensitive information like DockerHub credentials are stored securely in AWS Systems Manager Parameter Store and accessed during the build process.
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.