How to Run a DevOps To-Do App with GitHub, Python
👋Hello I am Mohd Saif, passionate technology enthusiast currently pursuing a bachelor of Computer application degree.
🎓Education: I am currently pursuing a bachelor of Computer application degree with the focus on coding at Bareilly University my education journey has equipped me with strong foundation in Computer science and I am eager to apply my knowledge to real word challenges.
💡Passion for technology: I have always been deeply passionate about technology and I am particular drawn to devops with AWS.
🚀Skills: 🔹Linux 🔹Shell scripting 🔹Python 🔹Ansible 🔹Docker 🔹Kubernetes 🔹Jenkins CI/CD 🔹Maven 🔹Git and GitHub
✨Future goals: My goal is to facilitate seamless collaboration between development and operations teams, ensuring faster releases and high-quality software. I am a proactive learner, constantly exploring new DevOps trends and practices
Create a DevOps pipeline for a To-Do app project using GitHub and Python as depicted in your image. Here's a step-by-step guide:
DevOps To-Do App Project Using GitHub, Python
1. Setting Up the Django To-Do App
Prerequisites:
Python 3.x
A GitHub account
Step-by-Step Guide:
Step 1: Create the Django To-Do App
Create a Virtual Environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`Install Django:
pip install djangoStart a New Django Project:
django-admin startproject todo_project cd todo_projectCreate the To-Do App:
python manage.py startapp todoSet Up Models and Views: Define your data models in
todo/models.pyand create views intodo/views.pyto handle displaying and managing to-do items.Configure URLs and Templates: Set up URL routing in
todo/urls.pyand create HTML templates in thetemplatesdirectory to render your app’s UI.Create a
requirements.txtFile:pip freeze > requirements.txt
Step 2: Set Up GitHub Repository
Initialize Git Repository:
git initCreate a
.gitignoreFile:echo "venv/" >> .gitignore echo "*.pyc" >> .gitignore echo "__pycache__/" >> .gitignore echo "db.sqlite3" >> .gitignoreCommit Changes:
git add . git commit -m "Initial commit"git clone https://github.com/shreys7/django-todo.git git push origin git branch -M main git push -u origin develop
Screenshot of Visual Studio Code showing a PowerShell terminal cloning a GitHub repository named "django-todo" with the URL https://github.com/shreys7/django-todo.git. The terminal indicates that the cloning and resolving process is complete. The left sidebar lists a folder named "django-todo" under "DEVOPS...". Various options and menus are visible in the interface, including the Start menu with options to create a new file, open a file, or open a folder.

Screenshot of a Visual Studio Code window showing a PowerShell terminal. Commands to create and activate a Python virtual environment are typed: "python -m venv myenv" and "virtualenv env\python\activate". The explorer on the left lists files and folders in a project named "DEVOPSPROJECT".

Visual Studio Code (VS Code) window with the terminal open, showing commands and output related to a Django project. The terminal displays commands for navigating directories and installing Django dependencies, with messages indicating that the requirements are already satisfied. The sidebar shows a project structure with folders and files such as 'staticfiles', 'todoApp', 'todos', '.gitignore', 'db.sqlite3', 'LICENSE', and 'README.md'. Additionally, there is a notification about a new release of pip. The taskbar at the bottom shows several applications, including the Start menu, Edge, File Explorer, and others.

A Visual Studio Code window displaying a Python project. The terminal shows a "makemigrations" command for a Django project, with a warning about auto-created primary keys. The file explorer and README.md file are visible in the editor.

Screenshot of a Visual Studio Code (VS Code) window displaying a README.md file for a Django project. The text guides users on how to set up the Django app, including running database migrations with the command pythonmanage.pymigrate, creating a superuser with pythonmanage.pycreatesuperuser, and starting the server with pythonmanage.pyrunserver. The file explorer on the left lists project files, including directories and files like manage.py and README.md.

A screenshot of a Visual Studio Code window showing a terminal output for a Django project. The terminal displays the process of creating a superuser, including the operations performed, warnings, and user input for the username, email address, and password. The terminal confirms successful creation of the superuser. The application window includes various project files and folders on the left sidebar.

Screenshot of Visual Studio Code with a terminal window showing a Django development server startup command and warnings. The command pythonmanage.pyrunserver is highlighted, and a successful start message indicates the server running at http://127.0.0.1:8000/. The workspace includes a README.md file with setup instructions.

Screenshot of a "Todo List" web application. The page shows a text input field with the placeholder text "hello connections" and an "Add" button next to it. Below, there are two listed tasks with checkboxes: "Send Resume Google now!" and "Hacktoberfest Updates," each with a delete icon on the right side. The URL in the browser is "127.0.0.1:8000/todos/".

We have run all these commands (pip freeze > requirements.txt, git checkout -b feature/deploy-app, git add ., git commit -m "added requirements") after running the todo application. This is the first part of our DevOps todo project. In the next part, we will deploy it on Docker and set up continuous integration with Jenkins. Stay tuned to learn more about this project.
Conclusion
In conclusion, this project demonstrates the effective use of Python and Django to create a functional "Todo List" web application. By following the setup instructions in the README.md file and using the provided GitHub repository, you can easily replicate and customize this project. The application allows users to add, delete, and manage tasks efficiently. With the help of Visual Studio Code, you can run the development server and make necessary changes to the project files. This project is a great starting point for anyone looking to learn more about web development with Python and Django.

