How opsumo/docker-remote-dev works
Project Type and Purpose
• Type: Infrastructure-as-Code/DevOps automation tool
• Purpose: Provision an AWS EC2 instance, install Docker CE via Ansible, and configure the local Docker CLI to target that remote host over SSH for seamless development.
File Structure
• Top-level orchestrator: justfile (defines tasks like just install)
• IaC layer: terraform/
• Submodules for AWS networking (VPC, subnets, security groups) under terraform/aws/network
• Submodules for compute (EC2, user data) under terraform/aws/ec2
• Root Terraform config (providers.tf, variables.tf, main.tf)
• Configuration layer: ansible/docker-remote-dev-playbook.yml
• Templates: terraform/aws/ec2/userdata.tpl (initial bootstrap)
• Variables: terraform.tfvars.example
Extract Key Insights from the README
• Orchestration flow:
a. Developer runs just install
b. Terraform provisions AWS network & EC2
c. Ansible playbook installs/configures Docker CE on the new EC2
d. Local environment variables (DOCKER_HOST, SSH keys) get set for remote‐Docker usage
• Dependencies: Terraform, Ansible, Docker CLI, SSH, Just
Main Architectural Components
a. Local Developer Machine
• Just command runner
• Terraform CLI
• Ansible CLI
• Docker CLI (configured to point to remote daemon)
b. Orchestration & Provisioning Layer
• Justfile (entry point)
• Terraform AWS Provider → AWS network & EC2 instance
• Ansible playbook → remote configuration of Docker CE
c. AWS Environment
• VPC, subnets, security groups (network)
• EC2 instance (compute) with Docker CE installed
d. Runtime Interaction
• Docker CLI → SSH tunnel → Docker daemon on EC2
Architectural Patterns & Technologies
• Pattern: Infrastructure as Code layered with Configuration Management
• Tools/Technologies:
• Terraform modules for infra provisioning
• Ansible playbooks for post-provisioning configuration
• Just for task orchestration
• AWS (VPC, EC2, IAM)
• Docker CE & SSH tunneling