This project aims to provide hands-on learning experience in developing and deploying a cloud-native resource monitoring Python application on Kubernetes (K8s). The aim of this assignment is to understand the hands-on experience with GitOps practices, utilizing Argo CD for continuous deployment and Argo Rollouts for advanced deployment strategies within a Kubernetes environment. You will be responsible for setting up a GitOps pipeline that automates the deployment and management of a simple web application. Key objectives include understanding Python for developing monitoring applications, Docker for containerization, AWS for hosting the application, and Kubernetes for orchestration.
Before starting the project, ensure you have the following prerequisites:
- Familiarity with Kubernetes concepts (Pods, Deployments, Services).
- Basic understanding of Docker and containerization.
- Experience with Git for version control.
- Access to a Kubernetes cluster for testing (you can use Minikube, kind, or a cloud provider's Kubernetes service).
- Familiarity with Argo CD and Argo Rollouts tools. Refer to the documentation for the basics of these tools.
Additionally, make sure you have the following installed:
- AWS Account with programmatic access configured via AWS CLI.
- Python3 installed on your local machine.
- Docker and Kubectl installed.
- A code editor such as Visual Studio Code.
Clone the repository using the following command:
git clone https://github.com/AtulRajput01/cloud-native-resource-monitoring-app.git
- Install Dependencies
- Install dependencies using pip:
pip3 install -r requirements.txt
- Run the Application Locally
- Navigate to the root directory of the project and execute:
$ python3 app.py
- Installation: Argo CD is installed on the Kubernetes cluster following the official documentation.
- Configuration: Once installed, it's configured to monitor a specific Git repository containing Kubernetes manifests for the application.
- Dockerization: After dockerizing the application and pushing the Docker image to a container registry, Argo CD is set up to monitor changes in the repository.
- Continuous Deployment: Argo CD automatically deploys any changes pushed to the repository to the Kubernetes cluster, ensuring continuous deployment.
- Extension Usage: Argo Rollouts, an extension of Argo CD, is utilized to implement a canary release strategy.
- Rollout Definition: The rollout definition is modified to specify the canary release strategy, allowing for controlled testing of new versions of the application before full deployment.
3. Monitoring: Changes to the application code trigger a rollout, with Argo Rollouts monitoring the deployment process to ensure the canary release completes successfully.
Argo CD simplifies the deployment process by providing a centralized platform for managing application deployments in Kubernetes clusters. It promotes GitOps practices, enhancing collaboration and automation in the software development lifecycle.