CICD implementation in AWS using Github, Jenkins, Ansible and Kubernetes.
Again i have completed one CICD full implementation but in AWS cloud this time and in much more production type. Django application is run inside Kubernetes pod and home page is shown above. With increase in CPU load, more number of pods will run automatically to handle the traffic. Last time, similar kind of work done in Digital Ocean Cloud. This time, i have to spent lot of time debugging issues as lot of tools are used, so lot of issues at the same time.
In AWS cloud, i have used 5 VM - 1 for Jenkins, 1 for Ansible, 1 for Kubernetes Master and 2 for Kubernetes worker nodes. Kubernetes cluster has been configured manually (EKS option is also available). Postgres DB is configured in AWS which my Django application has used as backend. For security, environment variables are used. Further for static files and images (media files), i have used S3 in AWS. Dockerfile is used for image creation.
Kubernetes Deployment was used to create pod/containers using this image and Service was created with type Load balancer. Kubernetes Master IP was used to access the Django website from outside. Domain can be associated with the help of Route53 in AWS.
Recommended by LinkedIn
Whenever any change done in the application files (or any files) by developer team and after that it is pushed to Github, Jenkins will detect the changes automatically using Webhook and rest all works will get completed automatically. Jenkins server will SSH to Ansible server for creation of docker image, then image is pushed to ECR (AWS image repository), old kubernetes pods are terminated and new are created using the latest image from ECR (rolling update is also used so that Application access is not lost and pods are terminated and created in a defined manner and not at one go). Moreover Kubernetes pods will increase/ decrease depending on the CPU load and each pod has been allocated fixed resources. So it's fully automated CICD implementation.
Planning to make a video series on this implementation which may help others as it is not available in Youtube as of now. Feeling relaxed after completing this CICD in AWS...
Congratulations Sir
congrates
Congratulations Sir
Super.....keep going