Walkthrough
From a laptop with AWS CLI profile sandbox. Region ap-southeast-2.
On this page
Prerequisites
- AWS CLI + Session Manager plugin
- Docker is not required on the laptop; images build on the instance
- Outbound HTTPS from the instance (gsm, apt, GEOFON)
export AWS_PROFILE=sandbox AWS_DEFAULT_REGION=ap-southeast-2 AWS_PAGER=""
Create or reuse the host
./scripts/lab-up.sh
That script:
- Reuses VPC/IAM tagged
Project=seiscomp-containers-lab, or creates them - Opens TCP 3389 from your current public
/32 - Launches Ubuntu 24.04
t3.xlargewithdocker/ec2-user-data.sh(Docker Engine) - Associates an Elastic IP
- Waits for SSM and Docker, then runs
lab-sync.sh
First image build runs gsm inside Docker and takes a while. Compose Bake is disabled in lab-sync.sh because building scmaster and gui in one Bake invoke can fail with image already exists.
Update files on a running instance
./scripts/lab-sync.sh
Packs compose.yaml, docker/, config/, and related paths, copies them to /home/ubuntu/seiscomp-containers-lab, writes .env (SYSOP_PASSWORD from SSM), then docker compose build and up.
SSM starts as ssm-user. The ubuntu home directory is not world-enterable:
aws ssm start-session --target "$IID"
sudo -iu ubuntu
cd /home/ubuntu/seiscomp-containers-lab
Prove
./scripts/lab-prove.sh
Or follow Prove by hand. Then Desktop over RDP.
Destroy
./scripts/lab-destroy.sh # instance + Elastic IP; keeps VPC/IAM
./scripts/lab-destroy.sh --all # also VPC, security group, IAM role
Stop instead of terminate if you will come back the same day. A stopped instance with an associated Elastic IP still has EIP charges;
lab-destroy.shreleases the tagged address.