☑️Day 70: Starting with Projects – Django To-Do List🚀
🔹Table of Contents :
Introduction
Tasks Completed Today
Setting up the Project Repository
Executing the Django Project in a Python Environment
Creating an AWS EC2 Instance
Cloning the Project Repository on the EC2 Instance
Commands Executed
Outcomes of Today’s Work
Future Tasks
Real-Life Scenario and Relevance
Conclusion
✅Project Overview
Today marks the beginning of my first project in this series: a Django To-Do List Application. This project involves creating a Django-based web app, containerizing it with Docker, setting up a CI/CD pipeline using Jenkins, and deploying it on an AWS EC2 instance.
✅Tasks Completed Today
1. Setting up the Project Repository
Created a repository for the Django To-Do List project on GitHub.
This repo will be the central location for all code and configurations.
2. Executing the Django Project in a Python Environment
Installed Python and pip in the local development environment.
Created a virtual environment and activated it.
Installed Django and other required dependencies.
Commands:
# Clone the repository locally
git clone https://github.com/your-username/django-todo-list.git
# Navigate to the project directory
cd django-todo-list
# Set up a virtual environment
python3 -m venv env
source env/bin/activate
# Install required dependencies
pip install -r requirements.txt
# Run the Django application locally
python manage.py runserver
Outcome: The Django application was successfully launched on http://127.0.0.1:8000/
.
3. Creating an AWS EC2 Instance
Launched an EC2 instance on AWS to host the project.
Configured the instance with the appropriate key pair and security groups to allow HTTP (port 80) and SSH (port 22).
Commands:
# Connect to the EC2 instance via SSH
ssh -i your-key.pem ec2-user@<ec2-public-ip>
4. Cloning the Project Repository on the EC2 Instance
Installed Git on the EC2 instance.
Cloned the Django To-Do List project from GitHub to the EC2 instance.
Commands:
# Update the package manager and install Git
sudo yum update -y
sudo yum install git -y
# Clone the repository
git clone https://github.com/your-username/django-todo-list.git
# Navigate to the project directory
cd django-todo-list
✅Future Tasks
Write a Dockerfile: Containerize the Django application.
Build a Jenkins CI/CD Pipeline: Automate deployment.
Deploy on EC2: Ensure the app runs on the instance seamlessly.
✅Real-Life Scenario
This approach mimics how modern DevOps teams set up their workflows:
Using version control for collaboration (GitHub).
Containerization for consistency (Docker).
CI/CD pipelines for efficiency (Jenkins).
Cloud infrastructure for scalability (AWS).
✅What’s Next?
I’ll focus on writing a Dockerfile and setting up Jenkins for CI/CD in the next phase. Stay tuned for updates on this exciting project journey! 🚀
🚀Thanks for joining me on Day 70! Let’s keep learning and growing together!
Happy Learning! 😊
#90DaysOfDevOps
Subscribe to my newsletter
Read articles from Kedar Pattanshetti directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by