docs: add Oracle VM deploy cheat sheet
This commit is contained in:
parent
7258984386
commit
dd7a041820
|
|
@ -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 <branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
If deploying `master`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git push origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. SSH to Oracle VM
|
||||||
|
|
||||||
|
Using IP:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh ubuntu@<VM_PUBLIC_IP>
|
||||||
|
```
|
||||||
|
|
||||||
|
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 <branch-name>
|
||||||
|
git pull origin <branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 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`
|
||||||
Loading…
Reference in New Issue