Excerpt |
---|
PreparationsBefore doing anything to the running installation, the config file for the new installation should be prepared by following these steps: Retrieve the values.yaml file that you have used previously, or if you want to start from scratch, you extract it from the installation by running these commands: Code Block |
---|
helm -n <namespace> get all <helm name> > <output filename>.yaml
E.g:
helm -n uepe get all uepe > valuesFromSystem.yaml |
Where uepe is the helm name you have selected for your installation. You will see list similar to the one below. Code Block |
---|
helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
external-dns uepe 1 2024-05-08 15:27:48.258978207 +0200 CEST deployed external-dns-7.2.0 0.14.1
ingress-nginx uepe 1 2024-05-08 16:18:43.919980224 +0200 CEST deployed ingress-nginx-4.10.0 1.10.0
uepe uepe 3 2024-05-10 14:16:17.724426589 +0200 CEST deployed usage-engine-private-edition-4.0.0 4.0.0 |
Extract the values manually from the output. Copy the lines below “USER-SUPPLIED VALUES:” and stop at the blank line before “COMPUTED VALUES:”. Save the copied content to the config file valuesFromSystem.yaml . Update helm repository to get the latest helm chart versions by running the following command. Code Block |
---|
helm repo list
helm repo update |
Retrieve the new version from the repository by running the following command:. Refer to Release Information for the Helm Chart version. Code Block |
---|
helm fetch <repo name>/usage-engine-private-edition --version <version> --untar |
For example: Code Block |
---|
helm fetch digitalroute/usage-engine-private-edition --version 4.0.0 --untar |
Next, check the file CHANGELOG.md inside the created folder to find out what may have changed in the new version when it comes to the values-file. If you are uncertain about how to interpret the content of the file, see below for some examples of keys and how to interpret them: Code Block |
---|
The following values have been removed:
* ```mzOperator.clusterWide```
* ```mzOperator.experimental.performPeriodicWorkflowCleanup```
* ```jmx.remote```
* ```platform.debug.jmx```
|
means that in the values file they should be entered as: Code Block |
---|
mzOperator:
clusterWide:
experimental:
performPeriodicWorkflowCleanup
jmx:
remote:
platform:
debug:
jmx: |
Each part of the key does not necessarily follow directly after the previous one, but always before any other “parent” on the same level. So in this example of a values.yaml file: Code Block |
---|
debug:
script:
enabled: false
log:
level:
codeserver: info
jetty: 'off'
others: warn |
an example of a key could be debug.log.level.jetty . Make any necessary updates based on changed field you may be using in the valuesvaluesFromSystem.yaml file you got from the existing installation so it matches the new version. Take note of any fields that have been deprecated or removed since the last version so any configuration of those fields can be replaced.
Note |
---|
Note! Before proceeding with the upgrade make sure : you logged in and have access the container registry. you have a valid image pull secret that allows the Kubernetes cluster to pull the container images from the container registry. update the Image Pull Secret (if needed) to the valuesFromSystem.yaml file. update the License Key for the upgrade version to the valuesFromSystem.yaml file.
|
When you have updated the valuesvaluesFromSystem.
yamleyaml file you can test it by running this command:
Code Block |
---|
helm upgrade --install uepe digitalroute/usage-engine-private-edition --atomic --cleanup-on-fail --version 4.0.0 -n uepe -f fromHelmvaluesFromSystem.yaml --dry-run=server |
|
Before doing anything actively to the running installation, the config file for the new installation should be prepared.
First, retrieve the values.yaml you’ve used previously, or if you don’t have it, you can get it from the installation by doing this:
Code Block |
---|
helm get all <helm name> > <output filename>.yaml
E.g:
helm get all uepe > valuesFromSystem.yaml |
Where “uepe” is the helm name you’ve chosen for your installation
Code Block |
---|
helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
external-dns uepe 1 2024-05-08 15:27:48.258978207 +0200 CEST deployed external-dns-7.2.0 0.14.1
ingress-nginx uepe 1 2024-05-08 16:18:43.919980224 +0200 CEST deployed ingress-nginx-4.10.0 1.10.0
uepe uepe 3 2024-05-10 14:16:17.724426589 +0200 CEST deployed usage-engine-private-edition-4.0.0 4.0.0 |
Next retrieve the new version from the repository:
Code Block |
---|
helm fetch <repo name>/usage-engine-private-edition --version <version> --untar |
E.g.:
Code Block |
---|
helm fetch digitalroute/usage-engine-private-edition --version 4.0.0 --untar |
Next, check the file CHANGELOG.md inside the created folder to find out what may have changed in the new version when it comes to the values-file.
In case you’re uncertain about the format of the file, here are some examples of keys and how to interpret them:
Code Block |
---|
The following values have been removed:
* ```mzOperator.clusterWide```
* ```mzOperator.experimental.performPeriodicWorkflowCleanup```
* ```jmx.remote```
* ```platform.debug.jmx```
|
The above mean that in the values file they are entered as:
Code Block |
---|
mzOperator:
clusterWide:
experimental:
performPeriodicWorkflowCleanup
jmx:
remote:
platform:
debug:
jmx: |
Each part of the key doesn’t necessarily follow immediately after the previous one, but before any other “parent” on the same level. So on in this example from values.yaml:
Code Block |
---|
debug:
script:
enabled: false
log:
level:
codeserver: info
jetty: 'off'
others: warn |
One example of a key could be “debug.log.level.jetty”.
Make any necessary updates based on changed field you may be using in the values-file you got from the existing installation so it matches the new version.
TODO: What does the user do if we’ve removed something that they use?
When you’re update the values file you can test it using this command:
Code Block |
---|
helm upgrade --install uepe digitalroute/usage-engine-private-edition --version 4.0.0 -n uepe -f fromHelm.yaml --dry-run=server |
Excerpt |
---|
|
Backup and Database UpgradeWhen all the running batch workflows have stopped you should make a backup so that the system can be restored in case of any issues during the upgrade. Note |
---|
Note! Before proceeding with the backup you must shut down the platform. This is very important since otherwise the backup of the database may become corrupt. |
The platform can be shut down in various ways, see examples below. Info |
---|
Examples - Shutting Down the Platform Option 1 Reduce the number of replicas (under “spec”) to 0 by running the following command: Code Block |
---|
kubectl edit statefulset platform -n uepe |
where uepe is the namespace used. Option 2 Run this command: Code Block |
---|
kubectl scale --replicas=0 sts/platform -n uepe |
and then this command: Code Block |
---|
kubectl get pods -n uepe |
And ensure that the pod platform-0 is no longer present |
|
Excerpt |
---|
|
RollbackRollback procedure only be carried out in case user wants to rollback to the previous version. The following steps are performed in rollback. Restore database backup Restore file system snapshot Rollback Usage Engine Private Edition to pre-upgrade version
|
Excerpt |
---|
|
Rollback Usage Engine Private Edition to pre-upgrade versionTo rollback to pre-upgrade version, check the history to see the revision numbers Code Block |
---|
helm history uepe -n uepe |
Rollback to pre-upgrade version with revision <pre-upgrade-revision-number> Code Block |
---|
helm rollback uepe <pre-upgrade-revision-number> -n uepe |
|