Project: Making a simple polling web-application, where we can add question with choices from admin side. Other users can open the given url to read the the question and vote for there desired choice.
Setup the project on local system:
- Install python-3 i) sudo apt-get update ii) sudo apt-get install python3 iii) sudo apt install python3-pip
- Create a virtual environment and activate it. i) pip install virtualenv ii) virtualenv venv iii) venv\Scripts\activate (this is used to activate the virtual environment)
- Install django. i) pip install django
- Start the django project. i) django-admin startproject
- Create the required apps. i) django-admin startapp (appname)
- Register the apps in setting.py file.
- Apply migrations and run the project. i) python manage.py makemigrations ii) python manage.py migrate iii) python manage.py runserver
Create a Docker image:
- Write a dockerfile for the above setup.
- Create and push the image on dockerhub
Deployment:
- Create the required infrastructure using IAC(Terraform) code. i) Create VPC. ii) Create AutoScaling Group iii) Create an instance to install Jenkins for CI/CD pipeline. iv) Create an EKS cluster.
- Deploy the application on the EKS cluster. i) Create a Deployment using the declarative method (yml file). ii) Create a Service using the declarative method (yml file).
- Routing i) Generate Elastic IP and attach it to the cluster. ii) Make the cluster available on the required URL using Route53.