core#242 PROD follow-up: tenant EC2 user-data must stage /etc/molecule-bootstrap/personas #128
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sub-issue of core#242 (CP provisioner persona injection)
The LOCAL surface shipped — docker-compose.yml bind-mounts
${HOME}/.molecule-ai/personasinto the platform container at/etc/molecule-bootstrap/personassoorg_import.go::loadPersonaEnvFilefinds files locally.The PROD surface remains: tenant EC2s don't have
/etc/molecule-bootstrap/personas/populated, soloadPersonaEnvFilesilently no-ops on every workspace import. Per saved memoryfeedback_unified_credentials_file, the canonical pattern post-2026-05-06 is AWS Secrets Manager-fetched-at-boot rather than scp-from-operator. So:Proposed approach
/etc/molecule-bootstrap/personas/whenever the rotation cron fires.ec2.goprovisioner) to fetch + stage at first boot. Read the secret(s) via the EC2 instance profile; write to/etc/molecule-bootstrap/personas/<role>/envon the EC2 host filesystem; the existing platform-service docker-run already mounts/etcinto the container so the platform sees them.Option 3a is simpler and matches the existing CP redeploy pattern. Operator-host rotation cron also enqueues a CP-redeploy-fan-out job that re-pushes user-data to each tenant.
Acceptance criteria
ec2.gouser-data fetches + stages persona files at first boot using instance-profile authrole: dev-leadresults inworkspaces_secretsrows withGITEA_USER=dev-lead, etc./opt/molecule/rotate-personas.py) extended to mirror to Secrets Manager + queue per-tenant redeployOut of scope
Refs
feedback_unified_credentials_file(AWS Secrets Manager is SSOT pattern post-suspension)feedback_local_must_mimic_production(in-container path matches prod, established by LOCAL surface fix)/opt/molecule/rotate-personas.pyon operator host (where the rotation cron runs; needs the extension)