Updating Your DXP Instance to a New Minor Version
Regularly updating your Liferay DXP installation is an important part of maintaining your Liferay PaaS environment. Use the available tags on the Liferay DXP Docker Hub page to update and deploy your service.
Upgrading to a new major version (such as Liferay DXP 7.3) requires a different procedure from a smaller version update. See Upgrading Your Liferay DXP Instance for more information.
If you want to install a hotfix, follow these steps instead.
Enabling Module Upgrades for DXP 7.3+
First, if you are updating a 7.3+ version of DXP, then set an environment variable to allow modules to upgrade as needed:
-
In the Liferay Cloud console, click on the Liferay service in the desired environment.
-
Click the Environment Variables tab.
-
Add the
LIFERAY_UPGRADE_PERIOD_DATABASE_PERIOD_AUTO_PERIOD_RUN
variable to the list with a value oftrue
. -
Click the Save Changes button.
This allows your modules to perform the necessary upgrades for the new minor version of DXP. If you intend to allow modules to upgrade any time you are updating your version of DXP to a new fix pack or service pack, then you can keep this environment variable after the update.
Updating and Deploying a New Version of DXP
Minor version updates to Liferay DXP also require a change to your project’s repository.
If you are using clustered services and updating to any version that changes the Liferay database schema (such as a service pack), then follow these steps.
Perform these steps to update and deploy changes in your project repository:
-
Find the tag for the version of Liferay you are updating to on Docker Hub.
-
In your repository, change the value of the
liferay.workspace.docker.image.liferay
property inliferay/gradle.properties
to the new version’s tag:liferay.workspace.docker.image.liferay=liferay/dxp:7.3.10-ga1
-
Add this environment variable to the
env
block in your repository’sliferay/LCP.json
file:{ "LIFERAY_UPGRADE_PERIOD_DATABASE_PERIOD_AUTO_PERIOD_RUN": "true" }
-
Deploy the change to the desired environment’s
liferay
service. -
For versions 7.3+ of DXP, if you do not intend to allow modules to upgrade when upgrading to new fix packs or service packs in the future, then remove the
LIFERAY_UPGRADE_PERIOD_DATABASE_PERIOD_AUTO_PERIOD_RUN
environment variable you previously added to the Liferay service’s Environment Variables page.
Once you have deployed the changes, the liferay
service restarts and begins any upgrade steps necessary to complete the update.
To avoid bugs related to outdated content on the CDN cache, go to Network → CDN, and click Clear CDN Cache.
Updating to a New Service Pack with Clustering Enabled
If you are updating to a version of Liferay DXP that changes the database schema, then your clustered liferay
service requires temporary changes during the update procedure to ensure all nodes update correctly.
Follow these steps:
-
Set the
scale
property in your repository’sliferay/LCP.json
file to1
:{ "scale": 1, }
-
Deploy the change to the
liferay
service. -
Find the tag for the version of Liferay you are updating to on Docker Hub.
-
Change the value of the
liferay.workspace.docker.image.liferay
property inliferay/gradle.properties
to the new version’s tag:liferay.workspace.docker.image.liferay=liferay/dxp:7.3.10-ga1
-
Set the deployment strategy to
Recreate
inliferay/LCP.json
:{ "strategy": { "type": "Recreate" } }
-
Deploy these changes to the
liferay
service.The Liferay DXP installation on your
liferay
service updates to the new version as it starts up. However, you must still reverse the temporary changes made to your service. -
Set the
scale
property back to the desired number of nodes inliferay/LCP.json
:{ "scale": 3, }
-
Reset the deployment strategy in
liferay/LCP.json
to its former value (or remove the property if it was only added for the version update). -
Deploy the changes one more time.
-
For versions 7.3+ of DXP, if you do not intend to allow modules to upgrade when upgrading to new fix packs or service packs in the future, then remove the
LIFERAY_UPGRADE_PERIOD_DATABASE_PERIOD_AUTO_PERIOD_RUN
environment variable you previously added to the Liferay service’s Environment Variables page.
The updated liferay
service starts back up with the desired number of nodes after the final deployment.