Repository navigation
feat(#1943): migrating from 4.x medic/helm-charts to 5.x cht-core helm-charts #1989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
ddd87a8
first version with breaking changes
lorerod e8cc4ce
fix content
lorerod fb25939
improve CHT 4.x to 5.x migration guide after local k3s testing
lorerod a9565fa
improve overview
lorerod 6848986
remove warning
lorerod 039f202
remove warning
lorerod e99d1f3
improve title
lorerod 72bd771
use native hextra steps
lorerod c8d6c50
condense breaking changes section into a reference table
lorerod 6c4b5b1
remove unnecessary directory navigation from migration steps
lorerod 999c763
add Hextra tabs
lorerod f2f5f35
set preExistingDataAvailable to false
lorerod 42c6263
calm down the formatting
lorerod 14552ff
calm down the formatting
lorerod 1533c25
remove redundant statement
lorerod 6002e97
be clear about the edit step
lorerod 1f86f56
remove quoted and add indent
lorerod cd6187a
be consistent with the use of --namespace
lorerod baa3230
be consistent with the use of --namespace
lorerod d076a61
be consistent with the use of --namespace
lorerod 3a9a196
Update content/en/hosting/cht/migration/helm-charts-4x-to-5x-migratio…
lorerod be684e3
remove quotes
lorerod 1cded21
calm down the formatting
lorerod d2b17b4
merge overview
lorerod 0a0a731
calm down the formatting
lorerod e8573a9
calm down the formatting
lorerod 6bd500a
calm down the formatting
lorerod 5a9351d
fix tabbed section broken by the indent
lorerod 1b0cc8f
clarify clustering configuration and fix boolean type issue
lorerod 9212e6d
cleanup booleans
lorerod 3247c53
line up the numbering
lorerod 9dccc2f
line up the numbering
lorerod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
162 changes: 162 additions & 0 deletions
162
content/en/hosting/cht/migration/helm-charts-4x-to-5x-migration.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| # CHT 4.x to 5.x Helm Charts Migration Guide | ||
|
|
||
| ## Overview | ||
|
|
||
| This guide covers the migration from 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. | ||
|
|
||
| ## Breaking Changes | ||
|
|
||
| The following breaking changes require updates to your existing `values.yaml` files. | ||
|
|
||
| ### Critical Breaking Changes (Must Fix) | ||
|
|
||
| #### 1. Field Name Changes | ||
|
|
||
| | Old (4.x) | New (5.x) | Impact | | ||
| |-----------|-----------|---------| | ||
| | `clusteredCouch_enabled` | `couchdb.clusteredCouchEnabled` | **CRITICAL** - Must be updated | | ||
| | `local.diskPath` | `local_storage.preExistingDiskPath-1` | **CRITICAL** - Must be updated | | ||
|
|
||
| #### 2. New Required Fields | ||
|
|
||
| | Field | Value | Impact | | ||
| |-------|-------|---------| | ||
| | `api.service.type` | `ClusterIP` | **CRITICAL** - Must be added to values file | | ||
| | `preExistingDataAvailable` | `"true"` | **CRITICAL** - Must be set for existing deployments | | ||
|
|
||
| #### 3. Storage Configuration Changes | ||
|
|
||
| | Change | Impact | | ||
| |--------|---------| | ||
| | **Removed default storage sizes** | **CRITICAL** - Must explicitly set `couchdb.couchdb_node_storage_size` | | ||
| | **No default persistent volume sizes** | **CRITICAL** - Must set platform-specific storage sizes | | ||
|
|
||
| #### 4. Values File Structure Changes | ||
|
|
||
| | Change | Impact | | ||
| |--------|---------| | ||
| | **Hierarchical structure** | **MEDIUM** - May need to restructure flat values files | | ||
| | **Nested couchdb configuration** | **MEDIUM** - CouchDB settings now under `couchdb:` section | | ||
|
|
||
| ### Platform-Specific Storage Changes | ||
|
|
||
| #### GKE (Google Kubernetes Engine) | ||
| - **Required**: `couchdb.persistent_disk.size` (no default) | ||
|
|
||
| #### EKS (Amazon Elastic Kubernetes Service) | ||
| - **Required**: `ebs.preExistingEBSVolumeSize` (no default) | ||
|
|
||
| ### Minor Changes | ||
|
|
||
| #### Storage Class Changes | ||
| - **K3s-K3d Storage Class**: `local-storage` (4.x) → `local-path` (5.x) - **MINOR CHANGE** | ||
| - **Action Required**: Update K3s-K3d storage class if using defaults | ||
|
|
||
| ### 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) | ||
|
|
||
| ## Migration Steps | ||
|
|
||
| {{% steps %}} | ||
|
|
||
| ### Step 1: Prepare Migration Values File | ||
|
lorerod marked this conversation as resolved.
|
||
|
|
||
| 1. **Get current values** from your existing 4.x deployment: | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ```bash | ||
| helm get values <your-release-name> -n <your-namespace> > migration-5x-values.yaml | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
|
lorerod marked this conversation as resolved.
|
||
| 2. **Apply breaking changes** to your values file: | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
|
|
||
| #### Critical Changes (Must Apply) | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ```yaml | ||
| # Change field names | ||
| couchdb: | ||
| clusteredCouchEnabled: false # was: clusteredCouch_enabled: false | ||
|
|
||
| # Set pre-existing data flag in the case this is a migration | ||
| preExistingDataAvailable: "true" | ||
|
|
||
| # Add required API service configuration | ||
| api: | ||
| service: | ||
| type: ClusterIP | ||
|
|
||
| # Update image versions to 5.x | ||
| chtversion: "5.0.0" # or "master" for latest development | ||
| cht_image_tag: "5.0.0" # or "master" for latest development | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| #### Platform-Specific Storage Configuration | ||
|
lorerod marked this conversation as resolved.
Outdated
lorerod marked this conversation as resolved.
Outdated
|
||
|
|
||
| **For GKE:** | ||
| ```yaml | ||
| couchdb: | ||
| persistent_disk: | ||
| size: "<size>" # Set appropriate size for your needs | ||
| ``` | ||
|
|
||
| **For EKS:** | ||
| ```yaml | ||
| ebs: | ||
| preExistingEBSVolumeSize: "<size>" # Set appropriate size for your needs | ||
| ``` | ||
|
|
||
| **For K3s-K3d:** | ||
| ```yaml | ||
| couchdb: | ||
| storage_class: "local-path" # was: "local-storage" | ||
| ``` | ||
|
|
||
| ### Step 2: Perform the Migration | ||
|
|
||
| 1. **Navigate to your 4.x helm chart directory**: | ||
| ```bash | ||
| cd /path/to/your/4x/helm/charts | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| 2. **Run the migration upgrade**: | ||
| ```bash | ||
| helm upgrade <your-release-name> /path/to/cht-core/scripts/build/helm \ | ||
| -f migration-5x-values.yaml \ | ||
| --namespace <your-namespace> | ||
| ``` | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
|
|
||
| 3. **Monitor the upgrade**: | ||
| ```bash | ||
| helm status <your-release-name> --namespace <your-namespace> | ||
| kubectl get pods -n <your-namespace> | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| ### Step 3: Verify Migration Success | ||
|
|
||
| 1. **Check pod status**: | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ```bash | ||
| kubectl get pods -n <your-namespace> | ||
| ``` | ||
|
|
||
| 2. **Verify new 5.x components**: | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ```bash | ||
| # Look for the new couchdb-nouveau component | ||
| kubectl get pods -n <your-namespace> | grep nouveau | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| 3. **Test data integrity** | ||
|
|
||
| 4. **Test application access** | ||
|
lorerod marked this conversation as resolved.
Outdated
|
||
|
|
||
| {{% /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 | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.