Hands-on tutorial · local AWS emulator
How I built PR-Preview, start to finish
This is the practical companion to the architecture story: install the local AWS boundary, make a Kubernetes preview safe, automate one environment per GitHub PR, add HTTPS, test a real multi-container app, then prove cleanup and reboot recovery.
The pr-preview-* names in the walkthrough are publication-only reference names; adapt them to the scripts and manifests in the installation you actually control.
A personal learning lab inspired. It runs on one Ubuntu server and uses Floci account 000000000000.
How to read the commands
They are drawn from the lab, not a one-click installer for your host. Replace paths, domain, IAM role and interface names deliberately. Run one phase at a time and inspect its check before moving on. Never paste secrets or run emulator examples against a real AWS profile.
The whole system in one minute
GitHub builds an exact-commit image. Argo CD sees an eligible PR and installs a trusted Helm chart into its own restricted namespace. DNS, TLS and Nginx expose that namespace at a PR-specific URL. Merge or close the PR and Argo prunes it. Floci supplies local AWS-shaped safety, K3s, queues and image storage; a Mac or Ubuntu Compose loop remains separate from public previews.
Floci safety plane + EKS/K3s + opt-in SQS/KEDA + local ECR/Compose
The walkthrough
Step 01
Set the boundary before installing anything
This is a local emulator lab on one Ubuntu host, not a deployment into an AWS account. Decide which machine owns each responsibility before running commands.
Do this
Use Ubuntu for Docker, Floci, K3s and the public edge. Use GitHub for source, PRs and image builds. Use the Mac for editing and an optional isolated development loop. Have a domain, DNS API access, rootful Docker, and enough host capacity for the previews you intend to run.
docker version
docker compose version
aws --version
kubectl version --client
helm version --shortCheck before continuing
Record the installed versions and free CPU, memory and disk. Do not copy this lab’s quotas to a smaller host.
nproc
free -h
df -h /Watch for: A single-node preview platform has one failure domain. Start with one small preview and cap the heavy OpenReview workers.
Step 02
Run Floci as a persistent, loopback-only AWS emulator
The emulator supplies AWS-shaped APIs without creating billable AWS resources.
Do this
Create /home/sam/floci-aws-lab/compose.yaml using the pinned image, a persistent /app/data mount, an explicit account/region, S3 authentication, and a 127.0.0.1:4566 port binding. The Docker socket is required for Floci’s EKS-to-K3s path, so only a trusted local administrator should control this Compose project.
Configuration file
services:
floci:
image: floci/floci:2.0.1@sha256:4e451c39c7bb88e3cd4f87e8fc0c25d5b47695a51185d521e2241fa00486e8eb
container_name: floci-aws-lab
restart: unless-stopped
user: "0:0"
ports:
- "127.0.0.1:4566:4566"
environment:
FLOCI_DEFAULT_REGION: ap-south-1
FLOCI_DEFAULT_ACCOUNT_ID: "000000000000"
FLOCI_BASE_URL: http://localhost:4566
FLOCI_STORAGE_MODE: persistent
FLOCI_STORAGE_PERSISTENT_PATH: /app/data
FLOCI_SERVICES_S3_ENFORCE_AUTH: "true"
volumes:
- ./data:/app/data
- /var/run/docker.sock:/var/run/docker.sockcd /home/sam/floci-aws-lab
docker compose up -dCheck before continuing
The Floci container is running, its restart policy is unless-stopped, and port 4566 is bound to loopback—not 0.0.0.0.
docker inspect floci-aws-lab --format '{{.State.Status}} {{.HostConfig.RestartPolicy.Name}}'
docker port floci-aws-lab 4566/tcpWatch for: Do not use docker compose down -v as a routine stop command: deleting volumes would remove retained emulator state.
Step 03
Make it hard to confuse Floci with real AWS
A dedicated profile, endpoint and fake account ID are a safety boundary, not just a convenience.
Do this
Configure a local-only AWS CLI profile with dummy credentials. Before every resource-creating command, check its endpoint, caller account and region.
aws configure set aws_access_key_id test --profile floci-local
aws configure set aws_secret_access_key test --profile floci-local
aws configure set region ap-south-1 --profile floci-local
aws configure set endpoint_url http://127.0.0.1:4566 --profile floci-localCheck before continuing
The endpoint must be 127.0.0.1:4566 and STS must report account 000000000000. Stop if either differs.
aws configure get endpoint_url --profile floci-local
aws sts get-caller-identity --profile floci-local --region ap-south-1 --output json --no-cli-pagerWatch for: A multiline shell backslash must be the final character on its line. Do not copy the prompt or the terminal’s > continuation marker.
Step 04
Build the safety plane before creating previews
The separate safety track proves that a run can be registered, frozen, evidenced, recovered and cleaned using exact state.
Do this
In Floci, the lab uses IAM/STS boundaries, an S3 evidence bucket, a DynamoDB runs table, SNS notifications, Lambda handlers, one Step Functions cleanup workflow and EventBridge Scheduler. Build and test the local-plane source, deploy only after its provider preflight passes, then work through Gates A–D in order. Gate C contains mutations; Gate D restarts only Floci.
Check before continuing
Malformed events, wrong checksums and unsafe registration fail closed. Recovery requires a single-use ticket bound to retained evidence. The accepted baseline retains FREEZE=true and no active run or schedule.
aws s3api list-buckets --profile floci-local --region ap-south-1 --output json --no-cli-pager
aws dynamodb list-tables --profile floci-local --region ap-south-1 --output json --no-cli-pagerWatch for: This track is not a guaranteed billing kill switch. Real AWS Budgets notifications can be delayed and require a separate plan.
Step 05
Create a Kubernetes cluster through the Floci EKS facade
The EKS-shaped API creates a local K3s container, letting you study the AWS-to-Kubernetes boundary without paying for managed EKS.
Do this
Create the local IAM identity and EKS role documented in the full guide. Use a second local profile, floci-eks-admin, and verify it also points to Floci. Then create the cluster. The empty subnet and security-group lists below are emulator-specific and must not be copied into a real AWS EKS plan.
aws eks create-cluster \
--name pr-preview-lab \
--role-arn arn:aws:iam::000000000000:role/pr-preview-lab-eks-role \
--resources-vpc-config 'subnetIds=[],securityGroupIds=[]' \
--kubernetes-version 1.37 \
--profile floci-eks-admin --region ap-south-1 --output json --no-cli-pagerCheck before continuing
Wait for the EKS facade to report ACTIVE, then inspect the backing container. The requested EKS version is metadata; the observed K3s runtime was 1.34, so align kubectl to the actual control plane.
aws eks describe-cluster --name pr-preview-lab --profile floci-eks-admin --region ap-south-1 --query 'cluster.{Status:status,Endpoint:endpoint}' --output json --no-cli-pager
docker exec floci-eks-pr-preview-lab kubectl get nodes -o wideWatch for: Floci EKS is not managed AWS EKS. The API shape is useful for learning, but its scaling, networking and failure modes differ.
Step 06
Harden and recover the K3s host
The first K3s startup failed at the host inotify ceiling; later a reboot exposed Docker bridge-address drift.
Do this
Raise fs.inotify.max_user_instances to 512 through a narrow /etc/sysctl.d file. Put the Kubernetes API behind a DOCKER-USER rule because Docker-published ports can bypass UFW assumptions. The retained K3s node is pinned to 172.31.0.3 on the private Floci network, with a certificate-based kubeconfig and a fail-stop recovery script.
Check before continuing
Host-local kubectl works; a second machine cannot connect to port 6500. After reboot, run recovery and the full verifier, then confirm K3s still advertises the pinned IP.
sysctl fs.inotify.max_user_instances
sudo iptables -L DOCKER-USER -n -v --line-numbers
kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview get nodes -o wide
/home/sam/pr-preview-lab/scripts/verify-lab.shWatch for: The full Ubuntu power-cut reboot drill later passed after Floci UI was pinned to a different private address. Do not “repair” this by deleting the K3s volume or restarting unrelated services.
Step 07
Prove one namespace really isolates one PR
Before automation, create a manual namespace and test the controls behaviorally.
Do this
Use a namespace per PR. Apply restricted Pod Security, ResourceQuota, LimitRange and default-deny NetworkPolicies. For the small web chart, the lab caps eight Pods, one CPU of requests, 2 GiB of requested memory, and zero NodePort or LoadBalancer Services.
Check before continuing
An oversized container, an insecure Pod, a NodePort Service and an unapproved network client must all fail. A properly labelled client should reach only the intended web Service.
kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview -n pr-preview-pr-001 describe resourcequota,limitrange
kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview -n pr-preview-pr-001 get networkpoliciesWatch for: A policy object merely existing is not proof that traffic is blocked. Test both an allowed and a denied request.
Step 08
Package the preview with Helm
A release is easier to install, upgrade, test and remove than loose manifests.
Do this
The preview-web chart packages the ConfigMap, Deployment, ClusterIP Service, policies, probes and resource bounds. Lint and render it first, then ask the live API to validate it without persistence. Install only after the dry run passes.
helm lint /home/sam/pr-preview-lab/charts/preview-web
helm template pr-preview-pr-002 /home/sam/pr-preview-lab/charts/preview-web --namespace pr-preview-pr-002 | kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview apply --dry-run=server -f -Check before continuing
The Helm release is deployed, the Pod is Ready, and changing the content checksum causes a new Pod rollout.
helm status pr-preview-pr-002 --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --kube-context floci-pr-preview --namespace pr-preview-pr-002Watch for: helm template validates rendering; --dry-run=server also exercises the Kubernetes API’s schema, admission, quota and policy checks.
Step 09
Let GitHub Actions and Argo CD own the PR lifecycle
A developer should open a PR and receive an isolated preview without manually creating Pods.
Do this
For an eligible same-repository PR, Actions builds an image from the exact PR head SHA and publishes it to GHCR. The pr-preview label triggers an Argo CD ApplicationSet. Argo renders only the trusted GitOps main-branch chart; PR code provides the image, never its own security policy. The chart owns the Namespace at an early sync wave, so prune removes the whole environment.
Check before continuing
One PR produces one Application, namespace, Pod set and URL. A new commit changes the exact-SHA image. Removing the label, closing or merging the PR prunes that environment only.
kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview -n argocd get applicationsets,applicationsWatch for: The pr-preview label and pr-preview-* namespace names remain operational identifiers after the public rebrand; changing them requires a separate migration.
Step 10
Add DNS, TLS, ingress and access control
A PR preview is useful only when a reviewer can open a stable HTTPS address safely.
Do this
ExternalDNS creates GoDaddy CNAME plus TXT ownership records for eligible Ingresses. ACME DNS validation supplies a wildcard certificate. ingress-nginx routes to Kubernetes Services. Host Nginx terminates TLS and uses Basic Auth for browser-facing preview routes; application APIs and signed media retain their own authorization rules. Keep DNS API keys and private keys out of Git.
Check before continuing
A new preview hostname resolves and has a valid wildcard certificate. An unauthenticated browser request receives 401; an authenticated request reaches the app. On PR teardown, both DNS records disappear.
PREVIEW_HOST="openreview-pr-1.git.arunsamuel.com"
dig +short "$PREVIEW_HOST"
curl -I "https://$PREVIEW_HOST/"Watch for: Let’s Encrypt issues certificates. It does not create DNS, route traffic or authenticate users. Those are separate controls.
Step 11
Onboard public and private repositories differently
The same per-PR idea should work for future repositories without handing broad credentials to the cluster.
Do this
From the GitOps checkout, the adapter generator creates repository-specific AppProject and ApplicationSet manifests. Public repos can use anonymous PR discovery and public GHCR images. Private repos use a read-only GitHub App installed only on selected repositories, plus a separate read:packages pull credential reflected only into approved namespaces. CuePilot Live and Campus Connect were the two pilot paths.
python3 scripts/generate-repository-adapter.py --helpCheck before continuing
The generated adapter is bound to the exact owner/repository, chart and hostname slug. Confirm that a private image pull succeeds only in a labelled private-preview namespace.
Watch for: Do not give the App “all repositories” just for convenience. Discovery access and package-pull access are independent privileges.
Step 12
Exercise a real multi-container application
A static web page does not prove the platform can host databases, background work or media routes.
Do this
An eligible OpenReview Studio PR owns its own web, API, PostgreSQL, Redis and MinIO Pods; an FFmpeg worker runs by default or scales on demand in the opt-in SQS mode. Two completed Jobs initialize the bucket and database. The chart also owns Services, Ingresses, NetworkPolicies, quotas, runtime Secret references and three PVCs.
Check before continuing
The PR URL supports login, upload, queue processing, thumbnail/proxy generation and playback. The frontend calls same-origin /api; it must not embed a temporary PR hostname.
kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview -n pr-preview-openreview-pr-1 get pods,services,ingresses,pvcWatch for: For this heavier chart the quota is ten Pods and 12 GiB requested storage, with zero NodePort or LoadBalancer Services. PRs never share a PostgreSQL or MinIO claim.
Step 13
Scale FFmpeg workers from Floci SQS depth
KEDA tests bounded, event-driven scale-to-zero without replacing the whole application queue design.
Do this
The pr-preview-sqs label opts OpenReview PR #1 into a Floci SQS transcode queue and dead-letter queue. KEDA uses the private emulator endpoint and caps the worker Deployment at two replicas. Other previews can keep the Redis/BullMQ path. This is not real AWS SQS.
Check before continuing
With no work the worker has zero replicas. One upload raises it to one; two concurrent uploads reached the cap of two. After READY processing, the queue and DLQ drain and the worker returns to zero.
aws sqs list-queues --profile floci-local --region ap-south-1 --output json --no-cli-pager
kubectl --kubeconfig /home/sam/.kube/floci-pr-preview.yaml --context floci-pr-preview -n pr-preview-openreview-pr-1 get scaledobject,deploymentWatch for: Keep worker concurrency at one per replica and recheck host CPU, memory and storage before raising the replica cap.
Step 14
Add opt-in error reporting without exporting media or user data
A working preview needs enough error evidence to debug API and worker failures, but review content is private.
Do this
The OpenReview pilot uses a private Sentry ingest bridge and a dedicated project. Only the API and FFmpeg worker receive the DSN, with egress permitted by NetworkPolicy. Sanitize events so request bodies, user details, filenames, media payloads and credentials are not sent. This is optional and is not a platform-wide monitoring installation.
Check before continuing
A synthetic error reaches the dedicated Sentry project, a normal video canary still reaches READY, and inspected event data contains no sensitive request or media content.
Watch for: Keep the DSN in a Secret outside Git. Avoid treating a synthetic Sentry event as proof that every failure path is observable.
Step 15
Set up Mac/OrbStack and Ubuntu development loops
Fast local iteration and shareable PR environments solve different problems.
Do this
On Ubuntu, a separate Compose project pulls exact-SHA web/API/worker copies from three Floci ECR repositories through a loopback registry sidecar; its PostgreSQL, Redis and MinIO volumes are independent. On the Mac, the OrbStack development loop has exact-image mode at 127.0.0.1:8088 and a source-watch mode at 8087. PR previews continue to pull GHCR images.
Check before continuing
Ubuntu: inspect the three emulated ECR repositories, image digests and local API readiness. Mac: use the launcher’s verify and media-canary commands after setup.
aws ecr describe-repositories --profile floci-local --region ap-south-1 --query 'repositories[].repositoryName' --output table --no-cli-pager
# On the Mac, from the OpenReview checkout:
scripts/pr-preview-local-mac.sh status
scripts/pr-preview-local-mac.sh verifyWatch for: Floci ECR 2.0.1 recorded immutable-tag metadata but did not enforce immutability on push in this lab. Use a fresh sha-<commit> tag and verify its digest.
Mac setup with OrbStack: the complete local workflow
Here, “Hermes-inspired” means a repeatable local environment with the same application components and configuration patterns as a PR preview. OrbStack runs the containers; your browser opens OpenReview. There is no separate Hermes application to launch.
The Mac runs web, API, an FFmpeg worker, PostgreSQL, Redis, MinIO and a gateway. The image mode adds a standard local registry. It does not require installing Floci, Kubernetes, Argo CD or ECR on the Mac; Floci ECR belongs to the separate Ubuntu development lane. This Compose environment shares application patterns with the preview but does not reproduce its Kubernetes isolation controls.
| Mode | Compose project | Port | Configuration / data | When to use |
|---|---|---|---|---|
| Committed images | openreview-pr-preview-local | 8088 | .env.pr-preview-local | Run setup, then use start/verify/stop |
| Source editing | openreview-pr-preview-dev | 8087 | .env.pr-preview-dev | Run dev-start and dev-watch |
| Mac image registry | Registry in the exact-image project | 5005 | Local named registry volume | Stores the three sha-<commit> images |
15.1 Install OrbStack and select its Docker engine
Run these commands in a terminal on your Mac. If OrbStack is already installed, open it and skip the install command. OrbStack supplies the Docker engine, Compose and buildx. Git is also required; the media canary additionally uses jq and host ffmpeg to generate its test clip. Install those two through Homebrew if they are missing.
brew install --cask orbstack
open -a OrbStack
brew install jq ffmpeg
docker context use orbstack
orb status
docker context show
docker version
docker compose version
git --versionCheck: orb status should report Running; the Docker context should be orbstack and docker version should show a reachable server. You can also download OrbStack from its official website if you do not use Homebrew. Switching the Docker context changes which engine subsequent Docker commands use.
15.2 Get the checkout containing the Mac launcher
For a fresh directory, clone the OpenReview repository and use a reviewed checkout that contains the launcher and Compose files listed below. The publication does not assume a renamed branch or fabricate a public path for these source assets. If you already have the Mac checkout, change into its root and verify the files instead of cloning again. Use a separate clone to preserve any existing work.
git clone https://github.com/samarun/openreview-studio.git openreview-studio-mac
cd openreview-studio-mac
ls scripts/pr-preview-local-mac.sh docker-compose.pr-preview-local.yml docker-compose.pr-preview-dev.yml
git status --shortCheck: The launcher and both Compose files must exist in the reviewed checkout. Run every later launcher command from this repository root. Use a commit or branch only after confirming that it contains these source assets; this guide does not rename or publish the upstream checkout.
15.3 Check ports and understand the two modes
Exact-image mode uses gateway port 8088 and a local image registry on 5005. Source-watch mode uses gateway port 8087. Inspect any listeners before setup; an empty result means nothing is listening on these ports. Run one mode at a time initially to reduce host load. On Apple Silicon the launcher builds for the Mac runtime; there is no need to force AMD64 for this path.
lsof -nP -iTCP:8088 -sTCP:LISTEN
lsof -nP -iTCP:8087 -sTCP:LISTEN
lsof -nP -iTCP:5005 -sTCP:LISTEN
df -h .Check: An existing listener could be your retained lab. Check its Compose project before changing anything. All published lab ports bind to 127.0.0.1, and each mode has its own database, queue and object-store volumes.
15.4 Build and start the exact-image stack
setup generates .env.pr-preview-local with random local secrets and permissions 0600, starts the local registry, builds web/API/worker, pushes them as sha-<current-commit> images, pulls them back and starts the app. Bucket initialization and database migration/seed run before the API becomes ready. The launcher refuses uncommitted application or build inputs because those images would no longer represent the tagged commit.
chmod +x scripts/pr-preview-local-mac.sh
./scripts/pr-preview-local-mac.sh setup
./scripts/pr-preview-local-mac.sh status
./scripts/pr-preview-local-mac.sh verify
open "http://127.0.0.1:8088/"Check: The launcher prints Mac local-development verification passed. In the browser, use the seeded demo login shown by the application. PostgreSQL and Redis should be healthy, the app should be reachable, and the migration and bucket-init containers should have exited successfully. A successful one-shot container exiting is expected.
15.5 Verify the complete video-processing path
The readiness check proves that the API and login respond. The media canary goes further: it generates a short MP4 on the Mac, uploads it through the gateway, creates an asset, waits for the BullMQ/FFmpeg worker to reach READY, retrieves the proxy and checks for a JPEG frame. It leaves a small demo asset in this mode’s local database.
./scripts/pr-preview-local-mac.sh media-canaryCheck: Look for Local media canary passed: upload, worker READY, proxy download and JPEG frame. The Mac Compose stack uses Redis/BullMQ with worker concurrency one. KEDA and Floci SQS remain part of the Kubernetes preview exercise.
15.6 Use source-watch mode while editing
Use this mode for uncommitted source changes. dev-start builds development images and starts an independent Compose project. In a second terminal, enter the same repository root and keep dev-watch running. Web source is synced for Next.js hot reload; API and worker source changes sync and restart their development processes. Dependency and selected configuration changes rebuild the affected image.
# Terminal 1, from the repository root
./scripts/pr-preview-local-mac.sh dev-start
open "http://127.0.0.1:8087/"
# Terminal 2, from the same repository root
./scripts/pr-preview-local-mac.sh dev-watch
# After editing, in Terminal 1
./scripts/pr-preview-local-mac.sh dev-verify
./scripts/pr-preview-local-mac.sh dev-media-canary
./scripts/pr-preview-local-mac.sh dev-statusCheck: Edit a visible label in apps/web/src, save, and confirm the 8087 page updates. After a dependency/config rebuild, rerun dev-start to refresh the gateway’s service addresses. Database schema changes need their appropriate migration; syncing source alone does not migrate a database.
15.7 Stop, resume and publish a new local revision
stop removes this exact-image project’s containers while retaining its named data and registry volumes. start restores that stack without rebuilding. If Git HEAD has changed, run setup after committing the application/build inputs: image references are derived from current HEAD, so start requires that revision’s images to exist in the registry. Source-watch mode has its own stop/start commands.
# Exact-image mode: stop and resume the same revision
./scripts/pr-preview-local-mac.sh stop
./scripts/pr-preview-local-mac.sh start
# After committing application changes
./scripts/pr-preview-local-mac.sh setup
# Source-watch mode: Ctrl+C in its watcher terminal, then
./scripts/pr-preview-local-mac.sh dev-stop
./scripts/pr-preview-local-mac.sh dev-startCheck: Open OrbStack after a Mac reboot, select its Docker context and run the launcher for the mode you need. Retained volumes preserve local data. Keep the generated environment files with those volumes: regenerating their database or MinIO passwords does not update an already-initialized data store.
15.8 Inspect the right project when something fails
Use project-specific status and logs. The following commands inspect exact-image mode; for development logs, use the second command with both Compose files and .env.pr-preview-dev. config --quiet checks configuration without printing expanded secrets. These commands do not remove data.
./scripts/pr-preview-local-mac.sh status
docker compose --project-name openreview-pr-preview-local --env-file .env.pr-preview-local -f docker-compose.pr-preview-local.yml logs --tail 100 gateway api worker migrate create-buckets
docker compose --project-name openreview-pr-preview-dev --env-file .env.pr-preview-dev -f docker-compose.pr-preview-local.yml -f docker-compose.pr-preview-dev.yml logs --tail 100 gateway api worker
docker compose --project-name openreview-pr-preview-local --env-file .env.pr-preview-local -f docker-compose.pr-preview-local.yml config --quietCheck: Keep .env.pr-preview-local and .env.pr-preview-dev out of Git and avoid printing them. Do not add -v to shutdown commands unless erasing the local database and media is the intended operation.
15.9 Troubleshooting reference
- orb or Docker is unavailable
- Open OrbStack, check orb status, and select docker context use orbstack. Check DOCKER_HOST or DOCKER_CONTEXT overrides if the CLI still targets another engine.
- Port is already occupied
- Identify the listener with lsof. If it is this lab, use its status command. For a deliberate gateway-port change, edit only PR_PREVIEW_LOCAL_PORT in the matching generated environment file and rerun setup or dev-start. The launcher fixes the registry port at 5005.
- setup refuses uncommitted inputs
- Use dev-start/dev-watch for work in progress, or review and commit the application/build changes before running setup.
- start cannot pull sha-<commit>
- HEAD changed or that revision was never built locally. Run setup from a reviewed, committed checkout. start only restores already-published local images.
- 502 or a stale page after rebuilding
- Rerun setup for committed images or dev-start for source-watch mode. Both refresh this project’s Nginx gateway after container addresses change.
- Media canary reports jq or ffmpeg missing
- Install the host tools with brew install jq ffmpeg. They generate and inspect the test; the worker image contains the processing FFmpeg.
- Login or database authentication fails
- Inspect API/migration logs and use the environment file originally paired with that mode’s volumes. Do not rotate generated passwords by deleting the file.
- Dev edits do not appear
- Check that dev-watch is running and that you opened port 8087. Consult the watch paths; files outside them need a deliberate rebuild/restart.
- Docker reports insufficient disk or memory
- Check free space and OrbStack resources; stop an unused lab mode with its launcher. Review storage usage before removing anything.
When you finish a feature, run the relevant local verification and media test, then commit and push a PR to the onboarded repository. GitHub builds its preview images and Argo CD creates the PR environment after it meets the preview rules. Local uploads and databases stay in the Mac project; they are not copied into the PR namespace.
The Mac image and source-watch flows previously passed upload, READY processing, proxy retrieval, JPEG-frame checks and stop/start recovery. Those results came from the recorded launcher; the pr-preview-* names shown here are publication-only reference names, and publishing this guide does not run setup or restart the local stack.
References: OrbStack installation and Docker context selection. The versioned OpenReview local-development guide is a source-checkout asset; this publication does not assume a renamed public path for it.
Step 16
Prove teardown and reboot recovery
Creation is only half of a PR platform; cleanup and recovery are the reliability work.
Do this
Close a disposable PR or remove its eligibility label. Confirm Argo prunes its Application, namespace, workloads and PVCs, while ExternalDNS removes its CNAME and TXT record. The lifecycle audit cleans only closed PRs after identity checks; old open PRs are reported, never age-deleted. After an Ubuntu reboot, run the fail-stop recovery and lab verifier before testing a positive media canary.
/home/sam/pr-preview-lab/scripts/recover-after-reboot.sh
/home/sam/pr-preview-lab/scripts/verify-lab.shCheck before continuing
The full power-cut reboot drill passed after pinning K3s and the Floci UI to separate private-network addresses. Check the node, Argo Synced/Healthy state, API firewall, preview route and SQS/DLQ again rather than assuming Docker restart policy is enough.
Watch for: Do not delete the K3s datastore, other containers or old backup volumes as a routine “fix.” Preserve evidence and diagnose the exact failed layer.
Which AWS-shaped services did the lab actually use?
Everything below is local Floci emulation unless explicitly marked absent. The earlier real-AWS budget is separate.
Cost and boundaries
Floci and K3s avoid a managed-EKS hourly bill, but the host, electricity, storage, internet, domain, backups and maintenance still cost money. The platform is one node with Basic Auth and a shared failure domain. A real-AWS comparison needs its own limited plan, TTL, budget alerts and residual-inventory check; AWS Budgets is not an instant hard cap.
What I would improve next
Image signing and policy admission, repeatable backup/restore drills, more repository adapters, and a multi-node or managed-EKS comparison. CloudFront and OctoDNS are not installed. Sentry is an opt-in private OpenReview error path, not a general public monitoring service.