Skip to content

fix: refactor upgrade commands #490

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
51 changes: 0 additions & 51 deletions docs/technical/technical/deployment-guide/upgrade-commands.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ This document provides instructions on how to upgrade existing Mojaloop installa
- [2. Target version has datastore breaking changes](#2-target-version-has-datastore-breaking-changes)
- [Mojaloop installed with backend dependencies](#mojaloop-installed-with-backend-dependencies)
- [Example Blue-green style deployment](#example-blue-green-style-deployment)
- [Upgrade Commands](#upgrade-commands)
- [Upgrade to v17.0.0](#upgrade-to-v17.0.0)
- [Testing the upgrade scenario from v16.0.0 to v17.0.0](#testing-the-upgrade-scenario-from-v16.0.0-to-v17.0.0)

## Helm Upgrades

Expand Down Expand Up @@ -138,3 +141,48 @@ Manual data migrating from the existing datastores to the new target backend dep
3. Ensure Migration process is fully in-sync from Green to Blue
4. Execute sanity tests on the Blue Target deployment environment
5. Cut-over API Gateway (or upgrade target Ingress rules) to from Green Current to Blue Target deployment environment


## Upgrade Commands

This document provides commands to upgrade existing Mojaloop installations. It assumes that Mojaloop is already installed using Helm.

### Upgrade to v17.0.0

1. Upgrade the backend dependencies
```bash
helm upgrade backend mojaloop/example-mojaloop-backend --namespace ${NAMESPACE} --version v17.0.0 -f ${VALUES_FILE}
```
2. Install the mojaloop services
```bash
helm install moja mojaloop/mojaloop --namespace ${NAMESPACE} --version v17.0.0 -f ${VALUES_FILE}
```

#### Testing the upgrade scenario from v16.0.0 to v17.0.0

1. Install backend dependencies v16.0.0 with persistence enabled (need to create databases manually since the initDb scripts will not run)
```bash
helm --namespace ${NAMESPACE} install ${RELEASE} mojaloop/example-mojaloop-backend --version 16.0.0 -f ${VALUES_FILE}
```
2. Install the mojaloop services v16.0.0 and run tests to create data in databases
```bash
helm --namespace ${NAMESPACE} install ${RELEASE} mojaloop/mojaloop --version 16.0.0 -f ${VALUES_FILE}
```
3. Uninstall the mojaloop services
```bash
helm delete ${RELEASE} --namespace ${NAMESPACE}
```
4. Upgrade the backend dependencies to v17.0.0 (This will upgrade mysql/Kafka/MongoDB versions)
```bash
helm --namespace ${NAMESPACE} upgrade ${RELEASE} mojaloop/example-mojaloop-backend --version 17.0.0 -f ${VALUES_FILE}
```
5. Install the mojaloop services v17.0.0 (This will run the knex migrations to upgrade the database schemas)
```bash
helm --namespace ${NAMESPACE} install ${RELEASE} mojaloop/mojaloop --version 17.0.0 -f ${VALUES_FILE}
```
6. Run the GP Tests
```bash
helm test ${RELEASE} --namespace=${NAMESPACE} --logs
```