How shivik0505/reddis works
Project Type and Purpose
• This is an AWS infrastructure provisioning and CI/CD template for deploying a multi-AZ Redis cluster.
• It uses Terraform for infrastructure as code, Ansible for configuration management, and Jenkins for pipeline automation.
File Structure Analysis
• Top-level IaC and CI/CD artifacts:
• terraform/ (VPC, subnets, security groups, EC2 instances, VPC peering)
• ansible/ (roles/redis for configuring Redis on instances)
• Jenkinsfile (pipeline stages)
• Dockerfile, docker-compose.yml (if containerizing parts)
• create_dynamic_inventory.sh, create_clean_inventory.sh
• create_infrastructure_diagram.py, create_redis_infrastructure_diagram.py, view_diagrams.py
• Deployment glue:
• playbook.yml (Ansible playbook to install and configure Redis)
• deploy-infrastructure.sh, quick-setup.sh, cleanup-scripts
Key Architecture from README
• Custom VPC (10.0.0.0/16) spanning 3 AZs
• 1 Bastion Host in a public subnet
• 3 Redis Nodes in private subnets (one per AZ)
• NAT Gateway for outbound internet from private subnets
• Security groups locking down Redis port (6379) and SSH access
• Jenkins pipeline stages: Checkout → Validate → Terraform → Wait → Ansible → Guide generation
a. Main Components
• AWS Cloud boundary enclosing:
• Public Subnet (AZ-a): Bastion Host
• Private Subnet (AZ-a, b, c): Redis Node 1, 2, 3
• Internet Gateway & NAT Gateway
• Security Groups (Bastion SG, Redis SG)
• External services:
• Jenkins Server (could be outside AWS or in a separate management VPC)
• Git Repository (SCM)
• Admin workstation (developer laptop)
b. Relationships and Interactions
• Jenkins → SCM (polling webhooks)
• Jenkins → AWS APIs (Terraform apply)
• Jenkins → run Ansible playbook via SSH through Bastion
• Developer SSH → Bastion → Redis nodes (per connection guide)
• Redis nodes form a cluster (show intra-cluster communication on port 6379)
c. Architectural Patterns and Principles
• Infrastructure as Code (Terraform modules grouping VPC, subnets, instances)
• Configuration as Code (Ansible role for Redis)
• Bastion host as a secure jump server
• Multi-AZ high availability
• CI/CD pipeline with clear stages and gated deployment
d. Technologies and Frameworks
• Terraform (IaC)
• Ansible (configuration management)
• Jenkins (CI/CD)
• AWS Services: EC2, VPC, Subnets, IGW, NAT Gateway, Security Groups