I had a customer implementing Microsoft Dynamics 365 for Finance and Supply Chain Management who had to postpone an update because an ISV solution needed an update. The upgraded solution came, so I planned out the environment update roll out strategy: which environments would get updated? When? How to roll back if they did not update.
The changes to roll out included:
- F&O update to 10.0.10 with some import quality updates included
- Installed two new models
- Uninstalled two models incompatible with 10.0.10
- Include a minor change to a data entity which had a public name conflict with a new Microsoft entity (yes, I know!)
So we scheduled tasks over two business days and the weekend:
Thursday Trial/POC in designated dev box
- Delete obsolete models locally
- Upgrade to 10.0.10
- Install new models locally
- Smoke test, make notes on what needs to be configured
- Code freeze starts.
- Check in deletion of obsolete models and remove from Projects.xml file
- Update build box to 10.0.10
- Check in new models with the change to Projects.xml file
- Email the team about downtime
- Merge code to Trunk
- Build TRUNK
- (night) Take a backup of Microsoft T2 Sandbox
- (night) Update Microsoft T2 Sandbox to 10.0.10 with quality updates
- Configure and validate the ISV changes in the Microsoft T2 Sandbox
- Update all other environments to 10.0.10
Updating Other Environments
When I considered updating the other 27 environments I considered assigning each one to a developer. Instead I scripted out the updates necessary:
- Stopping all F&O-related Windows services
- Getting the latest code
- Compiling all custom models (non-binary, non-Microsoft)
- Full database synchronization
- Restarting the F&O related services
A gigantic thank you goes to Mötz Jensen for creating and maintaining the d365fo.tools PowerShell module. He also made the ExcludeBinaryModels switch on the Get-D365Model command upon my request last week. I encourage everyone to take a hour to read through the commands to see what is possible. They are very useful for setting up new development environments.
Armed with the commands from d365fo.tools I executed the following script on the onebox environments:
The 22 environments took only 11 minutes each (average) of my time to update!
A few of the developer machines with larger in-process extensions failed to download latest within PowerShell and that was because there was a conflict which required manual merging. In those cases I asked the developer to merge their code and finish the steps.
You can find the PowerShell commands on GitHub.
I removed two commands which deleted the folder for the old ISV. Removing the folder is important because when the X++ code is compiled binaries are added into those folders which are no longer necessary. Also not included was SSRS report deployment (in case you want to adapt this script for youself).
Have you had a challenging update and why? Comment below or Tweet me!