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”.

Was this post helpful?

Certified AEM Developer who has been working on AEM software developer for the past 5 years.

Leave a Reply

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

Back To Top