Epinova DXP deployment extension – Direct deploy warm-up
When you have deployed to Optimizely DXP using the "direct deploy" option the web application is not automatically warmed up. To make sure that this is possible to achieve without having to create custom functionality in Azure DevOps, the Epinova DXP extension task ‘Deploy NuGet package’ now contains that functionality.
We started to hear the frustration from many developers that liked the speed of the direct deploy functionality, but that now got issues with having to wait for the site to start after a deployment when browsing to the enviroment for the first time after a deploy. To make the direct deploy as fast as possible the deployment process/function skips the step where it first deploys the solution to slot machine and then warms up the web application before switching the main slot. For a non production slot, we agree that the trade of of saving time by not using slots is the right way to go - but we still would like to get the site warm up automated as part of the deployment.
New property – “Warm-up after direct deploy”
We have added a new property for the task ‘Deploy NuGet Package’. The new property is ‘Warm-up after direct deploy’. If that property contains a value and ‘Use direct deploy’ is true it will make a request to the URL specified in ‘Warm-up after direct deploy’. Since the web application many times takes a lot of time to load, a retry function will retry 10 times before give up. Each request will have a timeout of 120 seconds. (Yes, I know - sometimes it can take a while to start the web application)
When the script succeeds to get a response from the web application it will create a list of all links it can find on the initial page and then make a request to every URL in that list.
Example: Your page https://dikl06mstr3pe5minte.dxcloud.episerver.net/ that you have specified as warm-up URL contains a menu with 10 links to landing pages. Then the warm-up script will request https://dikl06mstr3pe5minte.dxcloud.episerver.net/ and the 10 URLs that could be found on the page.
After this is done your web application should be up and running and warmed up.
This is very useful if you are expecting to run some tests direct after deploy and want/need the web application up and running to do the tests.
We know that there are many warm-up tasks out there that you can use. Some are bad and some are really good. But we thought that it could really be helpful to be able to skip the installation of another warm-up extension. Or just skip the need of adding an extra task after the deployment task that warm-up the web application. You know what… it is your choice 😊.
Spec property – “WarmUpUrl”
Specify if you want to warm-up the web application after direct deploy. It will request the specified URL and all links found on the page.
Note that this property is only added to v2 of the task ‘Deploy NuGet Package’. The old v1 does not support warm-up.
Example value 1: `https://dikl06mstr3pe5minte.dxcloud.episerver.net/`
Example value 2: `$(Integration.Url)`
Default value: ``
- task: DxpDeployNuGetPackage@2
Epinova DXP extension - version
This new functionality can be found in version v2.2.12 and above.
For the latest documentation and guides please visit the repo on GitHub. Where all code, documentation and YAML files etc. exist.