Tuesday, September 12, 2023

Create and Importing Deployable Package to UAT/Production Using Lifecycle Services in Dynamics 365 Finance And Operations

Overview

In Microsoft Dynamics 365 Finance and Operations, development and customization can be done within development environment and deployed to UAT / Production environment. In this blog we are going to discuss how these changes can be deployed to UAT / Production environment

What is a deployable package?

Let’s first define what a development environment package or a deployable package is, before we dive into the deployment process. A deployable package is a collection of customizations and extensions that have been developed in a development environment. This package contains the code, metadata, and configurations that can then deploy to the UAT or Production environment.

Steps for deploying changes using Lifecycle Services

Step 1: Create Deployable package and save it in a folder.

Before creating a deployment package, it is recommended to perform a full build of the required models. 
This ensures that all changes and customizations are included in the deployment package. 
In Microsoft Visual Studio, select Extensions >Dynamics 365 > Build Models > Full Build and select all models. Alternatively, select only the models that have been modified or customized.





After you have completed the development stage, follow these steps to create a deployable package from Visual Studio.
In Microsoft Visual Studio, select Extensions >Dynamics 365  Deploy > Create Deployment Package.



Select the packages that contain your models, and then select a location in which to create the deployable package. 


For more information about the deployable package creation, please refer here

Step 2: Go to https://lcs.dynamics.com and enter your credentials

Step 3: Click on your implementation project. Then go to Asset Library using 3 bars icon as shown in the below screenshot.


Step 4: Go to Software deployable package Tab in Asset Library. Then add the new package here which we have created from dev environment.

Step 5: As we can see in below screenshot, we need to give name for uploading our package into Asset Library first. Then the package will be eligible to deploy to UAT or Production.




Step 6: Once package is added into asset library and if you want to publish it in the UAT environment, click on the highlighted option in the screenshot below.


Step 7: Now go to navbar Maintain and click on Apply updates


Step 8: Provide unique name for you Package. Such as write package name with date and then select the package uploaded in asset library and click on Apply 


Step 9: It can take about 1 to 3 or more hours depending on the size of the package.



Step 10: After successful deployment we can check the Activity status completed or Rollback. If we get any errors during the deployment, it will be rollback and we need to fix it in development environment. Afterwards the whole process of deployment will repeat.


Step 11: Once the deployment is done on the sandbox, make the deployed package as release candidate for moving to production.




Step 12: 
To initiate package deployment on production, navigate to production environment details page and select Maintain>Update Environment, and then select our package and mention the production downtime. 


Best Practices for Deploying a Development Environment Package to UAT/Production

To ensure a successful deployment, it’s important to follow these best practices:

  1. Always test the deployment in a non-production environment first.
  2. Include all the required models and packages in the deployable package.
  3. Properly configure the target environment so that it can meet the requirements of the customizations and extensions.
  4. Take a backup of the target environment before deploying the package.
  5. Monitor the deployment progress and resolve any issues that arise during the deployment process.

Note: 
These all are manual steps, but till sandbox package deployment can be achieved through DevOps continuous deployment (Automated deployment) using Azure DevOps release pipeline.

Rollback:
We have the option to rollback our changes, also we have the option to create support ticket with Microsoft (LCS project>Work items>Support issues>Submitted to Microsoft) for deployment related issue, make sure you enabled the notifications on LCS user settings to get the deployment related email updates.

No comments:

Post a Comment