[!NOTE]
Web Application Repo: https://github.com/RamaRaju-personal-org/webapp
Infra Repo : https://github.com/RamaRaju-personal-org/tf-gcp-infra
This Project comprises a cohesive collection of repositories intended to streamline the deployment of a secure, scalable, and highly available web application on the Google Cloud Platform (GCP). By leveraging Terraform for infrastructure automation, Google Cloud Functions for serverless execution, and Node.js for backend development, this project provides a robust solution for deploying and managing contemporary, cloud-native applications. Additionally, it utilizes Packer for creating immutable machine images, GitHub Actions for CI/CD, and ensures data security with encryption managed by Google Cloud Keys.
The backend is built with Node.js, offering RESTful APIs for user management, including registration, profile retrieval, updates, and health checks. Secure access is maintained using Basic HTTP authentication and Base64 encoding. User passwords are securely stored in a MySQL database with Bcrypt hashing.
Terraform is used for Infrastructure-as-Code (IaC) to automate and provision a secure GCP environment, including VPC, subnets, routes, firewalls, Compute Engine, Cloud SQL (MySQL database), Cloud Storage, Cloud Functions, load balancer, Cloud DNS, Google-managed SSL certificates, and encryption keys.
Packer and GitHub Actions are utilized to create immutable machine images with pre-built application artifacts, ensuring code integrity. Terraform provisions these images into VMs, eliminating manual SSH configurations. Deployment is automated with startup scripts that configure database connections and start the application.
GitHub Actions is used to set up a CI/CD pipeline, automating testing and deployment.
Google Pub/Sub and Mailgun are used for email verification, sending unique verification links upon account creation. A Cloud Function and Cloud SQL handle the verification process, ensuring secure user registration and API access.
Structured JSON logging streams log data to Google Cloud Observability, enhancing diagnostic capabilities.
The application leverages dynamic scaling, load balancing, security groups, IAM roles, and customer-managed encryption keys for enhanced scalability and security.