- Overview
- Original Task Requirements
- Adaptation to Oracle Cloud
- Demo
- Solution Architecture
- Infrastructure as Code Implementation
- Application Implementation
- CI/CD Pipeline
- Monitoring and Logging
- Security Measures
- Scalability and Resiliency
- Future Improvements
- Conclusion
This project demonstrates the implementation of a simple HTTP service as requested in the Senior DevOps Engineer hiring task. Due to the unavailability of an Azure subscription or free tier, the solution has been adapted to use Oracle Cloud Infrastructure (OCI) Free Tier while still adhering to the core principles and requirements of the original task.
The original task required the following:
- Create a simple HTTP service with a
/liveendpoint - Design and deploy the application as a cloud solution, preferably in Azure
- Use Infrastructure as Code (IaC), preferably Terraform, to create the cloud components and database
- Implement solutions that support scalability, resiliency, and security
- Provide configuration file(s) that define resources and network
- Add basic logging/monitoring capabilities
- Apply a CI/CD solution (preferably Azure DevOps)
- Provide basic documentation and an architecture diagram
Due to the unavailability of an Azure subscription, the solution was implemented using Oracle Cloud Infrastructure (OCI) Free Tier. However, to demonstrate proficiency with Azure, Terraform modules for Azure resources were created alongside the OCI implementation. This approach showcases the ability to work with multiple cloud providers and adapt to different environments.
The application is accessible at: https://kimohesh.us.to/live
The /live endpoint demonstrates the required functionality:
- Returns "Well done" when successfully connected to the database
- Returns "Maintenance" when there are database connection issues
The implemented solution consists of the following components:
-
Infrastructure: Oracle Cloud Infrastructure (OCI) Free Tier
- Compute Instance: Running the application and Nginx
- Virtual Cloud Network (VCN): Network isolation and security
- Object Storage: For storing logs and backups
- Autonomous Database: PostgreSQL-compatible database
-
Web Server: Nginx
- Acts as a reverse proxy and load balancer
- Handles SSL/TLS termination
-
Application: Simple HTTP API with a
/liveendpoint- Implemented using Node.js and Express.js
- Connects to the OCI Autonomous Database
-
Containerization: Docker and Docker Compose
- Application and Nginx are containerized
- Easy scaling and deployment management
-
Infrastructure as Code: Terraform with Terragrunt
- Manages OCI resources
- Includes Azure modules for demonstration purposes
-
CI/CD: GitHub Actions
- Automated build, test, and deployment pipeline
The infrastructure is organized using a modular approach with Terragrunt for better code reuse and management. While the modules are designed for Azure, they demonstrate the architecture and best practices that would be used in a production environment.