pega-helm-charts icon indicating copy to clipboard operation
pega-helm-charts copied to clipboard

upgrading pega from 8.4.1 to 8.4.2

Open rohit-eaisystems opened this issue 4 years ago • 3 comments

I am not able to get the proper steps to upgrade pega db through helm.

Our current Pega version is 8.4.1 and we want to upgrade to 8.4.2.

Should I use

action: "install"

and then

installer: image: "YOUR_INSTALLER_IMAGE:TAG" upgrade: upgradeType: "out-of-place" targetRulesSchema: "rules_upgrade"

I only see

https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#actions

and

https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#install

And there is no mention on how to upgrade an existing db

rohit-eaisystems avatar Sep 14 '20 11:09 rohit-eaisystems

@rohit-eaisystems I'm assuming you have performed Pega 8.4.1 Install through helm ( with command helm install <<release-name>> .. If yes, then you already have helm release <<release-name>> to which resources are bound.

In that case, you can perform helm upgrade <<release-name>> . to perform pega database upgrade. Before running this command, make sure that you provide all the required parameters under installer block in values.yaml. Rest of the database and tier information would be same as install documentation.

action: upgrade

installer: image: "YOUR_INSTALLER_IMAGE:TAG" upgrade: upgradeType: "out-of-place" targetRulesSchema: "rules_upgrade" Else, if this is the first time you are performing action through helm, i.e., you do not have any release, then you may fill in the parameters and perform helm install <<release-name>> .' with action upgrade`

There are two types of actions related to upgrade.

action : "upgrade" & "upgrade-deploy" upgrade-type : "in-place" & "out-of-place"

Below are the recommended approaches against each action and the result.

Action Upgrade-type Result
upgrade in-place Performs in-upgrade to the same schemas
upgrade-deploy out-of-place Performs Upgrade to the new rules schema followed by rolling restarts of the deployments if running

action : upgrade & upgrade-type: in-place

As this action performs an in-place upgrade on the existing schemas, client has to bring down the application deployments if any before performing the action.

Note: This performs ONLY Pega DB upgrade and doesn't deploy/upgrade pega cluster.

action : upgrade-deploy & upgrade-type: out-of-place

As this action performs out-of-place upgrade, upgrade will be performed on a new rules schema provided as part of installer.upgrade.targetRulesSchema in values.yaml. This also performs rolling restarts of the existing deployments if any.

This definitely requires a documentation than a comment. So dropping the basic information here.

MadhuriArugula avatar Sep 16 '20 12:09 MadhuriArugula

@rohit-eaisystems I'm assuming you have performed Pega 8.4.1 Install through helm ( with command helm install <<release-name>> .. If yes, then you already have helm release <<release-name>> to which resources are bound.

In that case, you can perform helm upgrade <<release-name>> . to perform pega database upgrade. Before running this command, make sure that you provide all the required parameters under installer block in values.yaml. Rest of the database and tier information would be same as install documentation.

action: upgrade

installer: image: "YOUR_INSTALLER_IMAGE:TAG" upgrade: upgradeType: "out-of-place" targetRulesSchema: "rules_upgrade" Else, if this is the first time you are performing action through helm, i.e., you do not have any release, then you may fill in the parameters and perform helm install <<release-name>> .' with action upgrade`

There are two types of actions related to upgrade.

action : "upgrade" & "upgrade-deploy" upgrade-type : "in-place" & "out-of-place"

Below are the recommended approaches against each action and the result.

Action Upgrade-type Result upgrade in-place Performs in-upgrade to the same schemas upgrade-deploy out-of-place Performs Upgrade to the new rules schema followed by rolling restarts of the deployments if running action : upgrade & upgrade-type: in-place

As this action performs an in-place upgrade on the existing schemas, client has to bring down the application deployments if any before performing the action.

Note: This performs ONLY Pega DB upgrade and doesn't deploy/upgrade pega cluster.

action : upgrade-deploy & upgrade-type: out-of-place

As this action performs out-of-place upgrade, upgrade will be performed on a new rules schema provided as part of installer.upgrade.targetRulesSchema in values.yaml. This also performs rolling restarts of the existing deployments if any.

This definitely requires a documentation than a comment. So dropping the basic information here.

We just made the below changes

Deploy Pega nodes

actions: execute: "upgrade"


Pega Installer settings

installer: image: "pega-docker.downloads.pega.com/platform/pega:8.4.2" adminPassword: "abcd"

Upgrade specific properties

upgrade: upgradeType: "in-place"

Specify target rules schema for migration and upgrade

targetRulesSchema: "pegarules"


I am attaching the logs of the pod running the upgrade, Can you please help us to know what is missing here?

logs.txt

rohit-eaisystems avatar Oct 08 '20 11:10 rohit-eaisystems

FWIW in-place is likely to be removed soon. So of the above changes, upgrade action is correct, the installer.image should point to the installer image (not platform) of the version you're upgrading to (so here 8.4.2), adminPassword is no longer necessary (it is just for installs), upgradeType should be out-of-place, and finally targetRulesSchema should point to a new pegarules schema. For more info on out of place upgrades, see https://community.pega.com/knowledgebase/articles/keeping-current-pega/85/applying-patch-out-place. So run a helm upgrade with the values explained above, and if the upgrade fails post the logs here again. If the upgrade is successful, the database will have both the old and new rules schemas, and the pega pods will still be using the old schema. So you will want one final helm upgrade with the deploy action. This time your rules schema should point to the targetRulesSchema specified during the upgrade.

zitikay avatar Nov 24 '20 22:11 zitikay