How to deploy new releases manually on Staging and Production AEM environments?

There are many ways for deploying new releases to AEM staging and Production environments. In this tutorial, I will share with you my process for deploying new releases manually. I personally found this the safer way to deploy new releases because you can easily roll back versions, and you let AEM’s out of the box replicate agents transport new changes to your production publish environments.

This tutorial illustrates how you would manually deploy a new content package to AEM staging and AEM production environments, manually.

Scenarios

  1. Scenario 1: You are ready to make a release on Staging
  2. Scenario 2: You are ready to make a new release on Production

Scenario 1: You are ready to make a new release on Staging

  1. Change the project version in maven(remove SNAPSHOT, because SNAPSHOT packages are only for development).
    1
    2
    3
    4
    // documentation: http://www.mojohaus.org/versions-maven-plugin/examples/set.html
    // updates project version to 1.2.0 (remove "SNAPSHOT", and don't commit version)
    mvn versions:set -DnewVersion=1.2.0
    mvn versions:commit
  2. Build your project to your local machine.
    1
    2
    3
    <code lang="java">
    // builds your maven project into target without installing packages on AEM
    mvn clean install -Padobe-public

    // output ui.apps in /ui.apps/target/{projectName}.ui.apps-x.x.x.zip
    // output ui.content in /ui.content/target/{projectName}.ui.content-x.x.x.zip

  3. Upload the build (/ui.apps/target/{projectName}.ui.apps-x.x.x.zip) into “Staging Author”, package manager.
  4. Upload the build (/ui.content/target/{projectName}.ui.content-x.x.x.zip) into “Staging Author”, package manager.
  5. Replicate {projectName}.ui.apps-x.x.x.zip to Staging Publish. Replicating this package will ensure that all your publish instances will be up to date; all files are overwritten.
  6. Do not replicate ui.content because unpublished pages will all be replicated to your publish instance. You can activate pages in the author instance at your desire.
  7. Done.

Scenario 2: You are ready to make a new release on Production


Your updates on the staging environment have been approved, and now we want to deploy a new release on to production; the version of your packages should be the same version as your approved staging packages.

  1. Change the project version in maven(remove SNAPSHOT because SNAPSHOT packages are only for development).
    1
    2
    3
    4
    // documentation: http://www.mojohaus.org/versions-maven-plugin/examples/set.html
    // updates project version to 1.2.0 (remove "SNAPSHOT", and don't commit version)
    mvn versions:set -DnewVersion=1.2.0
    mvn versions:commit
  2. Build your project to your local machine.
    1
    2
    3
    <code lang="java">
    // builds your maven project into target without installing packages on AEM
    mvn clean install -Padobe-public

    // output ui.apps in /ui.apps/target/{projectName}.ui.apps-x.x.x.zip
    // output ui.content in /ui.content/target/{projectName}.ui.content-x.x.x.zip

  3. Upload the build (/ui.apps/target/{projectName}.ui.apps-x.x.x.zip) into “Production Author”, package manager.
  4. Upload the build (/ui.content/target/{projectName}.ui.content-x.x.x.zip) into “Production Author”, package manager.
  5. Replicate {projectName}.ui.apps-x.x.x.zip to Production Publish. Replicating this package will ensure that all your publish instances will be up to date; all files are overwritten.
  6. Do not replicate ui.content because unpublished pages will all be replicated to your publish instance. You can activate pages in the author instance at your desire.
  7. Check-in your code to master (and request for a pull request) with the “SNAPSHOT” label removed in your .pom file.
  8. Tag your master with v1.2.0 (or whichever version you are working on)

Final Notes

There are many ways of deploying new releases to your AEM Staging or Production environments, but this is my take on this for a manual release strategy. Please leave a comment if you have any questions or suggestions on how I can improve me “package manager oriented way of deploying my releases”.


Hello, I am an enthusiastic Adobe Community Advisor and a seasoned Lead AEM Developer. I am currently serving as an AEM Technical Lead at MNPDigital.ca, bringing over a decade of extensive web engineering experience and more than eight years of practical AEM experience to the table. My goal is to give back to the AEM Full Stack Development community by sharing my wealth of knowledge with others. You can connect with me on LinkedIn.

3 thoughts on “How to deploy new releases manually on Staging and Production AEM environments?

  1. For # 5, how does one exactly “replicate {projectName}.ui.apps-x.x.x.zip to Production Publish?”

    Can you provide the exact steps? Is this done through CRX/DE screens?

    1. Hi Tina,

      In the package manager, once you upload the {projectName}.ui.apps-x.x.x.zip, you will see the install button. Click on the install button to install it into the author. Next, after when it is done installing, you can click on the drop-down button to find the “replicate” button. Click on the replicate button, and it will be replicated to the publishers. Please make sure your replication agents are configured as expected.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back To Top