Skip to content
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ddd87a8
first version with breaking changes
lorerod Sep 12, 2025
e8cc4ce
fix content
lorerod Sep 12, 2025
fb25939
improve CHT 4.x to 5.x migration guide after local k3s testing
lorerod Sep 15, 2025
a9565fa
improve overview
lorerod Sep 15, 2025
6848986
remove warning
lorerod Sep 15, 2025
039f202
remove warning
lorerod Sep 15, 2025
e99d1f3
improve title
lorerod Sep 15, 2025
72bd771
use native hextra steps
lorerod Sep 16, 2025
c8d6c50
condense breaking changes section into a reference table
lorerod Sep 23, 2025
6c4b5b1
remove unnecessary directory navigation from migration steps
lorerod Sep 23, 2025
999c763
add Hextra tabs
lorerod Sep 23, 2025
f2f5f35
set preExistingDataAvailable to false
lorerod Sep 23, 2025
42c6263
calm down the formatting
lorerod Oct 8, 2025
14552ff
calm down the formatting
lorerod Oct 8, 2025
1533c25
remove redundant statement
lorerod Oct 8, 2025
6002e97
be clear about the edit step
lorerod Oct 8, 2025
1f86f56
remove quoted and add indent
lorerod Oct 8, 2025
cd6187a
be consistent with the use of --namespace
lorerod Oct 8, 2025
baa3230
be consistent with the use of --namespace
lorerod Oct 8, 2025
d076a61
be consistent with the use of --namespace
lorerod Oct 8, 2025
3a9a196
Update content/en/hosting/cht/migration/helm-charts-4x-to-5x-migratio…
lorerod Oct 8, 2025
be684e3
remove quotes
lorerod Oct 8, 2025
1cded21
calm down the formatting
lorerod Oct 8, 2025
d2b17b4
merge overview
lorerod Oct 8, 2025
0a0a731
calm down the formatting
lorerod Oct 8, 2025
e8573a9
calm down the formatting
lorerod Oct 8, 2025
6bd500a
calm down the formatting
lorerod Oct 8, 2025
5a9351d
fix tabbed section broken by the indent
lorerod Oct 8, 2025
1b0cc8f
clarify clustering configuration and fix boolean type issue
lorerod Oct 13, 2025
9212e6d
cleanup booleans
lorerod Oct 23, 2025
3247c53
line up the numbering
lorerod Oct 23, 2025
9dccc2f
line up the numbering
lorerod Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions content/en/hosting/cht/migration/helm-charts-4x-to-5x-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# CHT 4.x to 5.x Helm Charts Migration Guide

## Overview

This guide covers the migration of Kubernetes based CHT 4.x deployments using the [legacy Helm charts](https://github.com/medic/helm-charts) to the [new charts](https://github.com/medic/cht-core/tree/master/scripts/build/helm) introduced in CHT 5.x. The new Helm chart require updates to your `values.yaml` file.

Before starting be sure you have a `git clone` of the [CHT Core repository](https://github.com/medic/cht-core/) and that you have updated it with `git pull origin` to ensure you have the latest changes locally.

## Migration Steps

{{% steps %}}

### Step 1: Prepare Migration Values File
Comment thread
lorerod marked this conversation as resolved.
Resolved

1. Export the values from your existing 4.x deployment into the `migration-5x-values.yaml` file:
```bash
helm get values <your-release-name> --namespace <your-namespace> > migration-5x-values.yaml
```
2. Be sure all booleans are unquoted by running these two `sed` commands which will correct them in the `migration-5x-values.yaml` file:

```
sed -i 's/: "false"/: false/g' migration-5x-values.yaml
sed -i 's/: "true"/: true/g' migration-5x-values.yaml
```


Comment thread
lorerod marked this conversation as resolved.
Resolved
3. Update the `migration-5x-values.yaml` file to be compliant with 5.x deployment requirements:

```yaml
# Change field names - keep the same true/false value from your 4.x deployment
# Use true for multi-node deployments, false for single-node deployments
couchdb:
clusteredCouchEnabled: false # was: clusteredCouch_enabled: false

# For most migrations, use false. Use true for pre-created volumes for provisioning
couchdb_data:
preExistingDataAvailable: false # Keep using dynamic storage provisioning

# Add required API service configuration
api:
service:
type: ClusterIP

# Update image versions to 5.x
chtversion: 5.0.0
cht_image_tag: 5.0.0
```

4. Depending on the hosting environment, make a final edit to `migration-5x-values.yaml` file:

{{< tabs items="GKE,EKS,K3s-K3d" >}}

{{< tab >}}
```yaml
couchdb:
persistent_disk:
size: <size> # Set appropriate size for your needs
```
{{< /tab >}}

{{< tab >}}
```yaml
ebs:
preExistingEBSVolumeSize: <size> # Set appropriate size for your needs
```
{{< /tab >}}

{{< tab >}}
```yaml
couchdb:
storage_class: local-path # was: "local-storage"
```
{{< /tab >}}

{{< /tabs >}}

### Step 2: Perform the Migration

1. Upgrade the helm deployment form same directory as `migration-5x-values.yaml`. As well, update `/path/to/cht-core` to be the location where CHT Core repo is checked out:
```bash
helm upgrade <your-release-name> /path/to/cht-core/scripts/build/helm \
-f migration-5x-values.yaml \
--namespace <your-namespace>
```

2. **Monitor the upgrade**:
```bash
helm status <your-release-name> --namespace <your-namespace>
kubectl get pods--namespace <your-namespace>
```

### Step 3: Verify Migration Success

1. Check pod status:
```bash
kubectl get pods -n <your-namespace>
```

2. Verify new 5.x components:
```bash
# Look for the new couchdb-nouveau component
kubectl get pods --namespace <your-namespace> | grep nouveau
```

3. Test data integrity

4. Test application access

{{% /steps %}}

## Best Practices

1. **Test First**: Always test migrations in a non-production environment
2. **Backup Data**: Ensure complete data backup before migration
3. **Monitor Closely**: Watch deployment logs and metrics during migration
4. **Document Changes**: Keep track of any custom configurations
5. **Plan Downtime**: Schedule migrations during maintenance windows

## Breaking Changes Reference

| Change Type | Old (4.x) | New (5.x) | Platform | Impact |
|-------------|-----------|-----------|----------|---------|
| Field Rename | `clusteredCouch_enabled` | `couchdb.clusteredCouchEnabled` | All | Critical |
| Field Rename | `local.diskPath` | `local_storage.preExistingDiskPath-1` | All | Critical |
| New Field | - | `api.service.type: ClusterIP` | All | Critical |
| Storage Config | Default sizes | `couchdb.couchdb_node_storage_size` required | All | Critical |
| Storage Config | Default sizes | `couchdb.persistent_disk.size` required | GKE | Critical |
| Storage Config | Default sizes | `ebs.preExistingEBSVolumeSize` required | EKS | Critical |
| Storage Class | `local-storage` | `local-path` | K3s-K3d | Minor |
| Structure | Flat config | Nested couchdb configuration | All | Medium |

## Getting Help

If you encounter issues during migration:

1. Check the [CHT Documentation](https://docs.communityhealthtoolkit.org/)
2. Review the [CHT Forum](https://forum.communityhealthtoolkit.org/)
3. Open an issue in the [CHT Core Repository](https://github.com/medic/cht-core/issues)