How mrjoy/base_image_factory works
Main Components
a) Image Building Pipeline:
• Root Image (starting point)
• Base Image Layer
• Language-specific Image Layer
• Final AMI Output
b) Core Services:
• Fluentd (teak-log-collector)
• Config-O-Mat (teak-configurator)
• Systemd Services
• CloudWatch Integration
Top Level (Infrastructure):
• AWS Environment
• Security Groups
• CloudWatch Logs
• AMI Storage
Middle Level (Build Process):
• Packer Build Pipeline
• Root Image Input
• Base Image Provisioning
• Language-specific Provisioning
Bottom Level (Service Layer):
• System Services
• teak-log-collector (Fluentd)
• teak-configurator (Config-O-Mat)
• teak-init.target
Key Relationships
a) Build Flow:
• Packer/Ansible provisioning steps between each stage
b) Service Dependencies:
• How teak-init.target depends on core services
• Log flow from services → Fluentd → CloudWatch
Important Details
a) Configuration Sources:
• Playbooks directory structure
• Variable files for different environments (development, stage, prod)
• System configuration files in /etc
b) Language Support:
• Parallel language-specific image creation paths (Ruby 3.1.4, 3.2.2)
• Provisioning playbooks specific to each language
Specific Implementation Notes
• Annotations for important configuration points (e.g., TEAK_SERVICE environment variable)
• CloudWatch Logs structure for different log types