Register disney_hotel_service beta and prod #47

Closed
opened 2026-10-28 01:49:44 -07:00 by westfarn · 0 comments
Owner

Summary

Register Disney Hotel (disney_hotel_service, repo DisneyHotel/disney_hotel_service, default branch master) for beta and prod. Same active/active Django pattern as college_craft. Local checkout folder is disney_reservation_finder.

No bundled Postgres. Shared DB on 10.0.0.230. Alert worker (db_worker + enqueue_due_alerts) is a compose profile worker singleton on adama only. Other hosts run web only.

Ports 8021 / 8022 are WordPress relawfirm. Next free host ports are 8023 (prod) and 8024 (beta).

NPM is manual (out of Ansible):

  • prod: disneyhotel.app and www.disneyhotel.app → :8023 on adama, roslin, starbuck, apollo, ai-server-4080
  • beta: beta.disneyhotel.app → :8024 on the same hosts

Checklist

1. app_catalog

disney_hotel_service:
  type: django
  repo: "{{ git_base_url }}/DisneyHotel/disney_hotel_service.git"
  default_branch: master
  compose_file: docker-compose.prod.yml
  web_service: web
  migrate_cmd: "uv run python manage.py migrate --noinput"

2. host_apps on all five webservers

adama (worker singleton):

- { name: disney_hotel_service, env: prod, port: 8023, compose_profiles: [worker] }
- { name: disney_hotel_service, env: beta, port: 8024, compose_profiles: [worker] }

roslin, starbuck, apollo, ai-server-4080: same ports, omit compose_profiles.

3. Postgres on 10.0.0.230

Create and grant westfarn:

  • prod database disney_hotel_service
  • beta database disney_hotel_service_beta

Do not share a database between beta and prod.

4. Secrets (control node that runs Ansible)

Create these on the control node (ai-server-4080). Ansible copies them to /opt/apps/env/disney_hotel_service_<env>.env on each app host. Do not hand-edit the copies.

~/Documents/secrets/disney_hotel_service/disney_hotel_service_prod.env
~/Documents/secrets/disney_hotel_service/disney_hotel_service_beta.env

Mode 600. Unix dotenv: KEY=value, one per line, no export. This app does not read DATABASE_URL. It reads POSTGRES_*.

5. Docs + deploy.sh help

Update IMPLEMENTATION.md and scripts/deploy.sh --app list. Note in docs/WORDPRESS.md that 8023/8024 are taken.

6. App repo (not this PR)

DisneyHotel/disney_hotel_service has no docker-compose.prod.yml yet. Deploy will fail until that file exists on master: no db service, ports: ["${WEB_PORT}:8000"], worker behind compose profile worker.

Acceptance

  • Catalog entry and host_apps on all five hosts (prod 8023, beta 8024; worker profile only on adama)
  • IMPLEMENTATION.md and deploy.sh --help list the app
  • After secrets, DBs, and app docker-compose.prod.yml: ./scripts/deploy.sh --app disney_hotel_service --env beta --ref master
## Summary Register **Disney Hotel** (`disney_hotel_service`, repo `DisneyHotel/disney_hotel_service`, default branch **`master`**) for beta and prod. Same active/active Django pattern as `college_craft`. Local checkout folder is `disney_reservation_finder`. No bundled Postgres. Shared DB on `10.0.0.230`. Alert worker (`db_worker` + `enqueue_due_alerts`) is a compose profile `worker` **singleton on adama** only. Other hosts run web only. Ports **8021** / **8022** are WordPress `relawfirm`. Next free host ports are **8023** (prod) and **8024** (beta). NPM is manual (out of Ansible): - **prod:** `disneyhotel.app` and `www.disneyhotel.app` → `:8023` on adama, roslin, starbuck, apollo, ai-server-4080 - **beta:** `beta.disneyhotel.app` → `:8024` on the same hosts ## Checklist ### 1. `app_catalog` ```yaml disney_hotel_service: type: django repo: "{{ git_base_url }}/DisneyHotel/disney_hotel_service.git" default_branch: master compose_file: docker-compose.prod.yml web_service: web migrate_cmd: "uv run python manage.py migrate --noinput" ``` ### 2. `host_apps` on all five webservers adama (worker singleton): ```yaml - { name: disney_hotel_service, env: prod, port: 8023, compose_profiles: [worker] } - { name: disney_hotel_service, env: beta, port: 8024, compose_profiles: [worker] } ``` roslin, starbuck, apollo, ai-server-4080: same ports, omit `compose_profiles`. ### 3. Postgres on `10.0.0.230` Create and grant `westfarn`: - prod database `disney_hotel_service` - beta database `disney_hotel_service_beta` Do not share a database between beta and prod. ### 4. Secrets (control node that runs Ansible) Create these on the control node (`ai-server-4080`). Ansible copies them to `/opt/apps/env/disney_hotel_service_<env>.env` on each app host. Do not hand-edit the copies. ```text ~/Documents/secrets/disney_hotel_service/disney_hotel_service_prod.env ~/Documents/secrets/disney_hotel_service/disney_hotel_service_beta.env ``` Mode `600`. Unix dotenv: `KEY=value`, one per line, no `export`. This app does **not** read `DATABASE_URL`. It reads `POSTGRES_*`. ### 5. Docs + `deploy.sh` help Update `IMPLEMENTATION.md` and `scripts/deploy.sh` `--app` list. Note in `docs/WORDPRESS.md` that 8023/8024 are taken. ### 6. App repo (not this PR) `DisneyHotel/disney_hotel_service` has no `docker-compose.prod.yml` yet. Deploy will fail until that file exists on `master`: no `db` service, `ports: ["${WEB_PORT}:8000"]`, `worker` behind compose profile `worker`. ## Acceptance - [ ] Catalog entry and host_apps on all five hosts (prod **8023**, beta **8024**; worker profile only on adama) - [ ] `IMPLEMENTATION.md` and `deploy.sh --help` list the app - [ ] After secrets, DBs, and app `docker-compose.prod.yml`: `./scripts/deploy.sh --app disney_hotel_service --env beta --ref master`
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/server-infra#47