From dd7a041820f28f97fce37caacbfb27c4498badc6 Mon Sep 17 00:00:00 2001 From: Paul Huliganga Date: Tue, 21 Apr 2026 17:10:58 -0400 Subject: [PATCH] docs: add Oracle VM deploy cheat sheet --- docs/oracle-vm-deploy-cheat-sheet.md | 207 +++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 docs/oracle-vm-deploy-cheat-sheet.md diff --git a/docs/oracle-vm-deploy-cheat-sheet.md b/docs/oracle-vm-deploy-cheat-sheet.md new file mode 100644 index 0000000..118a791 --- /dev/null +++ b/docs/oracle-vm-deploy-cheat-sheet.md @@ -0,0 +1,207 @@ +# Oracle VM Deploy Cheat Sheet — Adobe Sign → DocuSign Migrator + +_Last updated: 2026-04-21_ + +This is the short version of the deployment process. +Use this when you already know what you are doing and just need the commands. + +--- + +## Local project path + +```bash +cd /home/paulh/.openclaw/workspace/projects/adobe-to-docusign-migrator +``` + +## 1. Check what changed + +```bash +git status +git branch --show-current +``` + +## 2. Run tests + +Full suite: + +```bash +pytest tests/ -v +``` + +Quick smoke test: + +```bash +pytest tests/test_api_health.py -v +pytest tests/test_api_auth.py -v +pytest tests/test_api_templates.py -v +pytest tests/test_api_migrate.py -v +``` + +## 3. Commit and push + +```bash +git add . +git commit -m "Describe the change" +git push origin +``` + +If deploying `master`: + +```bash +git push origin master +``` + +--- + +## 4. SSH to Oracle VM + +Using IP: + +```bash +ssh ubuntu@ +``` + +Using hostname: + +```bash +ssh ubuntu@dstemplate.mooo.com +``` + +--- + +## 5. Pull latest code on VM + +```bash +cd /home/ubuntu/projects/adobe-to-docusign-migrator +git branch --show-current +git status +``` + +Deploy `master`: + +```bash +git checkout master +git pull origin master +``` + +Deploy a feature branch intentionally: + +```bash +git checkout +git pull origin +``` + +--- + +## 6. Update dependencies + +```bash +cd /home/ubuntu/projects/adobe-to-docusign-migrator +source venv/bin/activate +pip install -r requirements.txt +``` + +--- + +## 7. Restart app + +```bash +sudo systemctl restart adobe-migrator +sudo systemctl status adobe-migrator --no-pager +``` + +--- + +## 8. Smoke test on VM + +App health: + +```bash +curl http://127.0.0.1:8000/health +``` + +HTML through nginx: + +```bash +curl http://127.0.0.1/ +``` + +--- + +## 9. Check logs if broken + +```bash +journalctl -u adobe-migrator -n 100 --no-pager +journalctl -u adobe-migrator -f +``` + +Check nginx: + +```bash +sudo nginx -t +sudo systemctl reload nginx +``` + +--- + +## 10. Important paths + +Local project: + +```bash +/home/paulh/.openclaw/workspace/projects/adobe-to-docusign-migrator +``` + +VM project: + +```bash +/home/ubuntu/projects/adobe-to-docusign-migrator +``` + +Service file: + +```bash +/etc/systemd/system/adobe-migrator.service +``` + +Nginx site: + +```bash +/etc/nginx/sites-available/dstemplate +/etc/nginx/sites-enabled/dstemplate +``` + +Public URL: + +```text +http://dstemplate.mooo.com +``` + +--- + +## One-block deploy command set + +If code is already pushed and you are deploying `master`: + +```bash +ssh ubuntu@dstemplate.mooo.com ' + cd /home/ubuntu/projects/adobe-to-docusign-migrator && + git checkout master && + git pull origin master && + source venv/bin/activate && + pip install -r requirements.txt && + sudo systemctl restart adobe-migrator && + sudo systemctl status adobe-migrator --no-pager && + curl -s http://127.0.0.1:8000/health +' +``` + +--- + +## Safety reminders + +- Know which branch you are deploying +- Run tests first +- Commit before deploy +- Don’t overwrite `.env`, `.env-adobe`, or `private.key` casually +- If the site breaks, check `journalctl -u adobe-migrator`