Skip to content

Commit e08845f

Browse files
committed
feat: deploying cells in minikube
1 parent 64841e9 commit e08845f

1 file changed

Lines changed: 173 additions & 0 deletions

File tree

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
slug: deploying-cells-v5-in-minikube
3+
title: Deploying Cells in minikube
4+
description: An example of the deployment of cells using helm chart version 1.0.0
5+
language: en
6+
weight: 0
7+
8+
---
9+
10+
A Practical Guide for Testing and Evaluation using the new helm chart `1.0.0-beta`
11+
12+
## 1. Introduction
13+
14+
This article walks you through deploying Pydio Cells v5 on a local Minikube cluster for testing or evaluation purposes.
15+
Version 5 is accompanied by the new Helm chart `1.0.0-beta`, which significantly improves modularity and flexibility.
16+
17+
## 2. Why a New Helm Chart?
18+
19+
### Old Chart: `0.1.3`
20+
21+
* Dependencies (MariaDB, MinIO, Redis, MongoDB...) were **tightly coupled** inside the chart.
22+
* It relied heavily on **Bitnami sub-charts**.
23+
* Hard to replace components, upgrade versions, or adapt to production environments.
24+
25+
### New Chart: `1.0.0-beta`
26+
27+
In the new helm chart, the integrated dependencies are still supported. However, in this tuto, we focus to the deployment using external helm charts for dependencies.
28+
29+
|Service|Purpose|Deployment|
30+
|-|-|-|
31+
|**MariaDB**|Main SQL database |Bitnami chart|
32+
|**Redis**| Cache / KV |Bitnami chart|
33+
|**MinIO**| S3-compatible object storage |MinIO official chart|
34+
|**MongoDB**| Metadata NoSQL store |MongoDB Community Operator|
35+
|**etcd**| Service discovery |Configuration|
36+
|**NATS**| Message broker |NATS official chart|
37+
|**Vault**| Secret store |HashiCorp chart|
38+
|**cert-manager**| Issue TLS certs for all components| Jetstack chart|
39+
40+
## 3. Repository Structure
41+
42+
Source: https://github.com/pydio/cells/tree/v5-dev/tools/kubernetes/examples/minikube
43+
44+
```
45+
cellsv5-on-minikube/
46+
cells/ # Cells Helm values (modular: one file per backend system)
47+
# Dependencies
48+
mariadb/ # MariaDB Helm chart values
49+
redis/ # Redis Helm chart values
50+
minio/ # MinIO Helm chart values
51+
mongodb/ # MongoDB operator + MongoDBCommunity CR
52+
etcd/ # etcd manifest
53+
nats/ # NATS values
54+
cert-manager/ # CA issuer, self-signed root CA, service certificates
55+
```
56+
57+
In the `cellsv5-on-minikube/cells` repository, the main `values.yaml` file of the Cells Helm chart is split into several smaller files. This approach simplifies maintenance, makes configuration easier to understand, and avoids dealing with one excessively large values.yaml file.
58+
59+
## 4. Installation Steps
60+
61+
### 4.1 Start minikube
62+
63+
``` bash
64+
minikube start --cpus=4 --memory=8g
65+
kubectl create namespace cells
66+
```
67+
68+
### 4.2 Add Helm repositories
69+
70+
``` bash
71+
helm repo add bitnami https://charts.bitnami.com/bitnami
72+
helm repo add nats https://nats-io.github.io/k8s/helm/charts
73+
helm repo add mongodb https://mongodb.github.io/helm-charts
74+
helm repo add minio https://charts.min.io/
75+
helm repo add hashicorp https://helm.releases.hashicorp.com
76+
helm repo add jetstack https://charts.jetstack.io
77+
helm repo update
78+
79+
```
80+
81+
## 4.3 Create namespace
82+
83+
```bash
84+
kubectl create namespace cells
85+
```
86+
87+
### 4.4 Install cert-manager (optional)
88+
89+
``` bash
90+
helm upgrade --install cert-manager jetstack/cert-manager -n cert-manager --set installCRDs=true --create-namespace --wait
91+
92+
```
93+
94+
### 4.5 Shared secrets between cells and dependencies
95+
96+
```
97+
# certificates (optional)
98+
kubectl apply -n cells -f cert-manager/selfsigned-issuer.yaml
99+
kubectl apply -n cells -f cert-manager/ca.yaml
100+
kubectl apply -n cells -f cert-manager/mariadb-cert.yaml
101+
102+
# minio secrets
103+
kubectl apply -f minio/minio-root-secret.yaml -n cells
104+
kubectl apply -f minio/minio-user-secret.yaml -n cells
105+
106+
# mariadb secrets
107+
kubectl apply -f mariadb/mariadb-secret.yaml -n cells
108+
109+
# mongodb secrets
110+
k apply -f mongodb/mongodb-cells-secret.yaml -n cells
111+
k apply -f mongodb/mongodb-admin-secret.yaml -n cells
112+
113+
```
114+
115+
### 4.6 Deploy dependencies
116+
117+
```bash
118+
# mariadb
119+
helm upgrade --install my-mariadb bitnami/mariadb -n cells -f mariadb/values.yaml --wait
120+
121+
# redis
122+
helm upgrade --install my-redis bitnami/redis -n cells -f redis/values.yaml --wait
123+
124+
# minio
125+
helm upgrade --install cells-minio minio/minio -n cells -f minio/values.yaml --wait
126+
127+
# mongodb
128+
helm upgrade --install mongodb-operator mongodb/community-operator -n cells --wait
129+
kubectl apply -n cells -f mongodb/values.yaml
130+
131+
# etcd
132+
kubectl apply -n cells -f etcd/values.yaml
133+
134+
# nats
135+
helm upgrade --install nats nats/nats -f nats/values.yaml --namespace cells --wait
136+
137+
# vault
138+
In this docs, we use shipped vault chart
139+
```
140+
141+
## 4.7 Deploy Pydio Cells v5
142+
143+
``` bash
144+
helm upgrade --install cells cells/cells -n cells --devel -f cells/cells.yaml -f cells/sql.yaml -f cells/redis.yaml -f cells/s3.yaml -f cells/discovery.yaml -f cells/nosql.yaml -f cells/broker.yaml -f cells/vault.yaml --wait
145+
```
146+
147+
## 5 Access Cells
148+
149+
```bash
150+
kubectl -n cells port-forward svc/cells 8080:8080
151+
```
152+
153+
Then open: `http://localhost:8080`
154+
155+
## 6 Reset cells deployment
156+
157+
Some resources won't be deleted after `helm uninstall cells -n cells`. You should remove them manually before starting a new deployment
158+
159+
```bash
160+
kubectl delete mutatingwebhookconfiguration cells-vault-agent-injector-cfg
161+
162+
kubectl delete pvc data-cells-vault-0 -n cells
163+
```
164+
165+
## 7 Caveat
166+
167+
- Vault data is not peristed. The master key is lost after a k8s restart. In production, the deployment requires KMS service for vault unsealing process.
168+
- 10 minutes session timeout. You may have this issue when browsing the web page through a URL different from `ReverseProxyURL` which is set in `cells/cells.yaml`.
169+
- All dependencies run in "standalone" mode
170+
- Cells operates with a single pod
171+
- Connections between cells and dependencies are not using TLS
172+
- Mariadb, Redis are deployed using bitnami helm chart with rolling-tag images.
173+
- **minio helm** chart doesn't create standard users correctly. Currently, cells uses **root** account to connect to minio.

0 commit comments

Comments
 (0)