@bluedynamics/cdk8s-plone 0.1.4 → 0.1.6
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.
- package/.jsii +26 -7
- package/API.md +16 -0
- package/CLAUDE.md +352 -0
- package/README.md +55 -178
- package/documentation/Makefile +357 -0
- package/documentation/README.md +284 -0
- package/documentation/mx.ini +3 -0
- package/documentation/sources/_static/brand-theme.css +685 -0
- package/documentation/sources/_static/custom-icons.css +123 -0
- package/documentation/sources/_static/fonts/hack/Hack-Regular.woff2 +0 -0
- package/documentation/sources/_static/fonts/orbitron/Orbitron-Black.woff2 +11 -0
- package/documentation/sources/_static/fonts/orbitron/Orbitron-Bold.woff2 +11 -0
- package/documentation/sources/_static/fonts/orbitron/Orbitron-Regular.woff2 +0 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Bold.woff2 +11 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Medium.woff2 +11 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Regular.woff2 +11 -0
- package/documentation/sources/_static/fonts/rajdhani/Rajdhani-SemiBold.woff2 +11 -0
- package/documentation/sources/_static/kup6s-icon-explanation.svg +32 -0
- package/documentation/sources/_static/kup6s-icon-howto.svg +34 -0
- package/documentation/sources/_static/kup6s-icon-plone.svg +79 -0
- package/documentation/sources/_static/kup6s-icon-reference.svg +34 -0
- package/documentation/sources/_static/kup6s-icon-tutorials.svg +30 -0
- package/documentation/sources/_static/logo-fix.js +12 -0
- package/documentation/sources/conf.py +105 -0
- package/documentation/sources/explanation/architecture.md +311 -0
- package/documentation/sources/explanation/features.md +353 -0
- package/documentation/sources/explanation/index.md +51 -0
- package/documentation/sources/how-to/index.md +56 -0
- package/documentation/sources/how-to/setup-prerequisites.md +354 -0
- package/documentation/sources/index.md +108 -0
- package/documentation/sources/reference/api/.gitkeep +1 -0
- package/documentation/sources/reference/configuration-options.md +370 -0
- package/documentation/sources/reference/index.md +59 -0
- package/documentation/sources/tutorials/01-quick-start.md +157 -0
- package/documentation/sources/tutorials/index.md +48 -0
- package/lib/httpcache.d.ts +6 -0
- package/lib/httpcache.js +4 -2
- package/lib/plone.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
# Configuration Options
|
|
2
|
+
|
|
3
|
+
Complete reference for all configuration options in cdk8s-plone.
|
|
4
|
+
|
|
5
|
+
## Key Constructs
|
|
6
|
+
|
|
7
|
+
### `Plone`
|
|
8
|
+
|
|
9
|
+
Main construct for deploying Plone CMS. Supports two variants:
|
|
10
|
+
- **VOLTO**: Modern React frontend with REST API backend (default)
|
|
11
|
+
- **CLASSICUI**: Traditional server-side rendered Plone
|
|
12
|
+
|
|
13
|
+
**Properties:**
|
|
14
|
+
- `backendServiceName` - Name of the backend Kubernetes service
|
|
15
|
+
- `frontendServiceName` - Name of the frontend service (VOLTO only)
|
|
16
|
+
- `variant` - Deployment variant (VOLTO or CLASSICUI)
|
|
17
|
+
- `siteId` - Plone site ID in ZODB (default: 'Plone')
|
|
18
|
+
|
|
19
|
+
**Example:**
|
|
20
|
+
```typescript
|
|
21
|
+
import { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';
|
|
22
|
+
|
|
23
|
+
new Plone(chart, 'my-plone', {
|
|
24
|
+
variant: PloneVariant.VOLTO,
|
|
25
|
+
siteId: 'MySite',
|
|
26
|
+
backend: {
|
|
27
|
+
image: 'plone/plone-backend:6.1.3',
|
|
28
|
+
replicas: 3,
|
|
29
|
+
},
|
|
30
|
+
frontend: {
|
|
31
|
+
image: 'plone/plone-frontend:16.0.0',
|
|
32
|
+
replicas: 2,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### `PloneHttpcache`
|
|
40
|
+
|
|
41
|
+
Varnish HTTP caching layer using the [kube-httpcache](https://github.com/mittwald/kube-httpcache) Helm chart. Provides cluster-wide cache invalidation.
|
|
42
|
+
|
|
43
|
+
**Properties:**
|
|
44
|
+
- `httpcacheServiceName` - Name of the Varnish service
|
|
45
|
+
|
|
46
|
+
**Example:**
|
|
47
|
+
```typescript
|
|
48
|
+
import { PloneHttpcache } from '@bluedynamics/cdk8s-plone';
|
|
49
|
+
|
|
50
|
+
new PloneHttpcache(chart, 'cache', {
|
|
51
|
+
plone: ploneInstance,
|
|
52
|
+
existingSecret: 'varnish-secret',
|
|
53
|
+
replicas: 2,
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Configuration Interfaces
|
|
60
|
+
|
|
61
|
+
### `PloneOptions`
|
|
62
|
+
|
|
63
|
+
Main configuration interface for the Plone construct.
|
|
64
|
+
|
|
65
|
+
| Property | Type | Required | Default | Description |
|
|
66
|
+
|----------|------|----------|---------|-------------|
|
|
67
|
+
| `version` | `string` | No | - | Version of your project |
|
|
68
|
+
| `siteId` | `string` | No | `'Plone'` | Plone site ID in ZODB |
|
|
69
|
+
| `variant` | `PloneVariant` | No | `VOLTO` | Deployment variant (VOLTO or CLASSICUI) |
|
|
70
|
+
| `backend` | `PloneBaseOptions` | Yes | - | Backend configuration |
|
|
71
|
+
| `frontend` | `PloneBaseOptions` | Conditional | - | Frontend configuration (required for VOLTO) |
|
|
72
|
+
| `imagePullSecrets` | `string[]` | No | - | Image pull secrets for private registries |
|
|
73
|
+
|
|
74
|
+
**Example:**
|
|
75
|
+
```typescript
|
|
76
|
+
const options: PloneOptions = {
|
|
77
|
+
version: '1.0.0',
|
|
78
|
+
siteId: 'MySite',
|
|
79
|
+
variant: PloneVariant.VOLTO,
|
|
80
|
+
backend: { /* ... */ },
|
|
81
|
+
frontend: { /* ... */ },
|
|
82
|
+
imagePullSecrets: ['my-registry-secret'],
|
|
83
|
+
};
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### `PloneBaseOptions`
|
|
89
|
+
|
|
90
|
+
Configuration for backend or frontend components.
|
|
91
|
+
|
|
92
|
+
#### Container Configuration
|
|
93
|
+
|
|
94
|
+
| Property | Type | Required | Default | Description |
|
|
95
|
+
|----------|------|----------|---------|-------------|
|
|
96
|
+
| `image` | `string` | Yes | - | Container image (e.g., 'plone/plone-backend:6.1.3') |
|
|
97
|
+
| `imagePullPolicy` | `string` | No | `'IfNotPresent'` | Image pull policy |
|
|
98
|
+
| `replicas` | `number` | No | `2` | Number of pod replicas |
|
|
99
|
+
| `environment` | `Env` | No | - | Environment variables (cdk8s-plus-30.Env) |
|
|
100
|
+
|
|
101
|
+
**Example:**
|
|
102
|
+
```typescript
|
|
103
|
+
import { Env } from 'cdk8s-plus-30';
|
|
104
|
+
|
|
105
|
+
backend: {
|
|
106
|
+
image: 'plone/plone-backend:6.1.3',
|
|
107
|
+
replicas: 3,
|
|
108
|
+
imagePullPolicy: 'Always',
|
|
109
|
+
environment: {
|
|
110
|
+
variables: {
|
|
111
|
+
SITE: Env.value('MySite'),
|
|
112
|
+
DEBUG_MODE: Env.value('off'),
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Resource Configuration
|
|
119
|
+
|
|
120
|
+
| Property | Type | Description |
|
|
121
|
+
|----------|------|-------------|
|
|
122
|
+
| `requestCpu` | `string` | CPU request (e.g., '500m', '1') |
|
|
123
|
+
| `limitCpu` | `string` | CPU limit |
|
|
124
|
+
| `requestMemory` | `string` | Memory request (e.g., '512Mi', '1Gi') |
|
|
125
|
+
| `limitMemory` | `string` | Memory limit |
|
|
126
|
+
|
|
127
|
+
**Example:**
|
|
128
|
+
```typescript
|
|
129
|
+
backend: {
|
|
130
|
+
image: 'plone/plone-backend:6.1.3',
|
|
131
|
+
requestCpu: '500m',
|
|
132
|
+
limitCpu: '2',
|
|
133
|
+
requestMemory: '512Mi',
|
|
134
|
+
limitMemory: '2Gi',
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
#### High Availability
|
|
139
|
+
|
|
140
|
+
| Property | Type | Description |
|
|
141
|
+
|----------|------|-------------|
|
|
142
|
+
| `minAvailable` | `number` | Minimum pods available during updates (for PodDisruptionBudget) |
|
|
143
|
+
| `maxUnavailable` | `number` | Maximum unavailable pods during updates |
|
|
144
|
+
|
|
145
|
+
**Example:**
|
|
146
|
+
```typescript
|
|
147
|
+
backend: {
|
|
148
|
+
image: 'plone/plone-backend:6.1.3',
|
|
149
|
+
replicas: 5,
|
|
150
|
+
minAvailable: 3, // At least 3 pods must be available during updates
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Readiness Probe
|
|
155
|
+
|
|
156
|
+
| Property | Type | Default | Description |
|
|
157
|
+
|----------|------|---------|-------------|
|
|
158
|
+
| `readinessEnabled` | `boolean` | `true` | Enable readiness probe |
|
|
159
|
+
| `readinessInitialDelaySeconds` | `number` | - | Seconds before first probe |
|
|
160
|
+
| `readinessTimeoutSeconds` | `number` | - | Probe timeout |
|
|
161
|
+
| `readinessPeriodSeconds` | `number` | - | Probe frequency |
|
|
162
|
+
| `readinessSuccessThreshold` | `number` | - | Consecutive successes required |
|
|
163
|
+
| `readinessFailureThreshold` | `number` | - | Consecutive failures before marking unready |
|
|
164
|
+
|
|
165
|
+
**Example:**
|
|
166
|
+
```typescript
|
|
167
|
+
backend: {
|
|
168
|
+
image: 'plone/plone-backend:6.1.3',
|
|
169
|
+
readinessEnabled: true,
|
|
170
|
+
readinessInitialDelaySeconds: 10,
|
|
171
|
+
readinessTimeoutSeconds: 5,
|
|
172
|
+
readinessPeriodSeconds: 10,
|
|
173
|
+
readinessFailureThreshold: 3,
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### Liveness Probe
|
|
178
|
+
|
|
179
|
+
| Property | Type | Default | Description |
|
|
180
|
+
|----------|------|---------|-------------|
|
|
181
|
+
| `livenessEnabled` | `boolean` | `false` | Enable liveness probe (recommended `true` for frontend) |
|
|
182
|
+
| `livenessInitialDelaySeconds` | `number` | - | Seconds before first probe |
|
|
183
|
+
| `livenessTimeoutSeconds` | `number` | - | Probe timeout |
|
|
184
|
+
| `livenessPeriodSeconds` | `number` | - | Probe frequency |
|
|
185
|
+
| `livenessSuccessThreshold` | `number` | - | Consecutive successes required |
|
|
186
|
+
| `livenessFailureThreshold` | `number` | - | Consecutive failures before restart |
|
|
187
|
+
|
|
188
|
+
**Example:**
|
|
189
|
+
```typescript
|
|
190
|
+
frontend: {
|
|
191
|
+
image: 'plone/plone-frontend:16.0.0',
|
|
192
|
+
livenessEnabled: true, // Recommended for frontend
|
|
193
|
+
livenessInitialDelaySeconds: 30,
|
|
194
|
+
livenessTimeoutSeconds: 5,
|
|
195
|
+
livenessPeriodSeconds: 30,
|
|
196
|
+
livenessFailureThreshold: 3,
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### Annotations
|
|
201
|
+
|
|
202
|
+
| Property | Type | Description |
|
|
203
|
+
|----------|------|-------------|
|
|
204
|
+
| `annotations` | `Record<string, string>` | Deployment metadata annotations |
|
|
205
|
+
| `podAnnotations` | `Record<string, string>` | Pod template annotations (e.g., for Prometheus) |
|
|
206
|
+
| `serviceAnnotations` | `Record<string, string>` | Service annotations (e.g., for external-dns) |
|
|
207
|
+
|
|
208
|
+
**Example:**
|
|
209
|
+
```typescript
|
|
210
|
+
backend: {
|
|
211
|
+
image: 'plone/plone-backend:6.1.3',
|
|
212
|
+
podAnnotations: {
|
|
213
|
+
'prometheus.io/scrape': 'true',
|
|
214
|
+
'prometheus.io/port': '8080',
|
|
215
|
+
},
|
|
216
|
+
serviceAnnotations: {
|
|
217
|
+
'external-dns.alpha.kubernetes.io/hostname': 'backend.example.com',
|
|
218
|
+
},
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### `PloneHttpcacheOptions`
|
|
225
|
+
|
|
226
|
+
Configuration for the Varnish HTTP cache layer.
|
|
227
|
+
|
|
228
|
+
| Property | Type | Required | Default | Description |
|
|
229
|
+
|----------|------|----------|---------|-------------|
|
|
230
|
+
| `plone` | `Plone` | Yes | - | Plone construct to attach cache to |
|
|
231
|
+
| `varnishVcl` | `string` | No | - | VCL configuration as string |
|
|
232
|
+
| `varnishVclFile` | `string` | No | - | Path to VCL configuration file |
|
|
233
|
+
| `existingSecret` | `string` | No | - | Kubernetes secret for Varnish admin credentials |
|
|
234
|
+
| `replicas` | `number` | No | `2` | Number of Varnish replicas |
|
|
235
|
+
| `requestCpu` | `string` | No | - | CPU request |
|
|
236
|
+
| `limitCpu` | `string` | No | - | CPU limit |
|
|
237
|
+
| `requestMemory` | `string` | No | - | Memory request |
|
|
238
|
+
| `limitMemory` | `string` | No | - | Memory limit |
|
|
239
|
+
| `servicemonitor` | `boolean` | No | `false` | Enable Prometheus ServiceMonitor |
|
|
240
|
+
| `exporterEnabled` | `boolean` | No | `true` | Enable Prometheus exporter sidecar |
|
|
241
|
+
| `chartVersion` | `string` | No | latest | kube-httpcache Helm chart version |
|
|
242
|
+
|
|
243
|
+
**Example:**
|
|
244
|
+
```typescript
|
|
245
|
+
new PloneHttpcache(chart, 'cache', {
|
|
246
|
+
plone: ploneInstance,
|
|
247
|
+
existingSecret: 'varnish-secret',
|
|
248
|
+
replicas: 3,
|
|
249
|
+
requestCpu: '250m',
|
|
250
|
+
limitCpu: '1',
|
|
251
|
+
requestMemory: '256Mi',
|
|
252
|
+
limitMemory: '1Gi',
|
|
253
|
+
servicemonitor: true,
|
|
254
|
+
exporterEnabled: true,
|
|
255
|
+
});
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**VCL Configuration:**
|
|
259
|
+
```typescript
|
|
260
|
+
// Inline VCL
|
|
261
|
+
new PloneHttpcache(chart, 'cache', {
|
|
262
|
+
plone: ploneInstance,
|
|
263
|
+
varnishVcl: `
|
|
264
|
+
vcl 4.1;
|
|
265
|
+
backend default {
|
|
266
|
+
.host = "backend-service";
|
|
267
|
+
.port = "8080";
|
|
268
|
+
}
|
|
269
|
+
`,
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// VCL from file
|
|
273
|
+
new PloneHttpcache(chart, 'cache', {
|
|
274
|
+
plone: ploneInstance,
|
|
275
|
+
varnishVclFile: './varnish/default.vcl',
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## PloneVariant Enum
|
|
282
|
+
|
|
283
|
+
Defines the deployment variant:
|
|
284
|
+
|
|
285
|
+
| Value | Description |
|
|
286
|
+
|-------|-------------|
|
|
287
|
+
| `PloneVariant.VOLTO` | Modern React frontend with REST API backend (default) |
|
|
288
|
+
| `PloneVariant.CLASSICUI` | Traditional server-side rendered Plone |
|
|
289
|
+
|
|
290
|
+
**Example:**
|
|
291
|
+
```typescript
|
|
292
|
+
import { PloneVariant } from '@bluedynamics/cdk8s-plone';
|
|
293
|
+
|
|
294
|
+
// Volto (modern)
|
|
295
|
+
variant: PloneVariant.VOLTO
|
|
296
|
+
|
|
297
|
+
// Classic UI
|
|
298
|
+
variant: PloneVariant.CLASSICUI
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Complete Example
|
|
304
|
+
|
|
305
|
+
```typescript
|
|
306
|
+
import { App, Chart } from 'cdk8s';
|
|
307
|
+
import { Plone, PloneVariant, PloneHttpcache } from '@bluedynamics/cdk8s-plone';
|
|
308
|
+
import { Env } from 'cdk8s-plus-30';
|
|
309
|
+
|
|
310
|
+
const app = new App();
|
|
311
|
+
const chart = new Chart(app, 'PloneDeployment');
|
|
312
|
+
|
|
313
|
+
const plone = new Plone(chart, 'my-plone', {
|
|
314
|
+
version: '1.0.0',
|
|
315
|
+
siteId: 'MySite',
|
|
316
|
+
variant: PloneVariant.VOLTO,
|
|
317
|
+
imagePullSecrets: ['registry-secret'],
|
|
318
|
+
|
|
319
|
+
backend: {
|
|
320
|
+
image: 'plone/plone-backend:6.1.3',
|
|
321
|
+
replicas: 3,
|
|
322
|
+
requestCpu: '500m',
|
|
323
|
+
limitCpu: '2',
|
|
324
|
+
requestMemory: '512Mi',
|
|
325
|
+
limitMemory: '2Gi',
|
|
326
|
+
minAvailable: 2,
|
|
327
|
+
readinessEnabled: true,
|
|
328
|
+
readinessInitialDelaySeconds: 10,
|
|
329
|
+
environment: {
|
|
330
|
+
variables: {
|
|
331
|
+
SITE: Env.value('MySite'),
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
podAnnotations: {
|
|
335
|
+
'prometheus.io/scrape': 'true',
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
frontend: {
|
|
340
|
+
image: 'plone/plone-frontend:16.0.0',
|
|
341
|
+
replicas: 2,
|
|
342
|
+
requestCpu: '250m',
|
|
343
|
+
limitCpu: '1',
|
|
344
|
+
requestMemory: '256Mi',
|
|
345
|
+
limitMemory: '1Gi',
|
|
346
|
+
livenessEnabled: true,
|
|
347
|
+
livenessInitialDelaySeconds: 30,
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
new PloneHttpcache(chart, 'cache', {
|
|
352
|
+
plone: plone,
|
|
353
|
+
existingSecret: 'varnish-secret',
|
|
354
|
+
replicas: 2,
|
|
355
|
+
requestCpu: '250m',
|
|
356
|
+
requestMemory: '256Mi',
|
|
357
|
+
servicemonitor: true,
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
app.synth();
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## See Also
|
|
366
|
+
|
|
367
|
+
- [API Documentation](api/) - Complete API reference
|
|
368
|
+
- [Quick Start Tutorial](../tutorials/01-quick-start.md) - Get started guide
|
|
369
|
+
- [Scale Resources](../how-to/scale-resources.md) - How to adjust resources
|
|
370
|
+
- [Configure Monitoring](../how-to/configure-monitoring.md) - Prometheus setup
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
```{image} ../_static/kup6s-icon-reference.svg
|
|
2
|
+
:align: center
|
|
3
|
+
:class: section-icon-large
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
# Reference
|
|
7
|
+
|
|
8
|
+
**Information-oriented technical specifications and configurations for cdk8s-plone.**
|
|
9
|
+
|
|
10
|
+
Reference guides provide detailed technical information about cdk8s-plone's API, configuration options, and component specifications. They describe how things work and what parameters are available.
|
|
11
|
+
|
|
12
|
+
## API Reference
|
|
13
|
+
|
|
14
|
+
*This section will contain auto-generated or detailed documentation for:*
|
|
15
|
+
- Main chart classes
|
|
16
|
+
- Configuration interfaces
|
|
17
|
+
- Individual construct classes
|
|
18
|
+
- Utility functions and validators
|
|
19
|
+
|
|
20
|
+
## Configuration Reference
|
|
21
|
+
|
|
22
|
+
```{toctree}
|
|
23
|
+
---
|
|
24
|
+
maxdepth: 1
|
|
25
|
+
titlesonly: true
|
|
26
|
+
---
|
|
27
|
+
configuration-options
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Component Specifications
|
|
31
|
+
|
|
32
|
+
```{toctree}
|
|
33
|
+
---
|
|
34
|
+
maxdepth: 1
|
|
35
|
+
titlesonly: true
|
|
36
|
+
---
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
*Component specifications will be added in future releases.*
|
|
40
|
+
|
|
41
|
+
## API Documentation
|
|
42
|
+
|
|
43
|
+
See the `api/` directory for detailed construct documentation:
|
|
44
|
+
|
|
45
|
+
```{toctree}
|
|
46
|
+
---
|
|
47
|
+
maxdepth: 1
|
|
48
|
+
glob: true
|
|
49
|
+
---
|
|
50
|
+
api/*
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
**Getting started?** Begin with the [Tutorials](../tutorials/index.md) for hands-on learning.
|
|
56
|
+
|
|
57
|
+
**Solving a specific problem?** Check the [How-To Guides](../how-to/index.md) for task-oriented solutions.
|
|
58
|
+
|
|
59
|
+
**Understanding concepts?** Read the [Explanation](../explanation/index.md) section for architecture and design.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Quick Start
|
|
2
|
+
|
|
3
|
+
This tutorial will guide you through deploying your first Plone instance using cdk8s-plone.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
Before you start, ensure you have:
|
|
8
|
+
|
|
9
|
+
- **Node.js 16+** and npm installed
|
|
10
|
+
- **kubectl** configured to access your Kubernetes cluster
|
|
11
|
+
- Basic familiarity with Kubernetes and TypeScript
|
|
12
|
+
- A Kubernetes cluster (local or remote)
|
|
13
|
+
|
|
14
|
+
For detailed prerequisites, see [Setup Prerequisites](../how-to/setup-prerequisites.md).
|
|
15
|
+
|
|
16
|
+
## Step 1: Create a CDK8S Project
|
|
17
|
+
|
|
18
|
+
Create a new CDK8S TypeScript project:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Create project directory
|
|
22
|
+
mkdir my-plone-deployment
|
|
23
|
+
cd my-plone-deployment
|
|
24
|
+
|
|
25
|
+
# Initialize CDK8S project
|
|
26
|
+
cdk8s init typescript-app
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This creates a basic CDK8S project structure.
|
|
30
|
+
|
|
31
|
+
## Step 2: Install cdk8s-plone
|
|
32
|
+
|
|
33
|
+
Install the cdk8s-plone library:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @bluedynamics/cdk8s-plone
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The library is also available for Python via PyPI:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install cdk8s-plone
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Step 3: Create a Basic Plone Deployment
|
|
46
|
+
|
|
47
|
+
Edit `main.ts` with the following code:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { App, Chart } from 'cdk8s';
|
|
51
|
+
import { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';
|
|
52
|
+
|
|
53
|
+
const app = new App();
|
|
54
|
+
const chart = new Chart(app, 'PloneDeployment');
|
|
55
|
+
|
|
56
|
+
new Plone(chart, 'my-plone', {
|
|
57
|
+
variant: PloneVariant.VOLTO,
|
|
58
|
+
backend: {
|
|
59
|
+
image: 'plone/plone-backend:6.1.3',
|
|
60
|
+
replicas: 3,
|
|
61
|
+
},
|
|
62
|
+
frontend: {
|
|
63
|
+
image: 'plone/plone-frontend:16.0.0',
|
|
64
|
+
replicas: 2,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
app.synth();
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This creates:
|
|
72
|
+
- A Plone backend with 3 replicas
|
|
73
|
+
- A Volto frontend with 2 replicas
|
|
74
|
+
- All necessary Kubernetes services and deployments
|
|
75
|
+
|
|
76
|
+
## Step 4: Generate Kubernetes Manifests
|
|
77
|
+
|
|
78
|
+
Generate the Kubernetes manifests:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cdk8s synth
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This creates YAML files in the `dist/` directory containing all Kubernetes resources.
|
|
85
|
+
|
|
86
|
+
## Step 5: Deploy to Kubernetes
|
|
87
|
+
|
|
88
|
+
Apply the generated manifests to your cluster:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
kubectl apply -f dist/
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Check the deployment status:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
kubectl get pods
|
|
98
|
+
kubectl get services
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Step 6: Access Your Plone Site
|
|
102
|
+
|
|
103
|
+
Once all pods are running, access your Plone site:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Port-forward to the frontend service
|
|
107
|
+
kubectl port-forward service/my-plone-frontend 3000:3000
|
|
108
|
+
|
|
109
|
+
# Open in browser
|
|
110
|
+
open http://localhost:3000
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Adding HTTP Caching (Optional)
|
|
114
|
+
|
|
115
|
+
For production deployments, add Varnish HTTP caching:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { PloneHttpcache } from '@bluedynamics/cdk8s-plone';
|
|
119
|
+
|
|
120
|
+
const plone = new Plone(chart, 'my-plone', {
|
|
121
|
+
variant: PloneVariant.VOLTO,
|
|
122
|
+
backend: { image: 'plone/plone-backend:6.1.3' },
|
|
123
|
+
frontend: { image: 'plone/plone-frontend:16.0.0' },
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
new PloneHttpcache(chart, 'cache', {
|
|
127
|
+
plone: plone,
|
|
128
|
+
existingSecret: 'varnish-secret',
|
|
129
|
+
replicas: 2,
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This adds a Varnish caching layer with cluster-wide cache invalidation using [kube-httpcache](https://github.com/mittwald/kube-httpcache).
|
|
134
|
+
|
|
135
|
+
## Next Steps
|
|
136
|
+
|
|
137
|
+
Now that you have a basic Plone deployment:
|
|
138
|
+
|
|
139
|
+
- **Configure resources**: See [Scale Resources](../how-to/scale-resources.md) to adjust CPU and memory
|
|
140
|
+
- **Add monitoring**: Configure [Prometheus metrics](../how-to/configure-monitoring.md)
|
|
141
|
+
- **Explore variants**: Learn about [Classic UI vs Volto](../explanation/plone-variants.md)
|
|
142
|
+
|
|
143
|
+
## Troubleshooting
|
|
144
|
+
|
|
145
|
+
**Pods not starting?**
|
|
146
|
+
- Check pod logs: `kubectl logs <pod-name>`
|
|
147
|
+
- Verify images are accessible: `kubectl describe pod <pod-name>`
|
|
148
|
+
|
|
149
|
+
**Can't access the site?**
|
|
150
|
+
- Ensure port-forward is running
|
|
151
|
+
- Check service endpoints: `kubectl get endpoints`
|
|
152
|
+
|
|
153
|
+
For more help, see the [Troubleshooting guide](../how-to/troubleshooting.md).
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
**Complete example**: See the [cdk8s-plone-example](https://github.com/bluedynamics/cdk8s-plone-example) repository for a full working example.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
```{image} ../_static/kup6s-icon-tutorials.svg
|
|
2
|
+
:align: center
|
|
3
|
+
:class: section-icon-large
|
|
4
|
+
```
|
|
5
|
+
|
|
6
|
+
# Tutorials
|
|
7
|
+
|
|
8
|
+
**Learning-oriented guides that take you through a series of steps to complete a project.**
|
|
9
|
+
|
|
10
|
+
Tutorials are lessons that help you gain practical skills and familiarity with cdk8s-plone. They are designed to be followed step-by-step and will get you up and running.
|
|
11
|
+
|
|
12
|
+
## What you'll learn
|
|
13
|
+
|
|
14
|
+
These tutorials will teach you how to:
|
|
15
|
+
|
|
16
|
+
- Deploy a basic Plone instance using cdk8s-plone
|
|
17
|
+
- Configure PostgreSQL backend
|
|
18
|
+
- Customize component resources and settings
|
|
19
|
+
- Test your deployment
|
|
20
|
+
|
|
21
|
+
## Available Tutorials
|
|
22
|
+
|
|
23
|
+
```{toctree}
|
|
24
|
+
---
|
|
25
|
+
maxdepth: 1
|
|
26
|
+
titlesonly: true
|
|
27
|
+
---
|
|
28
|
+
01-quick-start
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Before you start
|
|
32
|
+
|
|
33
|
+
These tutorials assume you have:
|
|
34
|
+
- Basic familiarity with Kubernetes concepts
|
|
35
|
+
- Node.js 16+ and npm installed
|
|
36
|
+
- A Kubernetes cluster (local or remote)
|
|
37
|
+
- kubectl configured to access your cluster
|
|
38
|
+
- Basic TypeScript knowledge
|
|
39
|
+
|
|
40
|
+
If you're new to CDK8S, we recommend reading the [CDK8S documentation](https://cdk8s.io/) first to understand how constructs work.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
**Looking for practical guidance?** Check out the [How-To Guides](../how-to/index.md) for specific solutions.
|
|
45
|
+
|
|
46
|
+
**Need technical details?** See the [Reference](../reference/index.md) section for API documentation.
|
|
47
|
+
|
|
48
|
+
**Want to understand the architecture?** Read the [Explanation](../explanation/index.md) section for concepts and design decisions.
|
package/lib/httpcache.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ export interface PloneHttpcacheOptions {
|
|
|
65
65
|
* @default undefined (latest)
|
|
66
66
|
*/
|
|
67
67
|
readonly chartVersion?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Version of the kube-httpcache Container Image to use.
|
|
70
|
+
* If not specified, the latest version from the repository will be used.
|
|
71
|
+
* @default undefined (chartVersion = with each chart release there is an image release too )
|
|
72
|
+
*/
|
|
73
|
+
readonly appVersion?: string;
|
|
68
74
|
/**
|
|
69
75
|
* Number of Varnish pod replicas to run.
|
|
70
76
|
* @default 2
|