Project Overview
This project successfully accomplished the containerization and automated deployment of a microservices-based TODO application. The implementation followed modern DevOps practices, utilizing container technologies, infrastructure as code, and configuration management to create a seamless deployment pipeline.
Key Achievements
Application Containerization

Forked and enhanced the original TODO application repository
Created optimized Dockerfiles for each microservice component:

Frontend (Vue.js)
Auth API (Go)
Todos API (Node.js)
Users API (Java/Spring Boot)
Log Message Processor (Python)
Redis Queue

Implemented a comprehensive docker-compose.yml configuration for single-command application startup
Configured Traefik as a reverse proxy with automated SSL certificate management
Established secure endpoints with proper domain routing

Infrastructure Automation

Developed a dedicated infrastructure repository with Terraform and Ansible configurations
Created modular Terraform code for provisioning cloud resources with appropriate security configurations
Implemented Ansible roles for:

System dependencies installation (Docker, Docker Compose)
Application deployment and configuration
SSL/TLS setup with Traefik integration

Achieved complete end-to-end automation with single-command deployment
Produced detailed documentation for infrastructure setup and management

Technical Implementation Details
The solution implements a modern microservices architecture with containerized components, each running in its own Docker container. The infrastructure code provisions the necessary cloud resources and configures the deployment environment, ensuring consistency and repeatability. The entire system can be deployed with a single terraform apply -auto-approve command, demonstrating the power of infrastructure as code.
Technologies Used

Docker and Docker Compose for containerization
Terraform for infrastructure provisioning
Ansible for configuration management
Traefik for reverse proxy and SSL management
Various programming languages (Vue.js, Go, Node.js, Java, Python)

Results
The completed project demonstrates a production-ready microservices application with proper security measures, scalable architecture, and automated deployment capabilities. This implementation showcases advanced DevOps skills and provides a solid foundation for future enhancements.
Project Links

Application Repository: https://github.com/hngprojects/DevOps-Stage-4.git
Infrastructure Repository: https://github.com/sdrock83/DevOps-Stage-4-Infrastructure.git

This project successfully met all the requirements specified in the Stage 4 task, including containerization, secure domain configuration, infrastructure automation, and single-command deployment.

Task
DevOps Stage 4 Task: Containerize, Deploy, and Automate a Microservices TODO ApplicationOverview
This task consists of two parts:
1. Containerizing a microservices application (in a forked repository)
2. Creating infrastructure automation code (in a new repository)
Part 1: Application Containerization

  1. Repository Setup • Fork the original application repository from: GITHUB REPOSITORY • Clone your forked repository to your local machine • Make all containerization changes in this repository
  2. Application Components • Frontend (Vue.js) • Auth API (Go) • Todos API (Node.js) • Users API (Java/Spring Boot) • Log Message Processor (Python) • Redis Queue
  3. Containerization Tasks • Create Dockerfiles for each service in their respective folders • Set up docker-compose.yml in the root directory • Ensure the application builds with a single command: docker-compose up -d
  4. Domain & SSL Configuration • Configure a custom domain for the application • Set up Traefik as reverse proxy • Implement HTTP to HTTPS redirection • Configure endpoints: ◦ Frontend: https://domain.com ◦ Auth API: https://auth.domain.com or https://domain.com/api/auth ◦ Todos API: https://todos.domain.com or https://domain.com/api/todos ◦ Users API: https://users.domain.com or https://domain.com/api/users
  5. Expected Behaviors • Login page should be accessible at your custom domain • Successful login should redirect to TODO dashboard • Direct API access should return: ◦ Auth API: "Not Found" response ◦ Todos API: "Invalid Token" message ◦ Users API: "Missing or invalid Authorization header"
  6. Push Changes • Commit and push all your changes to your forked repository Part 2: Infrastructure as Code and Configuration Management
  7. New Repository Creation • Create a new repository specifically for infrastructure code • This repository should contain all Terraform and Ansible files
  8. Terraform Module • Create Terraform configurations to: ◦ Provision cloud server(s) ◦ Configure security groups ◦ Dynamically create Ansible inventory files ◦ Trigger Ansible playbook execution after provisioning
  9. Ansible Module Create Ansible roles for: • Dependencies Role: ◦ Installing Docker, Docker Compose, and other required dependencies • Deployment Role: ◦ Cloning the application repository (your forked repo from Part 1) ◦ Executing Docker Compose to deploy the application ◦ Setting up SSL/TLS with Traefik
  10. Single Command Deployment • The entire infrastructure setup and application deployment should be executable with a single command: terraform apply -auto-approve • This command should provision infrastructure, configure the server, and deploy the application automatically
  11. README Documentation • Create a detailed README.md file in the infrastructure repository with: ◦ Setup instructions ◦ Requirements ◦ Description of the infrastructure and deployment process ◦ Any environment variables or configuration needed Submission Requirements
  12. Repository URLs • Forked application repository URL (Part 1) • New infrastructure repository URL (Part 2)
  13. Required Screenshots • Login page at domain.com • TODO dashboard after successful login • Successful Terraform and Ansible playbook execution
  14. URLs to Submit • Both GitHub repository links • Frontend application URL Grading Criteria
  15. Application Repository Validation • Proper Dockerfile configuration for all services • Working docker-compose.yml • All required services present and properly containerized
  16. Infrastructure Repository Validation • Well-structured Terraform modules • Properly implemented Ansible roles • Successful single-command deployment (terraform apply -auto-approve)
  17. Endpoint and Functionality Validation • Working application with proper routing • Secure endpoints (HTTPS) • Successful login and TODO dashboard access