With the proliferation of Sitecore PaaS infrastructure, embracing scalability and the necessary segmentation of Sitecore into various roles, we have license files in so many places. Updating license files is particularly daunting in a scaled / PaaS environment. It feels akin to hunting down Horcruxes.
So - I'm sharing a simple tool and process I created to help make short work of updating license files.
Sitecore Azure License File Location Generator
Step 1: Generate URLs
- Enter the prefix used in your Sitecore Azure PaaS install.
- In the URL https://demosite93-si.azurewebsites.net the prefix is demosite93.
- Press the generate button.
Step 2: Update Licenses
- Copy the contents of your new license.xml to your clipboard.
- Click each link below (log into Azure if prompted) to open your license file on the App Service.
- Paste your new license file contents, erasing the old.
In Detail: Updating The Sitecore Licenses
Let's take a look at what's going on in a little more detail and why I did this.
Challenges Updating Sitecore License On PaaS
- The license.xml is not usually part of code deployments, so we can’t leverage DevOps to update the file.
- The license.xml exists on (seemingly?) every App Services in Sitecore - not just CM and CD. Across Sitecore Azure PaaS I've found 15 license files.
- Even if we wanted to piggyback on a code deployment to update the license, xConnect services usually aren’t integrated into DevOps / code deployments procedures.
- If we’re in a panic or want to update a single file, FTP could be the solution but the sorting out logins and network access can be a problem.
Our Approach To Updating Licenses
- Use the App Service Editor tool that’s integrated with all App Services in Azure.
- Leverage the capability to directly link to files within the App Service Editor.
- Through some elbow grease, we know the exact location of each license.xml.
- Use our clipboard to copy & paste the contents of our new license.xml file. Super quick.
- Everywhere a license is found, we're assuming it’s used and needs to be updated.
Getting Your License File
- When you retrieve your new license (from the partner portal, sitecore rep or customer) it’s often in a ZIP format.
- We want a license.xml file. Unzip the file if needed.
- Open the license.xml file in a text editor of your choice and copy its contents to your clipboard. (CTRL+C or CMD+C if elite :)
Generally, this is what it should look like when you open it up (values have been obscured).
If you’re unfamiliar with the App Service Editor, it's available on all Windows-based App Services and allows you to directly edit files. We’re going to use this to update the license files.
After launching the App Service Editor you can search for license files using the settings shown below. As the tool at the top of the page can used to link directly to the license files, this isn't really needed. But it's included for reference.
Updating Your Licenses
- Confirm the contents of the new license.xml file are still in your clipboard.
- Enter the the prefix of your Sitecore Azure PaaS instance into the generator above to create your URLs and locations.
- One at a time, click the generated URLs. They’ll bring you directly to the license.xml file on each App Service.
- Paste in the contents of your new license file.
All Sitecore 9.x License Locations
|Sitcore Server Role:
|Marketing Automation Reporting
|Marketing Automation Operations #1
|Marketing Automation Operations #2
|Cortex Processing #1
|Cortex Processing #2
|xConnect Search #1
|xConnect Search #2
|xConnect Reference Data
When you look at the table from the perspective of unique locations, you can see how there are fewer locations to update licenses on in local developer instance or on XP Single topologies.
- Because of App Service Editor session management works, do not open two tabs for the same App Service role at the same time. Please open one at a time.
- Every single license may not need to be updated for Sitecore to continue working. But this is low effort, so I'm not risking it.
- This is legit for Sitecore 9.0 (sans identity server), Sitecore 9.1, Sitecore 9.2 & Sitecore 9.3 and even Sitecore 10 (I haven't thoroughly looked into this yet)
- The time is coming where customers who purchased 3 year licenses and went with Azure PaaS or Sitecore Managed Cloud deploys are starting to be due for new licenses.
I hope you find that this approach saves you time and gives you a little extra confidence in updating these license files.