Skip to content

Commit 139cd39

Browse files
committed
Address CK-DOCS-ASKS-HYBRID findings and Tim's diagram feedback
Diagrams: - overview-fig-2: add LB/proxy, HTTPS/HTTP labels, fix token flow direction, split data layer into labeled nodes, fix label positioning - complete-guide-fig-1: reduce to single replica (+N), add HTTPS labels, add read/write labels to data layer connections - complete-guide-fig-2: remove bare-metal option, rename to "Container orchestrator" - database-setup-fig-1: remove bare-metal, clarify native DB path Critical fixes (from CK-DOCS-ASKS-HYBRID): - G6: Fix WEBSEARCH_HEADERS from broken JSON to colon-CSV format - G1: Add ai:conversations:webSearch to JWT permissions table High-severity: - D2: Add Postgres TLS known-issue warning (managed PG + missing SSL) - B4: Add Bedrock API-key billing trap note - E1: Document I/O-bound workload shape for HPA guidance - E2: Add HA primitives section (PDB, anti-affinity, topology spread) - E3: Add Azure (AKS) and GCP (GKE) cluster bring-up pointers Medium/Low: - D3: MySQL role-inherited grants note for Cloud SQL - E7: License key shared across replicas statement - G7: host.docker.internal loopback-bind warning - Network requirements: license.container.tiny.cloud firewall whitelist - MCP page: web search prominence TIP
1 parent 1214abf commit 139cd39

14 files changed

Lines changed: 99 additions & 29 deletions

modules/ROOT/images/tinymceai-on-premises/complete-guide-fig-1.mmd

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
flowchart TB
22
Browser["Browser<br>TinyMCE editor + tinymceai plugin"]
33
TokenEP["Your token endpoint<br>signs HS256 JWTs"]
4-
Browser -->|"fetch JWT"| TokenEP
4+
Browser -->|"HTTPS"| TokenEP
55
Browser -->|"HTTPS + Bearer JWT"| LB
66

7-
subgraph App["Application layer (stateless, N replicas)"]
7+
subgraph App["Application layer (stateless, +N replicas)"]
88
LB["Reverse proxy / Load balancer<br>nginx · ALB · K8s Ingress<br>TLS termination · SSE pass-through"]
9-
AIN["ai-service replica N"]
10-
AI2["ai-service replica 2"]
11-
AI1["ai-service replica 1"]
12-
LB --> AIN
13-
LB --> AI2
14-
LB --> AI1
9+
AI1["ai-service"]
10+
LB -->|"HTTP"| AI1
1511
end
1612

1713
subgraph Data["Shared data layer"]
@@ -20,7 +16,9 @@ flowchart TB
2016
Storage[("File storage<br>S3 · Azure Blob · filesystem")]
2117
end
2218

23-
AI1 --> Data
19+
AI1 <-->|"read/write"| DB
20+
AI1 <-->|"read/write"| Cache
21+
AI1 <-->|"read/write"| Storage
2422

2523
AI1 -->|"HTTPS"| LLM["LLM provider<br>OpenAI · Anthropic · Google ·<br>Azure · Bedrock · Vertex ·<br>self-hosted"]
2624

modules/ROOT/images/tinymceai-on-premises/complete-guide-fig-1.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/images/tinymceai-on-premises/complete-guide-fig-2.mmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
flowchart TD
22
Start([New deployment]) --> Q1{Evaluating or<br>going to production?}
33
Q1 -->|Evaluating locally| Compose[Docker Compose<br>all services on one host<br>Getting started guide]
4-
Q1 -->|Production| Q2{Orchestrator?}
4+
Q1 -->|Production| Q2{Container orchestrator?}
55
Q2 -->|Kubernetes| K8s[Kubernetes deployment<br>Production guide]
66
Q2 -->|AWS ECS / Fargate| ECS[ECS task definition<br>Production guide]
77
Q2 -->|Docker / Podman on VMs| VMs[Docker or Podman compose<br>Database guide]
8-
Q2 -->|Bare metal / no containers| Bare[Native install for<br>data layer; container<br>for AI service<br>Database guide]
98
Compose --> DB{Database?}
109
K8s --> DB
1110
ECS --> DB
1211
VMs --> DB
13-
Bare --> DB
1412
DB -->|Managed cloud DB| Managed[RDS · Cloud SQL ·<br>Azure Database]
1513
DB -->|Self-managed| Self[Containers or native install]
1614
Managed --> Done([Continue with<br>LLM providers guide])

modules/ROOT/images/tinymceai-on-premises/complete-guide-fig-2.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/images/tinymceai-on-premises/database-setup-fig-1.mmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ flowchart TD
55
Q2 -->|Cloud / managed services| Managed[AWS RDS · Cloud SQL ·<br>Azure Database<br>+ ElastiCache · Memorystore ·<br>Azure Cache for Redis]
66
Q2 -->|Self-managed| Q3{Container runtime<br>available?}
77
Q3 -->|Docker or Podman| Containers[Containers on the same<br>network or pod as ai-service]
8-
Q3 -->|None - bare metal or VM| Native[Native install<br>brew · apt · yum · dnf<br>service runs on host]
8+
Q3 -->|Native on host| Native[Native install<br>brew · apt · yum · dnf<br>AI service connects via<br>host.docker.internal]
99
Compose --> Verify([Verify: nc -zv host port<br>then start ai-service])
1010
Managed --> Verify
1111
Containers --> Verify

modules/ROOT/images/tinymceai-on-premises/database-setup-fig-1.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/images/tinymceai-on-premises/overview-fig-2.mmd

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,25 @@ flowchart LR
66
end
77

88
subgraph Service["Application layer"]
9+
LB["Load balancer /\nreverse proxy\n(TLS termination)"]
910
AI["AI service\n(container)"]
1011
end
1112

1213
subgraph Data["Data layer"]
13-
DB[("Database\n+ Redis\n+ Storage")]
14+
DB[("SQL database\n(conversations, configs)")]
15+
Redis[("Redis\n(cache, coordination)")]
16+
Storage[("File storage\n(uploads, documents)")]
1417
end
1518

1619
LLM["LLM provider"]
1720

18-
Token -->|"1. signed JWT"| App
19-
App -->|"2. prompt + JWT"| AI
20-
AI -->|"5. SSE stream"| App
21-
AI -->|"3. forward"| LLM
21+
App -->|"1. request JWT"| Token
22+
Token -->|"JWT"| App
23+
App -->|"2. HTTPS"| LB
24+
LB -->|"HTTP"| AI
25+
AI -->|"3. HTTPS"| LLM
2226
LLM -->|"4. stream"| AI
23-
AI --- DB
27+
AI -->|"5. SSE response"| App
28+
AI <-->|"read/write"| DB
29+
AI <-->|"read/write"| Redis
30+
AI <-->|"read/write"| Storage

modules/ROOT/images/tinymceai-on-premises/overview-fig-2.svg

Lines changed: 1 addition & 1 deletion
Loading

modules/ROOT/pages/tinymceai-on-premises-database.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ GRANT ALL PRIVILEGES ON ai_service.* TO 'ai_service'@'%';
127127
[NOTE]
128128
--
129129
Some versions of the AI service image report false-positive "Not enough permissions to access database" errors even with `ALL PRIVILEGES`. If this occurs, grant the privileges globally rather than per-database, or use the MySQL `root` user for development.
130+
131+
On Cloud SQL MySQL, grant privileges to the service user **directly** — not via a role (e.g. `cloudsqlsuperuser`). The startup grant check runs `SHOW GRANTS FOR user` and does not resolve role-inherited grants.
130132
--
131133

132134
=== PostgreSQL
@@ -157,7 +159,10 @@ GRANT ALL ON SCHEMA "cs-on-premises" TO ai_service;
157159
----
158160
====
159161

160-
162+
[WARNING]
163+
--
164+
*Managed PostgreSQL TLS issue:* Amazon RDS, Cloud SQL, and Azure Database for PostgreSQL default to requiring TLS (`rds.force_ssl=1` / `require_secure_transport=ON`). When TLS is enforced and the AI service has not been configured with `DATABASE_SSL_CA`, the connection is rejected — but the error message surfaces as a generic "permissions" error, not a TLS error. If the service fails to start with a permissions-related database error after grants have been verified, check whether TLS is the underlying cause.
165+
--
161166

162167
== Database setup
163168

modules/ROOT/pages/tinymceai-on-premises-jwt.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ This is the canonical permission list for the AI service.
9595
[cols=",",options="header",]
9696
|===
9797
|Permission |Grants
98-
|`ai:conversations:*` |All conversation operations: create, list, send message, delete
98+
|`ai:conversations:*` |All conversation operations: create, list, send message, delete, and web search
9999
|`ai:conversations:create` |Create new conversations
100100
|`ai:conversations:read` |List and read existing conversations
101101
|`ai:conversations:delete` |Delete conversations
102+
|`ai:conversations:webSearch` |Enable the web search toggle in conversations. Without this permission, `GET /v1/models/1` reports `capabilities.webSearch.allowed: false` even when `WEBSEARCH_ENABLED=true` and `capabilities.webSearch: true` is set on the model.
102103
|`ai:models:agent` |Access the built-in agent model (model ID `agent-1`)
103104
|`ai:models:<provider>:<model-id>` |Access a specific custom model configured through the `MODELS` env var
104105
|`ai:actions:system:*` |All built-in quick actions (rewrite, summarize, expand, translate, change tone, and related operations)

0 commit comments

Comments
 (0)