Commit Graph
8 Commits
Author SHA1 Message Date
westfarn 61382c254d Add stop.sh (compose down) and disable print_forge.
Sync runner checkout / sync (pull_request) Successful in 6s
Closes #33. Deploy skips host_apps.enabled: false so CI cannot resurrect a stopped app.
2026-09-16 05:05:41 -05:00
westfarn 209b27142c Register GIS LiveKit as docker compose on webservers.
Sync runner checkout / sync (pull_request) Successful in 7s
Same deploy path as abc_worker: host_apps on adama/starbuck/etc., NPM for wss://. UDP/7881 still forwarded to one upstream host.
2026-09-15 14:39:10 -05:00
westfarn 1988def1a6 Register dta_blog for node-static deploy (closes #29) (#30)
Sync runner checkout / sync (push) Successful in 7s
## Summary
- Closes [#29](#29).
- Register `dta_blog` in `app_catalog` (`type: node-static`, repo `Ditch_The_Agent/dta_blog`, default branch `main`, webroot `/var/www/{env}.blog.realpath.app/html`). Reuses `roles/app-deploy/tasks/node_static.yml` (`npm ci` then `npm run build:<env>`); the blog's `package.json` copies `dist/` to that webroot after `python3 build.py --env <env>`.
- Add prod **8086** / beta **8087** `host_apps` on adama, roslin, starbuck, apollo, and ai-server-4080 (those ports were free vs 8080–8085 / 8088).
- Optional nginx `error_page 404 /404.html` for this app only (`error_page_404` catalog field); other static apps keep the SPA `try_files` fallback.
- Document NPM/DNS (`blog.realpath.app` → `:8086`, `beta.blog.realpath.app` → `:8087`), no `realpath.app/blog` mount, and UFW staying LAN/NPM-only.

## Test plan
- [ ] Confirm 8086/8087 unused on app hosts before first deploy.
- [ ] `./scripts/deploy.sh --app dta_blog --env beta --ref main` publishes `/var/www/beta.blog.realpath.app/html`.
- [ ] `./scripts/deploy.sh --app dta_blog --env prod --ref main` publishes `/var/www/prod.blog.realpath.app/html`.
- [ ] **Until [dta_blog#1](Ditch_The_Agent/dta_blog#1) is on `main`**, use `--ref issue-1-static-blog` so the SSG (not the stub README) is built.
- [ ] NPM + DNS + TLS: `blog.realpath.app` → `:8086`, `beta.blog.realpath.app` → `:8087`. Do not reverse-proxy onto `realpath.app/blog`.
- [ ] Prod HTML has article text, Tianji id `cmtvvmf562afjzqumwt1yh2y8`, links to `https://realpath.app/`.
- [ ] Beta HTML has Tianji id `cmtvvn6z62agdzqumtk8xijpy`, links to `https://beta.realpath.app/`, demo posts present.
- [ ] `https://blog.realpath.app/sitemap.xml`, `robots.txt`, `llms.txt` return 200.
- [ ] Unknown slug returns 404.html (not the index SPA fallback).

Reviewed-on: #30
2026-09-10 18:34:25 -07:00
westfarn 2abcdd7c58 Register print_forge for django deploy (closes #27) (#28)
Sync runner checkout / sync (push) Successful in 6s
## Summary
- Closes [#27](#27).
- Register `print_forge` in `app_catalog` (`type: django`, repo `ai_ml_operations/print_forge`, default branch `master`).
- Add `host_apps` prod `:8007` / beta `:8019` on **adama**, **roslin**, **starbuck**, **apollo**, and **ai-server-4080**.
- dj-queue **worker singleton on adama** only (`compose_profiles: [worker]`); other hosts web-only.
- Document ports, NPM hosts, Postgres DBs, secrets, Nominatim (`10.0.0.128:8089`), and the app-repo companion ([print_forge#1](ai_ml_operations/print_forge#1)).
- Update `scripts/deploy.sh` `--app` help.
- Move unused `abc_be` prod port reserve **8007 → 8009** so it does not collide with `print_forge`.

## Test plan
- [ ] Confirm `print_forge` appears in `app_catalog` and `--app print_forge` is listed in `deploy.sh --help`
- [ ] Confirm beta `host_apps` on all five hosts (port **8019**); adama has `compose_profiles: [worker]`
- [ ] Confirm prod port **8007** reserved on those hosts (no NPM until launch)
- [ ] After merge (ops, not this PR): create Postgres DBs `print_forge_beta` + `print_forge` on `10.0.0.230`, grant `westfarn`
- [ ] After merge (ops): write `~/Documents/secrets/print_forge/print_forge_{beta,prod}.env` from app `.env.prod.example`; add `print_forge:<token>` to `SHORTENER_API_TOKENS` (beta first)
- [ ] After merge (ops): NPM `print-forge-preview.aimloperations.com` → `:8019` active/active; do **not** NPM-route `printforgeprints.com` until launch
- [ ] After secrets + DBs: `~/Documents/repos/server-infra/scripts/deploy.sh --app print_forge --env beta --ref master` and hit `/healthz/`

Reviewed-on: #28
2026-09-06 06:35:48 -07:00
westfarnandCursor aac815314d Register abc_fe / abc_be / abc_worker for beta-only deploy.
Sync runner checkout / sync (push) Successful in 6s
Closes #26. GIS Benefits Coach gets beta host_apps (8017/8018/8085) and catalog entries; prod ports stay reserved.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 16:21:23 -05:00
westfarn 95fbae8db4 Register college_craft for django deploy (closes #24) (#25)
Sync runner checkout / sync (push) Successful in 6s
## Summary
- Closes [#24](#24).
- Register `college_craft` in `app_catalog` (`type: django`, repo `ai_ml_operations/college_craft`, default branch `master`).
- Add `host_apps` prod `:8006` / beta `:8016` on **adama**, **roslin**, **starbuck**, **apollo**, and **ai-server-4080**.
- dj-queue **worker singleton on adama** only (`compose_profiles: [worker]`); other hosts web-only.
- Document ports, NPM hosts, Postgres DBs, secrets, Nominatim (`10.0.0.128:8089`), and the app-repo `--app client_site` leftover.
- Add `college_craft` to `scripts/deploy.sh` `--app` help.

## Out of scope (ops, after merge)
- Create Postgres DBs `college_craft` / `college_craft_beta` on `10.0.0.230` and grant `westfarn`.
- Write control-node secrets `~/Documents/secrets/college_craft/college_craft_{prod,beta}.env`.
- NPM: `collegecraft.com` (+ www) → `:8006`; `college-craft-preview.aimloperations.com` → `:8016`.
- Smoke deploy after secrets + DBs exist:
  ```bash
  ~/Documents/repos/server-infra/scripts/deploy.sh --app college_craft --env beta --ref master
  ~/Documents/repos/server-infra/scripts/deploy.sh --app college_craft --env prod --ref master
  ```

## Test plan
- [ ] Confirm `app_catalog.college_craft` matches other django apps (`compose_file`, `migrate_cmd`).
- [ ] Confirm ports 8006/8016 unused elsewhere and match across all five hosts.
- [ ] Confirm only adama has `compose_profiles: [worker]` for college_craft.
- [ ] After secrets + DBs: deploy beta then prod; `/healthz/` up on both; prod holding page, beta full site.

Reviewed-on: #25
2026-09-02 07:39:03 -07:00
westfarn 9208e63491 Register url_shortening_service for django deploy (closes #22) (#23)
Sync runner checkout / sync (push) Successful in 6s
## Summary
- Closes [#22](#22).
- Register `url_shortening_service` in `app_catalog` (`type: django`, repo `ai_ml_operations/url_shortening_service`, default branch `master`) and `host_apps` on **adama**, **roslin**, **starbuck**, **apollo**, and **ai-server-4080** (prod **8005**, beta **8015**).
- Document NPM (short host vs API host, same container), Postgres DBs (`url_shortener` / `url_shortener_beta`), and extra env keys. No compose worker profile.
- List `url_shortening_service` in `scripts/deploy.sh` `--app` help.

## Out of scope (manual ops)
- Create Postgres DBs `url_shortener` / `url_shortener_beta` + grant `westfarn` on `10.0.0.230`
- Control-node secrets under `~/Documents/secrets/url_shortening_service/`
- NPM proxy hosts (Ryan): short host `/` + `/[a-z0-9]{4,8}` (404 `/api/`, `/admin/`, `/debug/`); API host `/api/` only (404 `/admin/`)
- Deploy smoke — [url_shortening_service](https://git.aimloperations.com/ai_ml_operations/url_shortening_service) `master` is still a stub (`README.md` only)

## Test plan
- [x] Inventory YAML: `url_shortening_service` in `app_catalog`; every host `host_apps` has prod **8005** / beta **8015**
- [ ] After app compose + secrets + DBs exist: `./scripts/deploy.sh --app url_shortening_service --env beta --ref master`
- [ ] Same for prod
- [ ] `GET /healthz/` → `{"status":"ok"}` on both ports
- [ ] Short host `GET /` landing page; `POST /api/links/` without Bearer → 401; public `/admin/` → 404

Reviewed-on: #23
2026-08-30 04:51:31 -07:00
westfarn ec294a1d45 Add starbuck and apollo as active/active app hosts (#21)
Sync runner checkout / sync (push) Successful in 6s
## Summary

- Closes [#20](#20).
- Register **starbuck** (`10.0.0.44`) and **apollo** (`10.0.0.7`) as Proxmox app hosts in `webservers`, with `host_apps` copied from **roslin** (same apps/ports; **no** `monica_site` worker — that stays a singleton on **adama**).
- Allow `starbuck` / `apollo` in `provision.sh` and `deploy.sh`; document inventory, NPM backends, and Alloy `host` labels.

## Test plan

- [ ] `ansible-inventory --list` shows both hosts under `webservers` at the expected IPs.
- [ ] Bootstrap SSH + passwordless sudo on each VM (keep a Proxmox console open for first UFW enable).
- [ ] `ansible starbuck,apollo -m ping`
- [ ] `./scripts/provision.sh starbuck --check` then `./scripts/provision.sh starbuck`
- [ ] `./scripts/provision.sh apollo --check` then `./scripts/provision.sh apollo`
- [ ] `./scripts/deploy.sh starbuck` and `./scripts/deploy.sh apollo` bring up the same app+env set as roslin.
- [ ] `monica_site` dj-queue worker still runs **only** on adama.
- [ ] Grafana/Loki show `host="starbuck"` and `host="apollo"`.
- [ ] NPM Advanced upstreams (manual): add `starbuck:PORT` and `apollo:PORT` beside adama/roslin.Reviewed-on: #21
2026-08-16 07:20:38 -07:00