Architecture & features
- Ephemeral compute — a
t3.mediumEC2 instance, disposable; if it dies, a new one replaces it. - Persistent state — Jenkins data on an independent 20 GB EBS volume.
- Save / restore — a Terraform
local-execprovisioner snapshots the data volume before destroy; deploy restores a new encrypted volume from the latest snapshot. Retention trims to the 3 newest. - Dynamic bootstrap —
user_datamounts the volume, fixes Linux ownership, and patches Jenkins' config for the new public IP (the "ghost IP" fix). - JVM tuning —
/dev/urandomentropy, capped heap (-Xmx512m), persistent/tmpon the data drive.
Stack
Terraform · AWS EC2 / EBS / EBS Snapshots · bash user_data · Jenkins.
Usage
terraform apply (load) · terraform destroy (save — pauses for the snapshot copy). Architecture: AWS-Jenkins-Instance/HLD.
Source
~/Terraform/AWS-Jenkins-Instance/ (terraform/).
Compiled from
wiki/projects/AWS-Jenkins-Instance/README.md · git is the source of truth