replace docker deployment with native system
This commit is contained in:
+2
-3
@@ -16,12 +16,11 @@ An email belongs to one hotel account. Existing active accounts cannot be reassi
|
||||
|
||||
## Owner recovery on the Linux server
|
||||
|
||||
The server administrator must verify the owner's identity before issuing a recovery link. On the server, in the directory containing the deployed Compose file and its private environment file:
|
||||
The server administrator must verify the owner's identity before issuing a recovery link. On the server:
|
||||
|
||||
```sh
|
||||
read -r -p 'Verified owner email: ' RECOVERY_EMAIL
|
||||
export RECOVERY_EMAIL
|
||||
docker compose run --rm --no-deps -e RECOVERY_EMAIL api --recover-owner
|
||||
sudo -u cms sh -c 'set -a; . /etc/guestops/guestops.env; set +a; RECOVERY_EMAIL="$1" /srv/guestops/api/GuestOps.Api --recover-owner' sh "$RECOVERY_EMAIL"
|
||||
unset RECOVERY_EMAIL
|
||||
```
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ The first version requires a top-level plain-text MIME message. HTML and multipa
|
||||
|
||||
## Enable live mode after acceptance
|
||||
|
||||
Keep `AUTO_REPLY_ENABLE_LIVE=false` in the deployment `.env` until the Google send/reconciliation workflow and FAQ test-mode results have been accepted. Then set it true and restart both API and worker. Gmail sending must be configured, the hotel must enable staff sending, and the mailbox must have send consent. Finally, the owner explicitly confirms test-mode acceptance and selects **Enable live replies**.
|
||||
Keep `AutoReply__EnableLive=false` in `/etc/guestops/guestops.env` until the Google send/reconciliation workflow and FAQ test-mode results have been accepted. Then set it true and restart `guestops-api.service` and `guestops-worker.service`. Gmail sending must be configured, the hotel must enable staff sending, and the mailbox must have send consent. Finally, the owner explicitly confirms test-mode acceptance and selects **Enable live replies**.
|
||||
|
||||
Before test-mode acceptance, use **Batch safety evaluation** with representative synthetic cases. Each JSON case has a unique `id`, `subject`, `body`, `expectedMatch`, and optionally `expectedKnowledgeId`. The no-send evaluator accepts 1–100 cases, reads the hotel's current reviewed rules and knowledge, and reports false positives, false negatives and per-case reasons without saving a conversation or consuming a quota.
|
||||
|
||||
|
||||
+14
-14
@@ -14,14 +14,15 @@ dotnet run --project tests/GuestOps.Tests
|
||||
python3 -m unittest discover -s tests -p "test_*.py"
|
||||
cd web && npm ci && npm run build && cd ..
|
||||
|
||||
python3 deploy/package_source.py \
|
||||
python3 deploy/package_release.py \
|
||||
--ref FULL_COMMIT_OR_TAG \
|
||||
--output-directory ../ansible/playbooks/files/guestops
|
||||
```
|
||||
|
||||
For version `0.2.1`, this creates `guestops_0.2.1.tar.gz`. Published version
|
||||
files are immutable; change the application version before making another
|
||||
archive.
|
||||
For version `0.2.2`, this creates `guestops_0.2.2.tar.gz`. The archive contains
|
||||
self-contained Linux x64 API and worker applications, including the built
|
||||
frontend. Published version files are immutable; change the application version
|
||||
before making another archive.
|
||||
|
||||
## Configure Ansible
|
||||
|
||||
@@ -29,12 +30,12 @@ The server group needs only the application switch, version and subdomain:
|
||||
|
||||
```yaml
|
||||
hasguestops: true
|
||||
guestopsversion: "0.2.1"
|
||||
guestopsversion: "0.2.2"
|
||||
guestopssubdomain: "guestops-sandbox"
|
||||
```
|
||||
|
||||
Production uses `guestopssubdomain: "guestops"`. The playbook uses the existing
|
||||
MongoDB service through the GuestOps Docker bridge gateway. Google sending,
|
||||
Production uses `guestopssubdomain: "guestops"`. The native services use the
|
||||
existing MongoDB service on `127.0.0.1:27017`. Google sending,
|
||||
automatic live replies, AI, PMS connections, and payment connections remain
|
||||
disabled until they are configured separately.
|
||||
|
||||
@@ -54,12 +55,11 @@ ansible-playbook playbooks/guestops.yml -K \
|
||||
--extra-vars "thehost=dbserver"
|
||||
```
|
||||
|
||||
The playbook stops the existing Compose project without deleting volumes,
|
||||
replaces `/srv/guestops`, renders its environment configuration, builds and starts the
|
||||
API and worker, configures Nginx, and verifies local and public readiness. Port
|
||||
8080 remains loopback-only and the `guestops_app-keys` volume survives
|
||||
redeployment.
|
||||
The playbook stops the existing systemd services, replaces `/srv/guestops`,
|
||||
renders its environment configuration, starts the self-contained API and worker,
|
||||
configures Nginx, and verifies local and public readiness. Port 8080 remains
|
||||
loopback-only and `/var/lib/guestops/keys` survives redeployment.
|
||||
|
||||
To roll back, select an older retained `guestopsversion` in group vars and run
|
||||
the same playbook. MongoDB backup, Filebeat, certificates, and host monitoring
|
||||
To roll back, select an older retained native `guestopsversion` (version 0.2.2 or
|
||||
later) in group vars and run the same playbook. MongoDB backup, Filebeat, certificates, and host monitoring
|
||||
are provided by the existing central infrastructure.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Gate B automation, identity and privacy acceptance
|
||||
|
||||
Run these reviews against the exact `0.2.1` candidate on the accepted HTTPS sandbox. Keep guest data, staff addresses, provider agreements, screenshots and raw reports in the restricted evidence store. Repository records contain opaque references only.
|
||||
Run these reviews against the exact `0.2.2` candidate on the accepted HTTPS sandbox. Keep guest data, staff addresses, provider agreements, screenshots and raw reports in the restricted evidence store. Repository records contain opaque references only.
|
||||
|
||||
## Knowledge, AI and FAQ automation
|
||||
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ Implemented owner-only disconnect/reconnect and import restart controls, synchro
|
||||
|
||||
## Milestone 8: operational readiness
|
||||
|
||||
The application provides owner-only workspace health, database readiness and worker heartbeat information. Docker, Filebeat, MongoDB backup, host monitoring and disaster recovery are owned by the existing central infrastructure rather than duplicated inside GuestOps.
|
||||
The application provides owner-only workspace health, database readiness and worker heartbeat information. Filebeat, MongoDB backup, host monitoring and disaster recovery are owned by the existing central infrastructure rather than duplicated inside GuestOps. GuestOps runs as native systemd services.
|
||||
|
||||
## Remaining milestones
|
||||
|
||||
@@ -56,7 +56,7 @@ Windows DPAPI settings must not be copied to Linux as usable credentials. Re-ent
|
||||
|
||||
## Capacity and operations
|
||||
|
||||
Target supplied by the owner: Debian 12, 4 CPU cores, 7.6 GiB RAM, 18 GiB free disk; MongoDB on the same machine. Compose includes conservative starting memory limits and capped logs, not a capacity guarantee. Keep database/key backups off-server and do not import entire mailboxes by default. Establish retention and restore testing before real guest data is used.
|
||||
Target supplied by the owner: Debian 12, 4 CPU cores, 7.6 GiB RAM, 18 GiB free disk; MongoDB on the same machine. The native API and worker write to the systemd journal; their resource use must be confirmed during sandbox acceptance. Keep database/key backups off-server and do not import entire mailboxes by default. Establish retention and restore testing before real guest data is used.
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Copy `deploy/payments.example.json` to a private `payments.local.json` outside t
|
||||
|
||||
Use the internal 32-character hotel ID shown on the Payments page. `MerchantAccount` is an administrator-maintained identity binding: verify it against the merchant account behind the key. Do not reuse the same identity for a different merchant. The API accepts only `https://sandbox.nmi.com` and `https://secure.nmi.com`; confirm the correct environment and key with NMI.
|
||||
|
||||
Set `PAYMENTS_CONFIG_FILE_HOST` in the deployment `.env` to the absolute private file path. Compose mounts it read-only in the API only. Restrict file permissions to the administrator and the container user/group that needs read access. Determine the image's user with `docker run --rm --entrypoint id YOUR_API_IMAGE -u` before assigning permissions. Restart the API after changes. The default empty example disables the integration. Do not commit private configuration or put keys in the browser.
|
||||
Store the private file as `/etc/guestops/payments.json`, owned by `root:cms` with mode `0640`, and set `Payments__ConfigFile=/etc/guestops/payments.json` in `/etc/guestops/guestops.env`. Only the native API service reads it. Restart `guestops-api.service` after changes. Leaving the setting unset disables the integration. Do not commit private configuration or put keys in the browser or release archive.
|
||||
|
||||
After sandbox acceptance, enable `CreatesEnabled` on the server and **Allow owner-approved payment invoices** in the hotel's Payments page. Both controls are required. Turning off creation leaves read-only reconciliation available. Key rotation preserves reconciliation for the same merchant binding; pending approvals require the original credential revision and must be replaced after rotation. Changing the merchant identity blocks reconciliation until the original binding is restored.
|
||||
|
||||
|
||||
+2
-2
@@ -29,9 +29,9 @@ Copy `deploy/pms.example.json` to a private `pms.local.json` outside your checko
|
||||
|
||||
Use the client-credentials grant and property permissions supplied for your OHIP environment. Confirm the note type and notification-location codes with the property. The gateway must be an HTTPS origin, without a path. There is no shared fallback configuration between hotels.
|
||||
|
||||
Set `PMS_CONFIG_FILE_HOST` in the deployment `.env` to the absolute private file path. Compose mounts it read-only into the API; the worker does not receive these credentials. Restrict host permissions to the administrator and the API container's user/group, while allowing that user to read the file. Obtain the image's user ID with `docker run --rm --entrypoint id YOUR_API_IMAGE -u` before assigning permissions. Never put credentials in the browser, repository or an image. Restart the API after configuration changes; this file is not hot-reloaded.
|
||||
Store the private file as `/etc/guestops/pms.json`, owned by `root:cms` with mode `0640`, and set `Pms__ConfigFile=/etc/guestops/pms.json` in `/etc/guestops/guestops.env`. Only the native API service needs these credentials. Never put them in the browser, repository or release archive. Restart `guestops-api.service` after configuration changes; this file is not hot-reloaded.
|
||||
|
||||
The default deployment mounts an empty example and makes no OHIP calls. Begin with sandbox credentials and `WritesEnabled: false`. Lookups can be tested without enabling writes. After sandbox acceptance, server write enablement and the hotel's owner-controlled MongoDB setting must both be enabled. Every operation still needs individual owner approval.
|
||||
The default deployment does not set a PMS configuration file and makes no OHIP calls. Begin with sandbox credentials and `WritesEnabled: false`. Lookups can be tested without enabling writes. After sandbox acceptance, server write enablement and the hotel's owner-controlled MongoDB setting must both be enabled. Every operation still needs individual owner approval.
|
||||
|
||||
## Review and recovery
|
||||
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ This milestone adds AI suggestions and a persistent send queue. It does not enab
|
||||
## Enable on the sandbox
|
||||
|
||||
1. Deploy the reviewed images using the deployment guide. Existing hotel records default to AI off and sending off.
|
||||
2. Set `AI_API_KEY` and `AI_MODEL` in the server's private `.env`. Choose a model available to your OpenAI project that supports the Responses API and strict JSON-schema output. No model is silently selected and no key is stored in frontend code or MongoDB. Only the API container receives the AI key.
|
||||
3. Recreate API/worker containers. In hotel Settings, the owner can enable AI drafts. The opt-in explains that staff-requested generation sends the message subject/body and selected approved hotel answers to OpenAI. Requests use `store: false`; this does not replace reviewing the provider's data-processing and retention arrangements.
|
||||
2. Set `Ai__ApiKey` and `Ai__Model` in the server's private `/etc/guestops/guestops.env`. Choose a model available to your OpenAI project that supports the Responses API and strict JSON-schema output. No model is silently selected and no key is stored in frontend code or MongoDB. Only the API uses the AI key.
|
||||
3. Restart `guestops-api.service`. In hotel Settings, the owner can enable AI drafts. The opt-in explains that staff-requested generation sends the message subject/body and selected approved hotel answers to OpenAI. Requests use `store: false`; this does not replace reviewing the provider's data-processing and retention arrangements.
|
||||
4. For sending, set `GOOGLE_ENABLE_SENDING=true`, recreate API/worker, and reconnect Google. The OAuth request then includes `gmail.readonly` and `gmail.send`. An existing read-only refresh token is not assumed to have send permission; the returned grant must explicitly include `gmail.send`.
|
||||
5. Enable staff-approved sending in that hotel's Settings. Use a dedicated test mailbox and synthetic guest messages for live acceptance tests before enabling a real hotel mailbox.
|
||||
|
||||
@@ -34,6 +34,6 @@ Current limitations: messages imported before reply headers were stored must be
|
||||
|
||||
## Verification
|
||||
|
||||
The test suite covers competing workers, send identity/thread headers, invalid recipients, header injection, uncertain outcomes, restart recovery, pre-send token failure, disabling hotel sending, cross-hotel access, Gmail reconciliation mismatches, AI source isolation, invalid citations, escalations and incomplete responses. Run the production-container login and restart-persistence smoke checks before packaging and during Ansible deployment verification. Live acceptance must additionally verify Google consent, actual threading, grant revocation, a representative AI draft evaluation set and provider error behaviour with the configured accounts.
|
||||
The test suite covers competing workers, send identity/thread headers, invalid recipients, header injection, uncertain outcomes, restart recovery, pre-send token failure, disabling hotel sending, cross-hotel access, Gmail reconciliation mismatches, AI source isolation, invalid citations, escalations and incomplete responses. Run the native-service login and restart-persistence smoke checks before packaging and during Ansible deployment verification. Live acceptance must additionally verify Google consent, actual threading, grant revocation, a representative AI draft evaluation set and provider error behaviour with the configured accounts.
|
||||
|
||||
Implementation references: [OpenAI Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs), [Gmail sending](https://developers.google.com/workspace/gmail/api/guides/sending), [Gmail threads](https://developers.google.com/workspace/gmail/api/guides/threads).
|
||||
|
||||
Reference in New Issue
Block a user