How moduscreateorg/devops-infra-demo works
Main Components
• Infrastructure Provisioning:
• Terraform modules (files in the terraform directory) that set up core AWS components such as VPC, subnets, security groups, Auto Scaling Groups, ELB, IAM roles/policies, and Route 53.
• Use of S3 and DynamoDB for Terraform state management and locking.
• Image Building & Configuration Management:
• Packer (in the “packer” directory and related bin scripts) which creates AMIs.
• Application Deployment & Code Packaging:
• CodeDeploy integration (files under “codedeploy” and scripts in “bin/codedeploy”) used for packaging and deploying the demo application.
• That the application itself exists in the “application” folder (static assets) and the Python application code is found in “src” (with endpoints like /api/spin).
• CI/CD Orchestration:
• Jenkins pipeline (Jenkinsfile) which orchestrates Packer runs, Terraform updates, CodeDeploy packaging, and even performance testing via JMeter.
• Auxiliary scripts (scripts in “bin”) that drive these processes, including scanning (Gauntlt, OpenSCAP) and deployment automation.
• Testing & Validation:
• JMeter (folder “jmeter”) for load testing and the use of containerized execution.
• Gauntlt (folder “gauntlt”) for security assessment and compliance testing.
Relationships and Interactions
• Packer builds AMIs using configuration scripts from the Ansible playbooks; these AMIs are then used by the Auto Scaling Group.
• CodeDeploy picks up application packages (from CodeDeploy folder and the packaging scripts) and deploys them onto instances.
• Jenkins (CI/CD server) triggers the entire pipeline: it initiates Packer builds, runs Terraform to provision/update infrastructure, packages applications, and may trigger load or security tests (JMeter and Gauntlt).
• Google Cloud Storage is touched for hosting application images and possibly assets referenced within the application.
• External services:
• Monitoring implementations (using New Relic and Cloudwatch from the corresponding Terraform and Ansible roles) which feed back into the pipeline.
• Vagrant is also available (via the Vagrantfile) for local staging and testing of Ansible playbooks.
Architectural Patterns & Design Principles
• Infrastructure layer (cloud resources, networking, security)
• Platform/Executable image layer (Packer + Ansible)
• Application layer (web static assets and Python API, CodeDeploy, load balancer)
• Testing and CI/CD orchestration (Jenkins, automated testing components)
• Clearly separated concerns:
• Infrastructure management (Terraform)
• Image building and configuration (Packer + Ansible)
• Deployment and application runtime (CodeDeploy, Auto Scaling, ELB)
• Continuous integration and testing (Jenkins, JMeter, Gauntlt/OpenSCAP)
Relevant Technologies & Frameworks
• AWS services – EC2, Auto Scaling Groups, ELB, S3, DynamoDB, and CodeDeploy.
• Google Cloud Storage (for application assets).
• Packer for AMI creation.
• Ansible as a configuration management engine.
• Terraform for infrastructure provisioning.
• Jenkins as the CI orchestrator.
• JMeter for load testing.
• Gauntlt and OpenSCAP for security compliance scanning.
• Docker is used for some tooling and containerized testing.