@jahia/agentic 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/antigravity/.agents/rules/jahia.md +51 -0
  3. package/dist/antigravity/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  4. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  5. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  6. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  7. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  8. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  9. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  10. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  11. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  12. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  13. package/dist/antigravity/.agents/skills/jahia-dev-accessibility/SKILL.md +11 -0
  14. package/dist/antigravity/.agents/skills/jahia-dev-build-component/SKILL.md +133 -0
  15. package/dist/antigravity/.agents/skills/jahia-dev-create-page-template/SKILL.md +341 -0
  16. package/dist/antigravity/.agents/skills/jahia-dev-create-template-set/SKILL.md +205 -0
  17. package/dist/antigravity/.agents/skills/jahia-dev-create-view/SKILL.md +896 -0
  18. package/dist/antigravity/.agents/skills/jahia-dev-debug/SKILL.md +176 -0
  19. package/dist/antigravity/.agents/skills/jahia-dev-import-from/SKILL.md +244 -0
  20. package/dist/antigravity/.agents/skills/jahia-dev-jexperience/SKILL.md +269 -0
  21. package/dist/antigravity/.agents/skills/jahia-dev-ops/SKILL.md +50 -0
  22. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/docker.md +151 -0
  23. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/monitoring.md +195 -0
  24. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/provisioning.md +269 -0
  25. package/dist/antigravity/.agents/skills/jahia-dev-properties/SKILL.md +147 -0
  26. package/dist/antigravity/.agents/skills/jahia-dev-properties/references/all-properties.md +231 -0
  27. package/dist/antigravity/.agents/skills/jahia-dev-query-content/SKILL.md +204 -0
  28. package/dist/antigravity/.agents/skills/jahia-dev-review/SKILL.md +228 -0
  29. package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/SKILL.md +79 -0
  30. package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
  31. package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
  32. package/dist/antigravity/.agents/skills/jahia-dev-screenshot/SKILL.md +177 -0
  33. package/dist/antigravity/.agents/skills/jahia-dev-site-review/SKILL.md +70 -0
  34. package/dist/antigravity/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +85 -0
  35. package/dist/antigravity/.agents/skills/jahia-dev-start-local/SKILL.md +121 -0
  36. package/dist/antigravity/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  37. package/dist/antigravity/AGENTS.md +62 -0
  38. package/dist/claude/.mcp.json +11 -0
  39. package/dist/cursor/.cursor/mcp.json +11 -0
  40. package/dist/gemini/.gemini/settings.json +10 -0
  41. package/dist/index.js +12 -0
  42. package/dist/kiro/.kiro/settings/mcp.json +10 -0
  43. package/dist/kiro/.kiro/skills/jahia-cnd-author/SKILL.md +94 -0
  44. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  45. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  46. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  47. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  48. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  49. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  50. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  51. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  52. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  53. package/dist/kiro/.kiro/skills/jahia-dev-accessibility/SKILL.md +11 -0
  54. package/dist/kiro/.kiro/skills/jahia-dev-build-component/SKILL.md +133 -0
  55. package/dist/kiro/.kiro/skills/jahia-dev-create-page-template/SKILL.md +341 -0
  56. package/dist/kiro/.kiro/skills/jahia-dev-create-template-set/SKILL.md +205 -0
  57. package/dist/kiro/.kiro/skills/jahia-dev-create-view/SKILL.md +896 -0
  58. package/dist/kiro/.kiro/skills/jahia-dev-debug/SKILL.md +176 -0
  59. package/dist/kiro/.kiro/skills/jahia-dev-import-from/SKILL.md +244 -0
  60. package/dist/kiro/.kiro/skills/jahia-dev-jexperience/SKILL.md +269 -0
  61. package/dist/kiro/.kiro/skills/jahia-dev-ops/SKILL.md +50 -0
  62. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/docker.md +151 -0
  63. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/monitoring.md +195 -0
  64. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/provisioning.md +269 -0
  65. package/dist/kiro/.kiro/skills/jahia-dev-properties/SKILL.md +147 -0
  66. package/dist/kiro/.kiro/skills/jahia-dev-properties/references/all-properties.md +231 -0
  67. package/dist/kiro/.kiro/skills/jahia-dev-query-content/SKILL.md +204 -0
  68. package/dist/kiro/.kiro/skills/jahia-dev-review/SKILL.md +228 -0
  69. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/SKILL.md +79 -0
  70. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
  71. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
  72. package/dist/kiro/.kiro/skills/jahia-dev-screenshot/SKILL.md +177 -0
  73. package/dist/kiro/.kiro/skills/jahia-dev-site-review/SKILL.md +70 -0
  74. package/dist/kiro/.kiro/skills/jahia-dev-site-review/scripts/review-pages.mjs +85 -0
  75. package/dist/kiro/.kiro/skills/jahia-dev-start-local/SKILL.md +121 -0
  76. package/dist/kiro/.kiro/skills/jahia-jcr-sql2/SKILL.md +258 -0
  77. package/dist/kiro/.kiro/steering/jahia.md +55 -0
  78. package/dist/kiro/AGENTS.md +62 -0
  79. package/dist/opencode/opencode.json +12 -0
  80. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: jahia-dev-ops
3
+ description: >
4
+ Operational guidance for running Jahia in production: Docker Compose and
5
+ Kubernetes deployments, environment configuration, health monitoring,
6
+ log analysis, and provisioning via the Jahia Provisioning API. Use when
7
+ the user is deploying, maintaining, debugging, or scaling a Jahia instance
8
+ (DX, jCustomer, Augmented Search / Elasticsearch, Kibana, Unomi).
9
+ allowed-tools: Read
10
+ ---
11
+
12
+ # Jahia DevOps Skill
13
+
14
+ This skill covers day-to-day operations of a Jahia platform environment.
15
+ Detailed reference sheets are in `references/`.
16
+
17
+ ## Reference files
18
+
19
+ | File | Content |
20
+ |------|---------|
21
+ | `references/docker.md` | Docker Compose stacks, environment variables, volume layout, networking, common run-commands |
22
+ | `references/monitoring.md` | Health endpoints, log locations, JVM/GC tuning, Karaf console, alert patterns |
23
+ | `references/provisioning.md` | Jahia Provisioning API (YAML scripts), module lifecycle, site import/export, JCR operations |
24
+
25
+ ## Quick orientation
26
+
27
+ ### Core components
28
+
29
+ - **Jahia DX** (`jahia/jahia-ee` or `jahia/jahia`) — the main CMS node
30
+ - **jCustomer / Apache Unomi** (`jahia/jcustomer`) — customer data platform
31
+ - **Augmented Search** (`jahia/elasticsearch` wrapper) — search back-end
32
+ - **Kibana** — Unomi analytics dashboard (optional)
33
+ - **MariaDB / MySQL** — relational database for JCR metadata and Jackrabbit bundles
34
+
35
+ ### Typical task flow
36
+
37
+ 1. **Deploy** — pick the right Docker Compose file or Helm chart (see `references/docker.md`)
38
+ 2. **Configure** — set env vars for DB, cluster, mail, LDAP (see `references/docker.md`)
39
+ 3. **Provision** — push modules, create sites, seed content (see `references/provisioning.md`)
40
+ 4. **Monitor** — watch `/healthcheck`, logs, Karaf console (see `references/monitoring.md`)
41
+ 5. **Troubleshoot** — collect thread dump, heap dump, or GC log; check OSGi bundle state
42
+
43
+ ### Support escalation checklist
44
+
45
+ When filing a Jahia Support ticket always attach:
46
+ - `docker-compose.yml` (redact passwords)
47
+ - `jahia.log` (last 500 lines minimum)
48
+ - Output of `/healthcheck?includeDetails=true`
49
+ - Output of `bundle:list` from Karaf console
50
+ - JVM version: `java -version` inside the container
@@ -0,0 +1,151 @@
1
+ # Jahia Docker Reference
2
+
3
+ ## Image tags
4
+
5
+ | Image | Stable tag pattern | Notes |
6
+ |-------|--------------------|-------|
7
+ | `jahia/jahia-ee` | `8.2.x.x` | Enterprise Edition (most deployments) |
8
+ | `jahia/jahia` | `8.2.x.x` | Community Edition |
9
+ | `jahia/jcustomer` | `2.6.x` | Apache Unomi-based CDP |
10
+ | `jahia/elasticsearch` | `7.17.x-jahia` | Patched ES image for Augmented Search |
11
+
12
+ Always pin to an exact version in production. Avoid `latest`.
13
+
14
+ ## Minimal single-node docker-compose.yml
15
+
16
+ ```yaml
17
+ version: "3.8"
18
+ services:
19
+ jahia:
20
+ image: jahia/jahia-ee:8.2.4.0
21
+ ports:
22
+ - "8080:8080"
23
+ - "7770:7770" # Karaf SSH
24
+ environment:
25
+ JAHIA_ROOT_PASSWORD: changeme
26
+ DB_HOST: mariadb
27
+ DB_NAME: jahia
28
+ DB_USER: jahia
29
+ DB_PASS: jahia
30
+ PROCESSING_SERVER: "true"
31
+ volumes:
32
+ - jahia-data:/var/jahia
33
+ - jahia-logs:/var/log/jahia
34
+ depends_on:
35
+ mariadb:
36
+ condition: service_healthy
37
+
38
+ mariadb:
39
+ image: mariadb:10.11
40
+ environment:
41
+ MYSQL_DATABASE: jahia
42
+ MYSQL_USER: jahia
43
+ MYSQL_PASSWORD: jahia
44
+ MYSQL_ROOT_PASSWORD: root
45
+ volumes:
46
+ - mariadb-data:/var/lib/mysql
47
+ healthcheck:
48
+ test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
49
+ interval: 10s
50
+ timeout: 5s
51
+ retries: 10
52
+
53
+ volumes:
54
+ jahia-data:
55
+ jahia-logs:
56
+ mariadb-data:
57
+ ```
58
+
59
+ ## Key environment variables
60
+
61
+ ### Jahia DX
62
+
63
+ | Variable | Default | Purpose |
64
+ |----------|---------|---------|
65
+ | `JAHIA_ROOT_PASSWORD` | *(required)* | `root` user password |
66
+ | `DB_HOST` | `mariadb` | Database hostname |
67
+ | `DB_PORT` | `3306` | Database port |
68
+ | `DB_NAME` | `jahia` | Database name |
69
+ | `DB_USER` | `jahia` | Database user |
70
+ | `DB_PASS` | *(required)* | Database password |
71
+ | `PROCESSING_SERVER` | `true` | Enable background processing (set false on non-primary cluster nodes) |
72
+ | `CLUSTER_ENABLED` | `false` | Enable Hazelcast clustering |
73
+ | `CLUSTER_NODES` | | Comma-separated `host:port` list of cluster peers |
74
+ | `MAX_RAM_PERCENTAGE` | `70` | Heap ceiling as % of container RAM |
75
+ | `EXTRA_JAVA_OPTS` | | Append arbitrary JVM flags |
76
+ | `JAHIA_DEPLOY_ON_STARTUP` | | Comma-separated module JAR paths to deploy at first boot |
77
+ | `OPERATING_MODE` | `development` | `development` or `production` |
78
+ | `MAIL_SERVER` | | SMTP URI e.g. `smtp://mail.example.com:25` |
79
+ | `MAIL_FROM` | | Sender address for system mail |
80
+ | `MAIL_ADMIN` | | Admin notification address |
81
+
82
+ ### jCustomer / Unomi
83
+
84
+ | Variable | Default | Purpose |
85
+ |----------|---------|---------|
86
+ | `UNOMI_ROOT_PASSWORD` | *(required)* | Admin password |
87
+ | `UNOMI_ELASTICSEARCH_ADDRESSES` | `elasticsearch:9200` | ES cluster addresses |
88
+ | `UNOMI_CLUSTER_KUBERNETES` | `false` | Enable K8s cluster discovery |
89
+ | `UNOMI_THIRDPARTY_PROVIDER1_IPADDRESSES` | | Trusted IP ranges (for Jahia → Unomi calls) |
90
+ | `EXTRA_JAVA_OPTS` | | Append JVM flags |
91
+
92
+ ### Elasticsearch (jahia image)
93
+
94
+ | Variable | Default | Purpose |
95
+ |----------|---------|---------|
96
+ | `discovery.type` | `single-node` | Use `zen` for multi-node |
97
+ | `ES_JAVA_OPTS` | `-Xms512m -Xmx512m` | Heap; set both to the same value |
98
+ | `xpack.security.enabled` | `false` | Enable TLS/auth |
99
+
100
+ ## Volume layout inside the Jahia container
101
+
102
+ ```
103
+ /var/jahia/ ← JAHIA_DATA_DIR (repo, bundles, configuration)
104
+ jackrabbit/ ← JCR workspace
105
+ modules/ ← Hot-deploy OSGi bundles (.jar)
106
+ patches/ ← groovy/cfg/spring patches applied at startup
107
+ digital-factory-config/ ← override jahia.properties / OSGi .cfg
108
+ /var/log/jahia/ ← log4j output files
109
+ jahia.log
110
+ access.log
111
+ errors.log
112
+ ```
113
+
114
+ ## Useful run-time commands
115
+
116
+ ```bash
117
+ # Tail combined Jahia logs
118
+ docker compose logs -f jahia
119
+
120
+ # Enter the container
121
+ docker compose exec jahia bash
122
+
123
+ # Karaf SSH console (password = same as JAHIA_ROOT_PASSWORD)
124
+ ssh -p 7770 karaf@localhost
125
+
126
+ # Force redeploy a module (drop the jar into hot-deploy)
127
+ docker compose cp my-module-1.0.jar jahia:/var/jahia/modules/
128
+
129
+ # Check resource usage
130
+ docker stats jahia mariadb
131
+
132
+ # One-shot health check
133
+ curl -u root:changeme http://localhost:8080/healthcheck?includeDetails=true
134
+ ```
135
+
136
+ ## Cluster (Hazelcast) quick checklist
137
+
138
+ 1. Set `CLUSTER_ENABLED=true` on all nodes.
139
+ 2. All nodes must share the same `DB_*` credentials pointing at the same DB.
140
+ 3. `PROCESSING_SERVER=true` on exactly **one** node (the processing node).
141
+ 4. Expose port `5900` between containers/pods for Hazelcast.
142
+ 5. Mount a shared NFS or object-store volume for `/var/jahia/jackrabbit/repository/datastore`.
143
+ 6. Verify membership: Karaf console → `cluster:info`.
144
+
145
+ ## Kubernetes notes
146
+
147
+ - Use the official Jahia Helm chart (`jahia/jahia`) from `https://charts.jahia.com`.
148
+ - Set `jahia.processingServer.replicas=1` and `jahia.browsing.replicas=N`.
149
+ - Use a `ReadWriteMany` PVC (e.g. EFS / NFS) for the datastore.
150
+ - Liveness probe: `GET /healthcheck` — expect HTTP 200.
151
+ - Readiness probe: `GET /healthcheck?includeDetails=true` — parse `"status":"GREEN"`.
@@ -0,0 +1,195 @@
1
+ # Jahia Monitoring Reference
2
+
3
+ ## Health endpoints
4
+
5
+ | Endpoint | Auth | Returns |
6
+ |----------|------|---------|
7
+ | `GET /healthcheck` | None | `{"status":"GREEN"}` or non-200 |
8
+ | `GET /healthcheck?includeDetails=true` | Basic (root) | Full JSON with per-probe status |
9
+ | `GET /modules/healthcheck` | Basic (root) | Module-level detail |
10
+ | `GET /live` | None | Kubernetes liveness (200 = alive) |
11
+ | `GET /ready` | None | Kubernetes readiness (200 = ready to serve) |
12
+
13
+ ### Interpreting `/healthcheck?includeDetails=true`
14
+
15
+ ```json
16
+ {
17
+ "status": "GREEN", // GREEN | YELLOW | RED
18
+ "probes": {
19
+ "DatabaseProbe": { "status": "GREEN" },
20
+ "ServerLoadProbe": { "status": "YELLOW", "message": "Load: 3.4" },
21
+ "JCRProbe": { "status": "GREEN" }
22
+ }
23
+ }
24
+ ```
25
+
26
+ A `RED` status means the instance should not receive traffic. A `YELLOW` means
27
+ degraded but still functional. Common probe names: `DatabaseProbe`,
28
+ `JCRProbe`, `ServerLoadProbe`, `ModulesProbe`, `ClusterProbe`.
29
+
30
+ ## Log files
31
+
32
+ | File | Content |
33
+ |------|---------|
34
+ | `/var/log/jahia/jahia.log` | Main application log (INFO+) |
35
+ | `/var/log/jahia/errors.log` | ERROR-only mirror of jahia.log |
36
+ | `/var/log/jahia/access.log` | HTTP access log (Combined format) |
37
+ | `/var/log/jahia/jahia_audit.log` | Security/audit events |
38
+ | `/var/log/jahia/gc.log*` | GC log (if `-Xlog:gc*` enabled) |
39
+
40
+ ### Key log patterns to watch
41
+
42
+ ```
43
+ # Module deployment failure
44
+ ERROR.*BundleException
45
+ ERROR.*Failed to deploy module
46
+
47
+ # JCR / Jackrabbit errors
48
+ ERROR.*RepositoryException
49
+ ERROR.*ItemExistsException
50
+
51
+ # DB connectivity
52
+ ERROR.*Cannot get a connection
53
+ ERROR.*Communications link failure
54
+
55
+ # Out of memory / GC pressure
56
+ java.lang.OutOfMemoryError
57
+ GC overhead limit exceeded
58
+
59
+ # Cluster split-brain
60
+ WARN.*Hazelcast.*member.*left
61
+ ERROR.*ClusterProbe
62
+
63
+ # Session leaks / thread pool exhaustion
64
+ WARN.*Maximum pool size reached
65
+ WARN.*No active session
66
+ ```
67
+
68
+ ### Useful log grep commands
69
+
70
+ ```bash
71
+ # All ERRORs in the last hour (adjust tail count)
72
+ docker compose exec jahia grep "^[0-9].*ERROR" /var/log/jahia/jahia.log | tail -200
73
+
74
+ # Module-related events today
75
+ docker compose exec jahia grep -i "module\|bundle\|deploy" /var/log/jahia/jahia.log | grep "$(date +%Y-%m-%d)"
76
+
77
+ # Slow queries (threshold 1000 ms is default)
78
+ docker compose exec jahia grep "SlowQuery\|slow query" /var/log/jahia/jahia.log
79
+ ```
80
+
81
+ ## Karaf console
82
+
83
+ Connect via SSH (port 7770 by default):
84
+
85
+ ```bash
86
+ ssh -p 7770 karaf@localhost
87
+ # Password = JAHIA_ROOT_PASSWORD
88
+ ```
89
+
90
+ ### Essential Karaf commands
91
+
92
+ ```
93
+ # OSGi bundle state
94
+ bundle:list # List all bundles + state
95
+ bundle:list | grep -v Active # Only non-Active bundles (problem candidates)
96
+ bundle:diag <bundle-id> # Diagnose a specific bundle (missing imports etc.)
97
+ bundle:start <bundle-id>
98
+ bundle:stop <bundle-id>
99
+ bundle:refresh <bundle-id>
100
+
101
+ # Module management
102
+ module:list # Jahia modules + version + state
103
+ jahia:deploy <path-to-jar> # Deploy a module from local path
104
+
105
+ # Cluster
106
+ cluster:info # Show Hazelcast cluster members
107
+ cluster:manager-node # Show which node is the manager
108
+
109
+ # System info
110
+ info # JVM / Karaf version summary
111
+ threads # Thread count snapshot
112
+ memory # Heap / non-heap usage
113
+
114
+ # Log level (temporary, reverts on restart)
115
+ log:set DEBUG org.jahia.services.content
116
+ log:set INFO org.jahia.services.content # reset
117
+
118
+ # Display live log tail inside Karaf
119
+ log:tail
120
+ ```
121
+
122
+ ## JVM tuning
123
+
124
+ ### Heap sizing
125
+
126
+ Set `MAX_RAM_PERCENTAGE` env var (e.g. `75`) to let the JVM auto-size to a
127
+ percentage of container RAM. Alternatively set explicit flags via `EXTRA_JAVA_OPTS`:
128
+
129
+ ```
130
+ EXTRA_JAVA_OPTS=-Xms2g -Xmx4g
131
+ ```
132
+
133
+ Rule of thumb: 4 GB heap minimum for a single-node dev instance; 8–16 GB for
134
+ production with content-heavy sites.
135
+
136
+ ### GC logging (add to EXTRA_JAVA_OPTS)
137
+
138
+ ```
139
+ -Xlog:gc*:file=/var/log/jahia/gc.log:time,uptime,level,tags:filecount=5,filesize=20m
140
+ ```
141
+
142
+ ### Thread dump
143
+
144
+ ```bash
145
+ # Get PID inside container
146
+ docker compose exec jahia bash -c 'jps | grep Jahia'
147
+ # Take dump (replace <PID>)
148
+ docker compose exec jahia bash -c 'kill -3 <PID>'
149
+ # Output goes to jahia.log
150
+ ```
151
+
152
+ Or from Karaf: `threads --list` for a quick summary.
153
+
154
+ ### Heap dump on OOM (add to EXTRA_JAVA_OPTS)
155
+
156
+ ```
157
+ -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jahia/heapdump.hprof
158
+ ```
159
+
160
+ ## jCustomer (Unomi) monitoring
161
+
162
+ ```bash
163
+ # Health
164
+ curl http://localhost:8181/cxs/actuator/health
165
+
166
+ # Cluster nodes (REST)
167
+ curl -u karaf:karaf http://localhost:8181/cxs/cluster
168
+
169
+ # Karaf console (port 8101)
170
+ ssh -p 8101 karaf@localhost
171
+ ```
172
+
173
+ ## Elasticsearch monitoring
174
+
175
+ ```bash
176
+ # Cluster health
177
+ curl http://localhost:9200/_cluster/health?pretty
178
+
179
+ # Index sizes
180
+ curl http://localhost:9200/_cat/indices?v&h=index,docs.count,store.size
181
+
182
+ # Pending tasks
183
+ curl http://localhost:9200/_cluster/pending_tasks
184
+ ```
185
+
186
+ ## Alerting thresholds (suggested)
187
+
188
+ | Metric | Warning | Critical |
189
+ |--------|---------|---------|
190
+ | Heap usage | 75 % | 90 % |
191
+ | Jahia healthcheck status | YELLOW | RED |
192
+ | DB connection pool | 80 % utilised | 95 % utilised |
193
+ | Error log rate | > 10/min | > 50/min |
194
+ | ES cluster health | YELLOW | RED |
195
+ | GC pause (G1GC stop-the-world) | > 500 ms | > 2 s |
@@ -0,0 +1,269 @@
1
+ # Jahia Provisioning Reference
2
+
3
+ ## Provisioning API overview
4
+
5
+ The Jahia Provisioning API (introduced in DX 8.x) executes YAML scripts that
6
+ install modules, create sites, configure OSGi services, and seed JCR content.
7
+ Scripts can be:
8
+
9
+ - Placed in `/var/jahia/patches/` — executed automatically at startup.
10
+ - POSTed to the REST endpoint: `POST /modules/api/provisioning`.
11
+
12
+ ## REST endpoint
13
+
14
+ ```
15
+ POST /modules/api/provisioning
16
+ Authorization: Basic <base64(root:password)>
17
+ Content-Type: application/yaml (or multipart/form-data)
18
+
19
+ <provisioning script body>
20
+ ```
21
+
22
+ ### Upload via curl
23
+
24
+ ```bash
25
+ curl -u root:changeme \
26
+ -X POST \
27
+ -H "Content-Type: application/yaml" \
28
+ --data-binary @my-script.yaml \
29
+ http://localhost:8080/modules/api/provisioning
30
+ ```
31
+
32
+ ### Upload via multipart (with file)
33
+
34
+ ```bash
35
+ curl -u root:changeme \
36
+ -F "script=@my-script.yaml" \
37
+ http://localhost:8080/modules/api/provisioning
38
+ ```
39
+
40
+ ## Script structure
41
+
42
+ ```yaml
43
+ # provisioning-script.yaml
44
+ - installOrUpgradeModules:
45
+ - url: "mvn:org.jahia.modules/article/3.5.0"
46
+ - url: "file:///var/jahia/modules/my-custom-module-1.0.jar"
47
+
48
+ - createSite: ""
49
+ siteKey: mySite
50
+ title: "My Site"
51
+ defaultLanguage: en
52
+ serverName: localhost
53
+ templateSet: my-template-set
54
+
55
+ - importSite:
56
+ siteKey: mySite
57
+ uri: "file:///var/jahia/imports/mySite-export.zip"
58
+ ```
59
+
60
+ ## Common provisioning operations
61
+
62
+ ### Install / upgrade a module from Maven
63
+
64
+ ```yaml
65
+ - installOrUpgradeModules:
66
+ - url: "mvn:org.jahia.modules/bootstrap4-core/4.0.0"
67
+ - url: "mvn:org.jahia.modules/bootstrap4-components/4.0.0"
68
+ ```
69
+
70
+ ### Install from a local file
71
+
72
+ ```yaml
73
+ - installOrUpgradeModules:
74
+ - url: "file:///var/jahia/modules/my-module-1.0.jar"
75
+ ```
76
+
77
+ ### Enable / start a module
78
+
79
+ ```yaml
80
+ - startModules:
81
+ - name: my-module
82
+ ```
83
+
84
+ ### Disable / stop a module
85
+
86
+ ```yaml
87
+ - stopModules:
88
+ - name: my-module
89
+ ```
90
+
91
+ ### Uninstall a module
92
+
93
+ ```yaml
94
+ - uninstallModules:
95
+ - name: my-module
96
+ ```
97
+
98
+ ### Create a virtual site
99
+
100
+ > ⚠️ **CRITICAL — Jahia 8.2 syntax**: use `- createSite: ""` with properties at the **same indentation level**. There are **two common mistakes that both silently return HTTP 200 but create nothing**:
101
+ > - ❌ `- createSite:` with nested properties (missing `""`)
102
+ > - ❌ `- createVirtualSite:` (old name, no longer valid)
103
+ >
104
+ > **Always use a file-based approach** to avoid shell quoting issues:
105
+
106
+ ```bash
107
+ cat > /tmp/create-site.yaml <<'EOF'
108
+ - createSite: ""
109
+ siteKey: acme
110
+ title: "ACME Corp"
111
+ defaultLanguage: en
112
+ serverName: localhost
113
+ templateSet: acme-template-set
114
+ EOF
115
+
116
+ curl -u root:root1234 -X POST -H "Content-Type: application/yaml" \
117
+ --data-binary @/tmp/create-site.yaml \
118
+ http://localhost:8080/modules/api/provisioning
119
+ ```
120
+
121
+ The API returns `HTTP 200` with an empty body. **Always verify** the site was created — HTTP 200 is not sufficient confirmation:
122
+
123
+ ```bash
124
+ curl -s -u root:root1234 \
125
+ -H "Content-Type: application/json" -H "Origin: http://localhost:8080" \
126
+ -X POST http://localhost:8080/modules/graphql \
127
+ -d '{"query":"{ jcr { nodeByPath(path: \"/sites/acme\") { name } } }"}'
128
+ ```
129
+
130
+ If the response contains `"name": "acme"`, the site exists. If it returns `null`, the site was not created — recheck the YAML format.
131
+
132
+ ### Delete a virtual site
133
+
134
+ ```bash
135
+ curl -u root:root1234 \
136
+ -X POST \
137
+ -H "Content-Type: application/yaml" \
138
+ --data-binary '- deleteSite: ""
139
+ siteKey: acme' \
140
+ http://localhost:8080/modules/api/provisioning
141
+ ```
142
+
143
+ ### Import a site export ZIP
144
+
145
+ ```yaml
146
+ - importSite:
147
+ siteKey: acme
148
+ uri: "file:///var/jahia/imports/acme-export.zip"
149
+ rootUsersGroup: site-admins
150
+ ```
151
+
152
+ ### Execute a Groovy script
153
+
154
+ ```yaml
155
+ - executeScript:
156
+ script: "file:///var/jahia/patches/migrate-content.groovy"
157
+ ```
158
+
159
+ Or inline:
160
+
161
+ ```yaml
162
+ - executeScript:
163
+ scriptContent: |
164
+ import org.jahia.services.content.*
165
+ def session = JCRSessionFactory.getInstance().getCurrentSystemSession("default", null, null)
166
+ // ... do work ...
167
+ session.save()
168
+ ```
169
+
170
+ ### Set a system property / OSGi configuration
171
+
172
+ ```yaml
173
+ - setSystemProperty:
174
+ name: my.custom.property
175
+ value: "my-value"
176
+ ```
177
+
178
+ ```yaml
179
+ - setOsgiConfiguration:
180
+ pid: "org.jahia.services.content.nodetypes.NodeTypeRegistry"
181
+ properties:
182
+ autoDeployBundles: "true"
183
+ ```
184
+
185
+ ### Add a user
186
+
187
+ ```yaml
188
+ - addUser:
189
+ username: john.doe
190
+ password: secret123
191
+ email: john.doe@example.com
192
+ firstName: John
193
+ lastName: Doe
194
+ roles:
195
+ - site-administrator:acme
196
+ ```
197
+
198
+ ### Grant a role on a node
199
+
200
+ ```yaml
201
+ - grantRoles:
202
+ path: /sites/acme
203
+ principal: "u:john.doe"
204
+ roles:
205
+ - site-administrator
206
+ ```
207
+
208
+ ## Patches directory
209
+
210
+ Files placed in `/var/jahia/patches/` are executed **once** at startup
211
+ (Jahia records which files have already been applied):
212
+
213
+ ```
214
+ /var/jahia/patches/
215
+ cfg/ ← OSGi .cfg files
216
+ spring/ ← Spring XML context overrides
217
+ groovy/ ← Groovy scripts (executed once)
218
+ yaml/ ← Provisioning YAML scripts (executed once)
219
+ ```
220
+
221
+ Mount a host directory here to inject patches without rebuilding the image:
222
+
223
+ ```yaml
224
+ volumes:
225
+ - ./patches:/var/jahia/patches
226
+ ```
227
+
228
+ ## Execution order and idempotency
229
+
230
+ - Provisioning YAML scripts in `patches/yaml/` are sorted alphabetically.
231
+ Prefix filenames with a two-digit index (`01-modules.yaml`, `02-sites.yaml`)
232
+ to control order.
233
+ - Most operations are idempotent: `installOrUpgradeModules` skips if the exact
234
+ version is already installed; `createVirtualSite` skips if the site key exists.
235
+ - Groovy scripts in `patches/groovy/` run exactly once; rename the file to
236
+ force re-execution.
237
+
238
+ ## Checking provisioning status
239
+
240
+ ```bash
241
+ # View provisioning log output (appears in jahia.log)
242
+ docker compose exec jahia grep -i "provisioning\|install.*module\|createVirtualSite" /var/log/jahia/jahia.log
243
+
244
+ # List applied patches via Karaf
245
+ ssh -p 7770 karaf@localhost
246
+ # In Karaf:
247
+ jahia:patches-list
248
+ ```
249
+
250
+ ## jCustomer (Unomi) provisioning
251
+
252
+ Unomi uses its own REST API and YAML/JSON rules. Key endpoints:
253
+
254
+ ```bash
255
+ # Import a scope
256
+ curl -u karaf:karaf -X POST \
257
+ -H "Content-Type: application/json" \
258
+ -d '{"itemId":"mySite","itemType":"scope"}' \
259
+ http://localhost:8181/cxs/scopes
260
+
261
+ # Import a rule
262
+ curl -u karaf:karaf -X POST \
263
+ -H "Content-Type: application/json" \
264
+ -d @my-rule.json \
265
+ http://localhost:8181/cxs/rules
266
+
267
+ # Reload rules from classpath
268
+ curl -u karaf:karaf -X POST http://localhost:8181/cxs/rules/resetQueries
269
+ ```