@bluedynamics/cdk8s-plone 0.3.2 → 0.3.4
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 +47 -28
- package/API.md +28 -3
- package/lib/config/plone-vinyl-backend-response.vcl +25 -0
- package/lib/config/plone-vinyl-recv-routing-volto.vcl +21 -0
- package/lib/config/plone-vinyl-recv.vcl +18 -0
- package/{examples/volto → lib}/config/varnish.tpl.vcl +1 -1
- package/lib/httpcache.js +1 -1
- package/lib/imports/vinyl.bluedynamics.eu.d.ts +398 -66
- package/lib/imports/vinyl.bluedynamics.eu.js +169 -17
- package/lib/plone.js +1 -1
- package/lib/vinylcache.d.ts +21 -0
- package/lib/vinylcache.js +21 -2
- package/package.json +3 -2
- package/.claude/claude.md +0 -39
- package/.claude/settings.local.json +0 -31
- package/CLAUDE.md +0 -352
- package/docs/superpowers/plans/2026-06-12-configurable-service-spec.md +0 -608
- package/docs/superpowers/specs/2026-06-12-configurable-service-spec-design.md +0 -192
- package/documentation/Makefile +0 -357
- package/documentation/README.md +0 -284
- package/documentation/mx.ini +0 -3
- package/documentation/sources/_static/logo.svg +0 -79
- package/documentation/sources/conf.py +0 -145
- package/documentation/sources/explanation/architecture.md +0 -336
- package/documentation/sources/explanation/cdk8s-workflow.md +0 -66
- package/documentation/sources/explanation/features.md +0 -374
- package/documentation/sources/explanation/index.md +0 -34
- package/documentation/sources/how-to/backup-and-restore.md +0 -107
- package/documentation/sources/how-to/configure-env-and-secrets.md +0 -184
- package/documentation/sources/how-to/configure-ingress-tls.md +0 -108
- package/documentation/sources/how-to/configure-security-context.md +0 -143
- package/documentation/sources/how-to/deploy-blicca.md +0 -334
- package/documentation/sources/how-to/deploy-volto.md +0 -324
- package/documentation/sources/how-to/deploy-with-httpcache.md +0 -224
- package/documentation/sources/how-to/deploy-with-vinyl-cache.md +0 -273
- package/documentation/sources/how-to/enable-prometheus-monitoring.md +0 -122
- package/documentation/sources/how-to/index.md +0 -85
- package/documentation/sources/how-to/scale-and-high-availability.md +0 -122
- package/documentation/sources/how-to/schedule-pods.md +0 -145
- package/documentation/sources/how-to/setup-prerequisites.md +0 -363
- package/documentation/sources/how-to/troubleshooting.md +0 -113
- package/documentation/sources/how-to/upgrade-and-rollout.md +0 -140
- package/documentation/sources/index.md +0 -109
- package/documentation/sources/reference/api/index.md +0 -40
- package/documentation/sources/reference/configuration-options.md +0 -352
- package/documentation/sources/reference/index.md +0 -41
- package/documentation/sources/tutorials/01-quick-start.md +0 -165
- package/documentation/sources/tutorials/index.md +0 -53
- package/examples/blicca/.env.example +0 -20
- package/examples/blicca/README.md +0 -339
- package/examples/blicca/__snapshots__/main.test.ts.snap +0 -1035
- package/examples/blicca/cdk8s.yaml +0 -6
- package/examples/blicca/config/varnish.tpl.vcl +0 -217
- package/examples/blicca/ingress.ts +0 -217
- package/examples/blicca/jest.config.js +0 -11
- package/examples/blicca/main.test.ts +0 -18
- package/examples/blicca/main.ts +0 -101
- package/examples/blicca/package.json +0 -36
- package/examples/blicca/postgres.cloudnativepg.ts +0 -63
- package/examples/blicca/postgres.plain.ts +0 -115
- package/examples/blicca/tsconfig.json +0 -33
- package/examples/volto/.env.example +0 -21
- package/examples/volto/README.md +0 -292
- package/examples/volto/__snapshots__/main.test.ts.snap +0 -1206
- package/examples/volto/cdk8s.yaml +0 -6
- package/examples/volto/ingress.ts +0 -229
- package/examples/volto/jest.config.js +0 -11
- package/examples/volto/main.test.ts +0 -18
- package/examples/volto/main.ts +0 -105
- package/examples/volto/package.json +0 -36
- package/examples/volto/postgres.cloudnativepg.ts +0 -63
- package/examples/volto/postgres.plain.ts +0 -115
- package/examples/volto/tsconfig.json +0 -33
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
myst:
|
|
3
|
-
html_meta:
|
|
4
|
-
"description": "Deploy your first Plone instance to Kubernetes using cdk8s-plone, from project setup to a running Volto site."
|
|
5
|
-
"property=og:description": "Deploy your first Plone instance to Kubernetes using cdk8s-plone, from project setup to a running Volto site."
|
|
6
|
-
"property=og:title": "Quick start"
|
|
7
|
-
"keywords": "Plone, cdk8s, Kubernetes, tutorial, Volto, getting started"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Quick start
|
|
11
|
-
|
|
12
|
-
This tutorial will guide you through deploying your first Plone instance using cdk8s-plone.
|
|
13
|
-
|
|
14
|
-
## Prerequisites
|
|
15
|
-
|
|
16
|
-
Before you start, ensure you have:
|
|
17
|
-
|
|
18
|
-
- **Node.js 18+** and npm installed
|
|
19
|
-
- **kubectl** configured to access your Kubernetes cluster
|
|
20
|
-
- Basic familiarity with Kubernetes and TypeScript
|
|
21
|
-
- A Kubernetes cluster (local or remote)
|
|
22
|
-
|
|
23
|
-
For detailed prerequisites, see [Setup Prerequisites](../how-to/setup-prerequisites.md).
|
|
24
|
-
|
|
25
|
-
## Step 1: Create a CDK8S project
|
|
26
|
-
|
|
27
|
-
Create a new CDK8S TypeScript project:
|
|
28
|
-
|
|
29
|
-
```shell
|
|
30
|
-
# Create project directory
|
|
31
|
-
mkdir my-plone-deployment
|
|
32
|
-
cd my-plone-deployment
|
|
33
|
-
|
|
34
|
-
# Initialize CDK8S project
|
|
35
|
-
cdk8s init typescript-app
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
This creates a basic CDK8S project structure.
|
|
39
|
-
|
|
40
|
-
## Step 2: Install cdk8s-plone
|
|
41
|
-
|
|
42
|
-
Install the cdk8s-plone library:
|
|
43
|
-
|
|
44
|
-
```shell
|
|
45
|
-
npm install @bluedynamics/cdk8s-plone
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The library is also available for Python via PyPI:
|
|
49
|
-
|
|
50
|
-
```shell
|
|
51
|
-
pip install cdk8s-plone
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Step 3: Create a basic Plone deployment
|
|
55
|
-
|
|
56
|
-
Edit `main.ts` with the following code:
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { App, Chart } from 'cdk8s';
|
|
60
|
-
import { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';
|
|
61
|
-
|
|
62
|
-
const app = new App();
|
|
63
|
-
const chart = new Chart(app, 'PloneDeployment');
|
|
64
|
-
|
|
65
|
-
new Plone(chart, 'my-plone', {
|
|
66
|
-
variant: PloneVariant.VOLTO,
|
|
67
|
-
backend: {
|
|
68
|
-
image: 'plone/plone-backend:6.1.3',
|
|
69
|
-
replicas: 3,
|
|
70
|
-
},
|
|
71
|
-
frontend: {
|
|
72
|
-
image: 'plone/plone-frontend:16.0.0',
|
|
73
|
-
replicas: 2,
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
app.synth();
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
This creates:
|
|
81
|
-
- A Plone backend with 3 replicas
|
|
82
|
-
- A Volto frontend with 2 replicas
|
|
83
|
-
- All necessary Kubernetes services and deployments
|
|
84
|
-
|
|
85
|
-
## Step 4: Generate Kubernetes manifests
|
|
86
|
-
|
|
87
|
-
Generate the Kubernetes manifests:
|
|
88
|
-
|
|
89
|
-
```shell
|
|
90
|
-
cdk8s synth
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
This creates YAML files in the `dist/` directory containing all Kubernetes resources.
|
|
94
|
-
|
|
95
|
-
## Step 5: Deploy to Kubernetes
|
|
96
|
-
|
|
97
|
-
Apply the generated manifests to your cluster:
|
|
98
|
-
|
|
99
|
-
```shell
|
|
100
|
-
kubectl apply -f dist/
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Check the deployment status:
|
|
104
|
-
|
|
105
|
-
```shell
|
|
106
|
-
kubectl get pods
|
|
107
|
-
kubectl get services
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Step 6: Access your Plone site
|
|
111
|
-
|
|
112
|
-
Once all pods are running, access your Plone site:
|
|
113
|
-
|
|
114
|
-
```shell
|
|
115
|
-
# Port-forward to the frontend service
|
|
116
|
-
kubectl port-forward service/my-plone-frontend 3000:3000
|
|
117
|
-
|
|
118
|
-
# Open in browser
|
|
119
|
-
open http://localhost:3000
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Adding HTTP caching (optional)
|
|
123
|
-
|
|
124
|
-
For production deployments, add Varnish HTTP caching:
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
import { PloneHttpcache } from '@bluedynamics/cdk8s-plone';
|
|
128
|
-
|
|
129
|
-
const plone = new Plone(chart, 'my-plone', {
|
|
130
|
-
variant: PloneVariant.VOLTO,
|
|
131
|
-
backend: { image: 'plone/plone-backend:6.1.3' },
|
|
132
|
-
frontend: { image: 'plone/plone-frontend:16.0.0' },
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
new PloneHttpcache(chart, 'cache', {
|
|
136
|
-
plone: plone,
|
|
137
|
-
existingSecret: 'varnish-secret',
|
|
138
|
-
replicas: 2,
|
|
139
|
-
});
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
This adds a Varnish caching layer with cluster-wide cache invalidation using [kube-httpcache](https://github.com/mittwald/kube-httpcache).
|
|
143
|
-
|
|
144
|
-
## Next steps
|
|
145
|
-
|
|
146
|
-
Now that you have a basic Plone deployment:
|
|
147
|
-
|
|
148
|
-
- **Configure resources**: See {doc}`/reference/configuration-options` for CPU and memory options.
|
|
149
|
-
- **Add monitoring**: Follow {doc}`/how-to/enable-prometheus-monitoring`.
|
|
150
|
-
- **Explore variants**: Read about Volto and Blicca in {doc}`/explanation/features`.
|
|
151
|
-
- **Harden pods**: Apply {doc}`/how-to/configure-security-context`.
|
|
152
|
-
|
|
153
|
-
## Troubleshooting
|
|
154
|
-
|
|
155
|
-
**Pods not starting?**
|
|
156
|
-
- Check pod logs: `kubectl logs <pod-name>`
|
|
157
|
-
- Verify images are accessible: `kubectl describe pod <pod-name>`
|
|
158
|
-
|
|
159
|
-
**Can't access the site?**
|
|
160
|
-
- Ensure port-forward is running
|
|
161
|
-
- Check service endpoints: `kubectl get endpoints`
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
**Complete example**: See the [cdk8s-plone-example](https://github.com/bluedynamics/cdk8s-plone-example) repository for a full working example.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
myst:
|
|
3
|
-
html_meta:
|
|
4
|
-
"description": "Learning-oriented tutorials that guide you through using cdk8s-plone to deploy Plone CMS on Kubernetes."
|
|
5
|
-
"property=og:description": "Learning-oriented tutorials that guide you through using cdk8s-plone to deploy Plone CMS on Kubernetes."
|
|
6
|
-
"property=og:title": "Tutorials"
|
|
7
|
-
"keywords": "Plone, cdk8s, Kubernetes, tutorials, getting started"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Tutorials
|
|
11
|
-
|
|
12
|
-
**Learning-oriented guides that take you through a series of steps to complete a project.**
|
|
13
|
-
|
|
14
|
-
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.
|
|
15
|
-
|
|
16
|
-
## What you'll learn
|
|
17
|
-
|
|
18
|
-
The quick start teaches you how to:
|
|
19
|
-
|
|
20
|
-
- Define a Plone deployment with the `Plone` construct
|
|
21
|
-
- Synthesize Kubernetes manifests with `cdk8s synth`
|
|
22
|
-
- Apply the manifests and reach the running site
|
|
23
|
-
|
|
24
|
-
For tasks beyond the first deployment, such as configuring a database, caching, or scaling, see the {doc}`/how-to/index`.
|
|
25
|
-
|
|
26
|
-
## Available tutorials
|
|
27
|
-
|
|
28
|
-
```{toctree}
|
|
29
|
-
---
|
|
30
|
-
maxdepth: 1
|
|
31
|
-
titlesonly: true
|
|
32
|
-
---
|
|
33
|
-
01-quick-start
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Before you start
|
|
37
|
-
|
|
38
|
-
These tutorials assume you have:
|
|
39
|
-
- Basic familiarity with Kubernetes concepts
|
|
40
|
-
- Node.js 18+ and npm installed
|
|
41
|
-
- A Kubernetes cluster (local or remote)
|
|
42
|
-
- kubectl configured to access your cluster
|
|
43
|
-
- Basic TypeScript knowledge
|
|
44
|
-
|
|
45
|
-
If you're new to CDK8S, we recommend reading the [CDK8S documentation](https://cdk8s.io/) first to understand how constructs work.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
**Looking for practical guidance?** Check out the [How-To Guides](../how-to/index.md) for specific solutions.
|
|
50
|
-
|
|
51
|
-
**Need technical details?** See the [Reference](../reference/index.md) section for API documentation.
|
|
52
|
-
|
|
53
|
-
**Want to understand the architecture?** Read the [Explanation](../explanation/index.md) section for concepts and design decisions.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# This file contains the environment variables for the project.
|
|
2
|
-
# Copy this file to .env and adjust the values as needed.
|
|
3
|
-
# The variables are loaded when "cdk8s synth" is called.
|
|
4
|
-
|
|
5
|
-
# Configure domain names
|
|
6
|
-
DOMAIN_CACHED=plone.example.com
|
|
7
|
-
DOMAIN_UNCACHED=plone-test.example.com
|
|
8
|
-
DOMAIN_MAINTENANCE=plone-admin.example.com
|
|
9
|
-
|
|
10
|
-
# Cluster issuer to use (cert-manager ClusterIssuer for TLS certificates)
|
|
11
|
-
CLUSTER_ISSUER=letsencrypt-prod
|
|
12
|
-
|
|
13
|
-
# Configure the Plone backend image
|
|
14
|
-
# Leave commented to use default (official Plone image)
|
|
15
|
-
#PLONE_BACKEND_IMAGE=plone/plone-backend:6.1.3
|
|
16
|
-
|
|
17
|
-
# Configure database backend
|
|
18
|
-
# Options: 'plain' (default, operator-free single instance) or
|
|
19
|
-
# 'cloudnativepg' (production HA, requires the CloudNativePG operator)
|
|
20
|
-
DATABASE=plain
|
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
# Blicca Example
|
|
2
|
-
|
|
3
|
-
This example demonstrates a **production-ready Plone Blicca deployment** using the [@bluedynamics/cdk8s-plone](https://www.npmjs.com/package/@bluedynamics/cdk8s-plone) TypeScript package.
|
|
4
|
-
|
|
5
|
-
> **Note:** Blicca is the new name for what was formerly called Plone "Classic UI".
|
|
6
|
-
|
|
7
|
-
## What is Plone Blicca?
|
|
8
|
-
|
|
9
|
-
Blicca is the server-side rendered UI of Plone CMS: the Plone backend renders the HTML and serves it directly. Unlike Volto (a separate React single-page frontend talking to the REST API), Blicca needs no separate frontend service:
|
|
10
|
-
|
|
11
|
-
- **Server-side rendering** - All pages rendered by Plone/Zope
|
|
12
|
-
- **Simpler architecture** - Single backend service (no separate frontend)
|
|
13
|
-
- **Full Plone features** - Complete access to all Plone functionality
|
|
14
|
-
|
|
15
|
-
**When to use Blicca:**
|
|
16
|
-
- You want a single backend service without a separate frontend deployment
|
|
17
|
-
- Migration from older Plone versions (keeping the familiar server-rendered UX)
|
|
18
|
-
- Projects requiring Blicca-specific add-ons
|
|
19
|
-
|
|
20
|
-
**When to use Volto instead:** See the [volto](../volto/) example for the React single-page frontend approach.
|
|
21
|
-
|
|
22
|
-
## Features
|
|
23
|
-
|
|
24
|
-
This example includes:
|
|
25
|
-
|
|
26
|
-
- **Plone 6.1 with Blicca** (server-side rendering)
|
|
27
|
-
- **PostgreSQL with RelStorage** - Choose between:
|
|
28
|
-
- Plain single-instance PostgreSQL using the official `postgres` image (default, operator-free, for dev and small setups)
|
|
29
|
-
- [CloudNativePG](https://cloudnative-pg.io/) (CNCF project, production-ready with HA)
|
|
30
|
-
- **HTTP Caching with Varnish** - Using [kube-httpcache](https://github.com/mittwald/kube-httpcache)
|
|
31
|
-
- **Ingress** - Supports both Traefik and Kong with TLS/cert-manager
|
|
32
|
-
- **Three access domains**:
|
|
33
|
-
- Cached (public, via Varnish)
|
|
34
|
-
- Uncached (testing, direct to backend)
|
|
35
|
-
- Maintenance (backend access with virtual hosting)
|
|
36
|
-
|
|
37
|
-
## Prerequisites
|
|
38
|
-
|
|
39
|
-
### Node.js Setup
|
|
40
|
-
|
|
41
|
-
Configure Node.js:
|
|
42
|
-
```bash
|
|
43
|
-
nvm use lts/*
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Install dependencies:
|
|
47
|
-
```bash
|
|
48
|
-
npm install
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Kubernetes Cluster Requirements
|
|
52
|
-
|
|
53
|
-
Your cluster needs:
|
|
54
|
-
|
|
55
|
-
1. **PostgreSQL** (choose one):
|
|
56
|
-
- **Plain** (default, no operator needed): the example deploys a single-instance PostgreSQL StatefulSet using the official `postgres` image, so there is nothing to install.
|
|
57
|
-
- **CloudNativePG** (recommended for production HA): install the operator
|
|
58
|
-
```bash
|
|
59
|
-
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.24/releases/cnpg-1.24.0.yaml
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
2. **Ingress Controller** (choose one):
|
|
63
|
-
- Traefik v3 with CRDs installed
|
|
64
|
-
- Kong Gateway
|
|
65
|
-
|
|
66
|
-
3. **cert-manager** (for TLS certificates):
|
|
67
|
-
```bash
|
|
68
|
-
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.0/cert-manager.yaml
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
4. **kube-httpcache Operator** (for Varnish caching):
|
|
72
|
-
```bash
|
|
73
|
-
kubectl apply -f https://github.com/mittwald/kube-httpcache/releases/latest/download/kube-httpcache.yaml
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Usage
|
|
77
|
-
|
|
78
|
-
### 1. Import CRDs
|
|
79
|
-
|
|
80
|
-
Import the required Custom Resource Definitions:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm run import
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
This will generate TypeScript bindings in `./imports/` for:
|
|
87
|
-
- Kubernetes core API
|
|
88
|
-
- Traefik IngressRoute CRDs
|
|
89
|
-
- CloudNativePG Cluster CRDs
|
|
90
|
-
|
|
91
|
-
### 2. Configure Environment
|
|
92
|
-
|
|
93
|
-
Create a `.env` file (copy from `.env.example`):
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# Domain names
|
|
97
|
-
DOMAIN_CACHED=plone.example.com
|
|
98
|
-
DOMAIN_UNCACHED=plone-test.example.com
|
|
99
|
-
DOMAIN_MAINTENANCE=plone-admin.example.com
|
|
100
|
-
|
|
101
|
-
# TLS certificate issuer (cert-manager ClusterIssuer)
|
|
102
|
-
CLUSTER_ISSUER=letsencrypt-prod
|
|
103
|
-
|
|
104
|
-
# Plone backend image (defaults to official image if not set)
|
|
105
|
-
PLONE_BACKEND_IMAGE=plone/plone-backend:6.1.3
|
|
106
|
-
|
|
107
|
-
# Database backend: 'plain' (default) or 'cloudnativepg'
|
|
108
|
-
DATABASE=plain
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### 3. Generate Kubernetes Manifests
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
npm run synth
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
This generates `dist/plone-blicca.k8s.yaml` with all Kubernetes resources.
|
|
118
|
-
|
|
119
|
-
### 4. Deploy to Kubernetes
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
kubectl apply -f dist/plone-blicca.k8s.yaml
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Or deploy to a specific namespace:
|
|
126
|
-
```bash
|
|
127
|
-
kubectl apply -f dist/plone-blicca.k8s.yaml -n plone
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Blicca vs Volto
|
|
131
|
-
|
|
132
|
-
| Feature | Blicca | Volto |
|
|
133
|
-
|---------|-----------|-------|
|
|
134
|
-
| **Architecture** | Single backend service | Separate frontend + backend |
|
|
135
|
-
| **Rendering** | Server-side (Zope) | Client-side (React) |
|
|
136
|
-
| **Performance** | Good with caching | Excellent (SPA) |
|
|
137
|
-
| **Deployment** | Simpler | More complex |
|
|
138
|
-
| **Add-ons** | Full Blicca support | Volto-specific needed |
|
|
139
|
-
| **Best for** | Single-service setups, migrations | API-first projects, SPA frontends |
|
|
140
|
-
|
|
141
|
-
## Architecture
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
┌─────────────────┐
|
|
145
|
-
│ cert-manager │
|
|
146
|
-
│ (TLS Certs) │
|
|
147
|
-
└────────┬────────┘
|
|
148
|
-
│
|
|
149
|
-
┌──────────────────┐ ┌────▼────────────┐
|
|
150
|
-
│ External │───▶│ Ingress │
|
|
151
|
-
│ Traffic │ │ (Traefik/Kong) │
|
|
152
|
-
└──────────────────┘ └────┬─────┬──────┘
|
|
153
|
-
│ │
|
|
154
|
-
┌──────────────┘ └──────────────┐
|
|
155
|
-
│ │
|
|
156
|
-
┌─────────▼─────────┐ ┌─────────▼─────────┐
|
|
157
|
-
│ HTTP Cache │ │ Plone Backend │
|
|
158
|
-
│ (Varnish) │ │ (Blicca) │
|
|
159
|
-
└─────────┬─────────┘ │ │
|
|
160
|
-
│ └─────────┬─────────┘
|
|
161
|
-
│ │
|
|
162
|
-
└──────────────┬───────────────────┘
|
|
163
|
-
│
|
|
164
|
-
┌─────────▼─────────┐
|
|
165
|
-
│ PostgreSQL │
|
|
166
|
-
│ (RelStorage) │
|
|
167
|
-
└───────────────────┘
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Database Options
|
|
171
|
-
|
|
172
|
-
### CloudNativePG (Production)
|
|
173
|
-
|
|
174
|
-
**Pros:**
|
|
175
|
-
- CNCF Sandbox project (Cloud Native Computing Foundation)
|
|
176
|
-
- Built-in high availability (2 instances)
|
|
177
|
-
- Automated backups and point-in-time recovery
|
|
178
|
-
- Monitoring and observability
|
|
179
|
-
- Connection pooling support
|
|
180
|
-
- Modern, actively maintained
|
|
181
|
-
|
|
182
|
-
**Configuration:**
|
|
183
|
-
```bash
|
|
184
|
-
DATABASE=cloudnativepg
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Plain PostgreSQL (default, operator-free)
|
|
188
|
-
|
|
189
|
-
**Pros:**
|
|
190
|
-
- No operator and no third-party Helm chart required
|
|
191
|
-
- Uses the official `postgres` image, which is actively maintained
|
|
192
|
-
- Single-instance StatefulSet with a PersistentVolumeClaim
|
|
193
|
-
- Good for development and small production setups
|
|
194
|
-
|
|
195
|
-
**Cons:**
|
|
196
|
-
- No built-in high availability, failover, or automated backups
|
|
197
|
-
|
|
198
|
-
**Configuration:**
|
|
199
|
-
```bash
|
|
200
|
-
DATABASE=plain
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Secrets:** the example creates a Secret with `username`, `password`, and `database` keys.
|
|
204
|
-
|
|
205
|
-
## Development
|
|
206
|
-
|
|
207
|
-
### Build and Test
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
# Compile TypeScript
|
|
211
|
-
npm run compile
|
|
212
|
-
|
|
213
|
-
# Run tests
|
|
214
|
-
npm test
|
|
215
|
-
|
|
216
|
-
# Update test snapshots
|
|
217
|
-
npm run test-update
|
|
218
|
-
|
|
219
|
-
# Full build (compile + test + synth)
|
|
220
|
-
npm run build
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Watch Mode
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
npm run watch
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Customization
|
|
230
|
-
|
|
231
|
-
### Changing Plone Configuration
|
|
232
|
-
|
|
233
|
-
Edit [main.ts](main.ts) to customize:
|
|
234
|
-
- RelStorage settings (cache sizes, blob mode)
|
|
235
|
-
- Resource limits
|
|
236
|
-
- Environment variables
|
|
237
|
-
- Number of replicas
|
|
238
|
-
|
|
239
|
-
### Modifying Varnish Caching
|
|
240
|
-
|
|
241
|
-
Edit [config/varnish.tpl.vcl](config/varnish.tpl.vcl) to customize:
|
|
242
|
-
- Cache rules
|
|
243
|
-
- Authentication handling
|
|
244
|
-
- PURGE/BAN configurations
|
|
245
|
-
|
|
246
|
-
### Ingress Configuration
|
|
247
|
-
|
|
248
|
-
Edit [ingress.ts](ingress.ts) to:
|
|
249
|
-
- Add/modify domain routes
|
|
250
|
-
- Change TLS settings
|
|
251
|
-
- Customize path rewrites
|
|
252
|
-
- Add middleware
|
|
253
|
-
|
|
254
|
-
## Accessing Your Plone Site
|
|
255
|
-
|
|
256
|
-
After deployment, you can access your Plone Blicca site at:
|
|
257
|
-
|
|
258
|
-
- **Cached (public)**: https://plone.example.com (via Varnish)
|
|
259
|
-
- **Uncached (testing)**: https://plone-test.example.com (direct to backend)
|
|
260
|
-
- **Maintenance**: https://plone-admin.example.com (backend access)
|
|
261
|
-
|
|
262
|
-
### Creating a Plone Site
|
|
263
|
-
|
|
264
|
-
On first access, you'll need to create a Plone site:
|
|
265
|
-
|
|
266
|
-
1. Access the maintenance domain: https://plone-admin.example.com
|
|
267
|
-
2. Click "Create a new Plone site"
|
|
268
|
-
3. Fill in the form:
|
|
269
|
-
- **Site ID**: Plone (default)
|
|
270
|
-
- **Title**: Your Site Title
|
|
271
|
-
- **Language**: Choose your language
|
|
272
|
-
- **Add-ons**: Select any add-ons you need
|
|
273
|
-
4. Click "Create Plone Site"
|
|
274
|
-
|
|
275
|
-
## Troubleshooting
|
|
276
|
-
|
|
277
|
-
### Check Pod Status
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
kubectl get pods -l app.kubernetes.io/part-of=plone
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### View Logs
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
# Backend logs
|
|
287
|
-
kubectl logs -l app.kubernetes.io/name=plone-backend -f
|
|
288
|
-
|
|
289
|
-
# Varnish cache logs
|
|
290
|
-
kubectl logs -l app.kubernetes.io/name=plone-httpcache -f
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Database Connection Issues
|
|
294
|
-
|
|
295
|
-
**CloudNativePG:**
|
|
296
|
-
```bash
|
|
297
|
-
# Check cluster status
|
|
298
|
-
kubectl get cluster
|
|
299
|
-
|
|
300
|
-
# Check secret
|
|
301
|
-
kubectl get secret -l cnpg.io/cluster
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
**Plain PostgreSQL:**
|
|
305
|
-
```bash
|
|
306
|
-
# Check the StatefulSet and pod
|
|
307
|
-
kubectl get statefulset -l app.kubernetes.io/name=plone-postgresql
|
|
308
|
-
kubectl get pods -l app.kubernetes.io/name=plone-postgresql
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
### Access Logs
|
|
312
|
-
|
|
313
|
-
```bash
|
|
314
|
-
# Get all Plone-related resources
|
|
315
|
-
kubectl get all -l app.kubernetes.io/part-of=plone
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
## Migrating from Blicca to Volto
|
|
319
|
-
|
|
320
|
-
If you later want to migrate to Volto:
|
|
321
|
-
|
|
322
|
-
1. See the [volto](../volto/) example
|
|
323
|
-
2. Keep the same backend configuration (database, caching)
|
|
324
|
-
3. Add Volto frontend deployment
|
|
325
|
-
4. Update ingress to route to frontend
|
|
326
|
-
5. Both UIs can run simultaneously during migration
|
|
327
|
-
|
|
328
|
-
## References
|
|
329
|
-
|
|
330
|
-
- [cdk8s-plone Documentation](https://bluedynamics.github.io/cdk8s-plone/)
|
|
331
|
-
- [Plone 6 Documentation](https://6.docs.plone.org/)
|
|
332
|
-
- [Plone Classic UI Guide](https://6.docs.plone.org/classic-ui/) (upstream docs; Blicca is the new name for Classic UI)
|
|
333
|
-
- [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/)
|
|
334
|
-
- [CDK8S Documentation](https://cdk8s.io/)
|
|
335
|
-
- [Varnish Documentation](https://varnish-cache.org/docs/)
|
|
336
|
-
|
|
337
|
-
## License
|
|
338
|
-
|
|
339
|
-
Apache-2.0
|