From Linux Basics to Remote Deployment: A 6 Day DevOps Foundation Project
Source: Dev.to
Overview
I set out to strengthen my DevOps fundamentals by building a structured 6‑day hands‑on project series. By the end of the week I had automated the provisioning of a remote Ubuntu EC2 instance, containerized a Flask application, configured Nginx as a reverse proxy, and deployed everything through a single script.
Environment
- Ubuntu (local and EC2)
- Bash
- Docker
- Docker Compose
- Nginx
- AWS EC2
- SSH and SCP
Day 1: Linux Essentials
Topics
- File permissions
- Services and
systemctl - Log inspection
- Basic system commands
Exercise
Wrote a Bash script that checks disk usage, memory usage, and uptime. This forced a deeper understanding of the underlying commands rather than just running them.
Day 2: Bash Scripting
Topics
- Variables
- Loops
- Conditionals
- Logging
- Basic error handling
Exercise
Created a script that installs Docker, Git, and Nginx automatically on an Ubuntu server or container. This turned a manual, repetitive task into a one‑click automation.
Day 3: Docker Fundamentals
Steps
- Containerized a simple Flask application.
- Wrote a
Dockerfile. - Built the image.
- Ran the container locally.
Insight
The exercise clarified how containers package applications and how their runtime behavior differs from running the app directly on the host.
Day 4: Docker Compose and Nginx
Setup
- Defined two services in
docker-compose.yml: one for Flask and one for Nginx. - Enabled internal networking so the containers could communicate.
- Configured Nginx as a reverse proxy routing requests to the Flask service.
- Added health checks to validate service availability.
Insight
Seeing traffic flow through the reverse proxy made the networking piece much clearer and demonstrated internal container communication.
Day 5: SSH Automation
Tasks
- Securely connected to a remote Ubuntu server via SSH.
- Transferred scripts using SCP.
- Executed scripts remotely.
- Managed permissions and environment variables.
Insight
This step linked local automation to real infrastructure, moving the project from theory to practical remote execution.
Day 6: Full Deployment
Combined Script
The final script performs the following actions on a remote EC2 Ubuntu instance:
- Connects via SSH.
- Installs Docker and Git.
- Builds the Flask container.
- Configures Nginx as a reverse proxy.
After execution, the application is accessible through the instance’s public IP address.