MS Dynamics Updates to Cloud Environments are applied using deployable packages. Applying updates causes system downtime. All similar services will be stopped and you won’t be able to use your environments while the package is being applied.
This article describes how you can use MS Dynamics Life Cycle Services (LCS) to automatically apply updates to either a Microsoft Dynamics 365 for Finance and Operations environment or a Microsoft Dynamics 365 for Retail environment.
MS Dynamics Updates to Cloud Environments Key Concepts
Before you begin, you should understand deployable packages, runbooks, and the AXInstaller. A package that is deployable is a unit of deployment that can be applied in any environment.
A deployable package can either be a binary update to the other runtime components or the platform, an updated application package, or a new application package. The AXInstaller creates a runbook that enables installing a package.
Supported Package Types
- AOT deployable package – A deployable package that is generated from application metadata and source code. This package is created in a development or build environment.
- Application and Platform Binary update package – A deployable package that contains dynamic-link libraries (DLLs) and other binaries and metadata that the platform and application depend on. This is a package released by Microsoft.
- Platform update package – A package that contains dynamic link libraries and other binaries and metadata that the platform depend on. This is a package released by Microsoft.
- Retail deployable package – A combination of various Retail packages that are generated after the Retail code is combined.
- Merged package – A package that is created by integrating one package of each type.
If your MS Dynamics Updates to Cloud Environments is on an Application version 8.1 and above then the Platform Update package will not apply to your environment.
Note that you will not be applying granular X++ hotfixes and will get all application and platform updates together. This means that on the MS Dynamics Updates to Cloud Environments details page clicking on View detailed version information will not have details on the granular hotfixes or KBs applied as there is no way to apply them.
Applying MS Dynamics Updates to Cloud Environments Prerequisite Steps
- Make sure that the package that should be applied is valid
When a package is uploaded to the Asset library, it isn’t analyzed. If you choose the package, the package status appears in the right pane as Not Validated. A package must clear the validation before it can be applied in an environment by using the following procedures.
The status of the package will be updated in the Asset library to indicate whether the package is valid. We require validation to help ensure that production environments aren’t affected by packages that don’t meet the guidelines.
There are three types of validations:
- Basic package format validations
- Platform version checks
- Types of packages
- Make sure that the package is applied in a sandbox environment before it’s applied in the production environment
To help ensure that the production environment is always in a good state, we should make sure that the package is tested in a sandbox environment before it is applied in the production environment.
Therefore, before you request that the package be applied in your production environment, check that it has been applied in your sandbox environment by using the automated flows.
- If you want to apply multiple packages, create a merged package that can be applied first in a sandbox environment and then in the production environment
Application of a single package in an average environment requires about 5 hours of downtime. To evade extra hours of downtime when you must apply multiple packages, you can create a single integrated package that contains one package of each type.
If you choose a application deployable package and an binary package in the Asset library, a Merge button becomes available on the toolbar. By choosing this button, you can integrate the two packages into a single package and therefore reduce the total downtime by half.
- Make sure that the Application binary update package is applied to your dev/build environment before it is applied to your sandbox and production environment
If the application binary package is applied directly to your Tier 2+ sandbox environment but is not applied on your dev/build environment, the next time you move an AOT package from dev/build box to sandbox, some of the application binaries will be overwritten with what is in your dev/build environment. This could result in a regression of the version of your sandbox environment.
Apply a Package to a Non-production Environment by Using LCS
Before you begin, verify that the deployable package has been uploaded to the Asset library in MS Dynamics LCS.
- For a binary update, transfer the package directly to the Asset library. For a application (AOT) deployable package that results from an X++ hotfix, or from application customizations and extensions, create the deployable package in your development or build environment and then transfer it to the Asset library.
- Open the Environment details view for the environment where you want to apply the update.
- Click Maintain > Apply updates to apply an update.
- Select the package to apply. Utilize the filter at the top to find your package.
- Click Apply. Check that the status in the upper-right corner of the Environment details view changes from Queued to In Progress, and an Environment updates section now shows the progress of the package. You can reload the page to check the status.
- Continue to refresh the page to see the status updates for the package application request. When the package has been applied, the MS Dynamics Updates to Cloud Environments status changes to Deployed, and the servicing status changes to Completed.
Apply a Package to a Production Environment by Using LCS
In a production environment, customers can schedule a downtime for when they want the update to be applied.
- After the update is applied successfully in a sandbox environment, go to the projects asset library. On the Asset library page, choose the Software deployable package tab, choose the package that you want to move to production and select Release candidate. This shows that this package is ready for production deployment.
- Open the Environment details view for the production environment where you want to apply the package.
- Select Maintain > Apply updates to apply the package.
- Select the package to apply in your production environment, and then click Schedule to submit a request to apply it.
- Specify the date and time to schedule the package application. Click Submit and then click OK to confirm. Check that your environments will be unavailable to perform business while the package is being applied.
- At the scheduled downtime, package deployment will start.
- After the environment is serviced, you can monitor the status. The Servicing status field indicates the status of package application. A progress indicator also shows the number of steps that have been run, out of the total number of steps that are available.
- After the deployment is successfully completed, the Servicing status field is set to Completed.
- By chance the package application is not successfully completed, Microsoft will investigate the issue. The Servicing status field will show that the package application has failed. The MS Dynamics Updates to Cloud Environments will be rolled back to a good state.
Packages, Runbooks and the AXUpdateInstaller in Depth
Deployable packages, runbooks, and the AXUpdateInstaller are the tools you use to apply updates.
- Deployable package
A deployable package is a unit of deployment that can be applied in any Finance and Operations or Retail environment. It can be a binary update to the platform or other runtime components, an updated application (AOT) package, or a new application (AOT) package.
Deployable packages created in a development environment or downloaded from LCS can’t be applied across product types. That is, a F&O deployable package cannot be applied in a Retail environment and vice versa.
If you have an existing customization for F&O that is compatible with Retail and would want to apply it to a Retail environment, you will need to re-package your source code in a Retail development environment, and conversely if moving in the other direction.
The deployment runbook is a series of steps that are created in order to apply the deployable package to the target environment. Few steps are automated and few steps are manual. AXUpdateInstaller lets you run these steps one at a time and in the correct order.
When you create a customization package from Microsoft Visual Studio or a Microsoft binary update, the installer executable is combined together with the deployable package. The installer creates the runbook for the specified topology. The installer can also run steps in order, according to the runbook for a specific topology.
All environments deployed through Life Cycle Services are supported. For other environments, you must use Remote Desktop Protocol (RDP) to connect to the environment and install from the command line. For more information on Applying Microsoft Dynamics Updates to Cloud Environments, please contact us.