Add template-cleanup scripts: reset a production clone to a clean golden VM
Defuse (crontab/postfix/push/ES-bind), .env neutralization, and an FK-retry truncation engine for the iDempiere DB (transactional wipe, bare master data, org purge with reversal/cycle unlinking, trigger handling for the ES sync, deferrable-constraint handling), plus Strapi truncation and orchestration. Used to build VM 113 logship-template-2.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TEMPLATE-README.md mirrors /root/TEMPLATE-README.md on VM 113 (what the golden VM contains, clone-to-instance checklist). RECLONE-RUNBOOK.md is the tested end-to-end procedure (PBS restore, quarantined defuse via guest agent, truncation, validation, finalize) with all gotchas.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add 04-set-instance-identity.sh: rebrand tenant on instance clones
Renames client/org 1000000, the org-linked partner, main warehouse and roles, sets .env COMPANYNAME, restarts iDempiere+frontend, and reports remaining old-brand occurrences. --dry-run mode (verified on VM 113). Docs updated with the new clone-to-instance step.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add clone-logship-instance.sh: one-command instance provisioning on prox2
Wraps qm clone of template VM 113 + IP/name/resources + boot + guest-agent wait + in-guest tenant rebrand (04-set-instance-identity.sh), with VMID/IP preflight checks and a next-steps checklist. Staged at prox2:/root/clone-logship-instance.sh.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
template-cleanup: restore AD_Session for the long-lived IDEMPIERETOKEN
The truncation wiped ad_session incl. the row the SuperUser JWT points at; the REST servlet 500s on such tokens. Recreate session 1000081 so clones work out of the box (already applied to template VM 113).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>