Showing posts with label Deploy-able package. Show all posts
Showing posts with label Deploy-able package. Show all posts

LCS Deploy-able Package merging


LCS Deploy-able Package merging 


Sometimes times we need to Apply multiple packages on Production especially when we are applying Both Application hotfixes and Binaries (Deploy-able packages).


There is a simple way to merge multiple deployable packages into a single package.

Step-1 Navigate to Assets library then click on the deployable package.
Step-2 Select multiple packages and click on merge.


Step-3 A Pop will appear like the below image, Enter package name and description.


Step-4 Click on confirm button. The package will appear in deployable with the name you entered.


Step-5 Navigate to environment click on maintain and apply combine hot fixes.



Package Deployment using run-book



Deployment Using Runbook


Today, We learn how to deploy, deplorable packages manually on local and on Azure Dev-Test servers using run book commands.


Before start to read this blog, we need to understand some key concept which i have copied from Microsoft site.

  • Deployable package – A deployable package is a unit of deployment that can be applied to any environment. It can consist of a binary hotfix to the runtime components of Application Object Server (AOS), an updated application package, or a new application package.
  • AXUpdateInstaller – AXUpdateInstaller is an executable program that is bundled in the deployable package. When the package is downloaded to a computer, the installer is available.
  • Runbook – The deployment runbook is a series of steps that is generated and used to apply the deployable package to the target environment. Some of the steps are automated, and some are manual. AXUpdateInstaller enables these steps to be run one at a time and in the correct order.


Here are the some screenshot with the help of these we can learn how to create deploy-able package.

Open VS and go Dynamics 365 Menu. You can find the Create Deployment package like below screenshot.




A popup like below will appear, Now select your required models and set the location where you want to save the deployable package, and click create.




After completion of the process, you can find the deployable package on the given path like below. 

In my case have renamed the package name as per my naming convention. You can change the name but make sure don't use space in your package name.



Now Paste the deployable package on the targeted machine and unzip the package.


Open CMD and go to the path of the Unzip folder like the below screenshot. in my case path is 
C:\backup\DeployablePackage\Package-00130


Following are the run-book command we will use for deployment 


AXUpdateInstaller.exe list

AXUpdateInstaller.exe generate -runbookid="Package-00130-runbook" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="Package-00130-runbook.xml"

AXUpdateInstaller.exe import -runbookfile=Package-00130-runbook.xml

AXUpdateInstaller.exe list

AXUpdateInstaller.exe execute -runbookid=Package-00130-runbook

Before you begin to execute the above commands. please make sure to close all instance of VS of the targeted machine.


  • AXUpdateInstaller.exe list


This command will show you how may runbook already import in your target machine. check the below screenshot for reference.
  • AXUpdateInstaller.exe generate 
Based on the topology information in the DefaultTopologyData.xml file, you must generate the runbook file that will provide step-by-step instructions for updating each VM and Make sure your runbook must be unique

Here is an explanation of the parameters that are used in this command:
  • [runbookID]– A parameter that is specified by the developer who applies the deployable package.
  • [topologyFile]– The path of the DefaultTopologyData.xml file.
  • [serviceModelFile]– The path of the DefaultServiceModelData.xml file.
  • [runbookFile]– The name of the runbook file to generate (for example, AOSRunbook.xml)


Example

AXUpdateInstaller.exe generate -runbookid="Package-00130-runbook" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="Package-00130-runbook.xml"

Now import the runbook by the following the command 
AXUpdateInstaller.exe import -runbookfile=[runbookFile]

Example
AXUpdateInstaller.exe import -runbookfile=Package-00130-runbook.xml


Now Verify that the runbook is loaded successfully or not 

We can verify this by this > AXUpdateInstaller.exe list
Please check the below screenshot it loaded in my case successfully 





The last step executes the command by below command 
AXUpdateInstaller.exe execute -runbookid=[runbookID]

Example
AXUpdateInstaller.exe execute -runbookid=Package-00130-runbook

AXUpdateInstaller updates the runbook file after each step is run on a VM. The runbook also logs information about each step.


Troubleshooting 

  • In case of failure of any steps, we can execute the same runbook from the same steps where its failed.
AXUpdateInstaller.exe execute -runbookid=[runbookID] -rerunstep=[StepId]

Example
AXUpdateInstaller.exe execute -runbookid=Package-00130-runbook -rerunstep=1
  • We can mark the step completed by manually using the below command.

AXUpdateInstaller.exe execute -runbookID=[runbookID] -setstepcomplete=[stepID]

Example

AXUpdateInstaller.exe execute -runbookid=Package-00130-runbook -setstepcomplete=2


Export the runbook.
You can export the runbook by using the below commands.

AXUpdateInstaller.exe export -runbookid=[runbookID] -runbookfile=[runbookFile]

Example
AXUpdateInstaller.exe execute -runbookid=Package-00130-runbook -runbookfile="Package-00130-runbook.xml"








Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...