How mrjoy/root_image_factory works
Main Components
a) Infrastructure Layer:
• AWS Multi-Account Setup
• Development Account
• Production Account
• CI/CD Account
b) Tool Chain Components:
• Terraform Management Layer
• Packer Build System
• Ansible Provisioning Layer
c) Output Artifacts:
• Debian 11 Root Images
• AWS AMIs
Infrastructure Organization
• IAM relationships between accounts
Automation Pipeline
• Terraform → Packer → Ansible sequence
• Configuration inputs:
• terraform/*.tf files
• packer/root_image.pkr.hcl
• packer/playbooks/*.yml
Output Management
• Resulting artifacts
Specific Elements
• File references from the project structure:
• terraform/
• main.tf
• variables.tf
• outputs.tf
• packer/
• root_image.pkr.hcl
• playbooks/
• cloud_images.yml
• vars_*.yml
Important Workflows to Highlight
a) Infrastructure Provisioning Flow:
• Terraform Workspace Selection → Account Configuration → Infrastructure Setup
b) Image Building Flow:
• Packer → Ansible Playbooks → Image Creation → Multi-format Output
Environment Separation
• Clear separation between development and production workflows
• Configuration differences using vars_*.yml files
• Workspace-specific behaviors
Key Relationships to Emphasize
• Terraform workspace to AWS account mapping
• Packer's interaction with provisioned infrastructure
• Ansible's role in image configuration
• Final image distribution paths