Try our conversational search powered by Generative AI!

Pontus Hagman
Oct 18, 2016
  7479
(4 votes)

How to setup license for Episerver hosted in Azure

This article describes how to setup and activate the license for Episerver running on a Microsoft Azure web app.

 

Episerver Cloud license

Episerver running in an Azure web app will require a cloud license. The cloud license works differently than an ordinary license as it is not bound to MAC or IP. Instead the site “calls home” upon activation to register the server. (The server concept in this case is synonymous with a web app instance). As before, the license limits the number of sites and servers (instances) that can be run under that license.

 

Setup and activation

Let’s assume you have Episerver running in two environments, test and production. The same license file (license.config) should be used and deployed to both environments.

To avoid license error it’s important that you enter the same URL in both the test and production environment. The URL is found in Admin mode > Config > Manage websites > Web sites. (See screen dump below).

Cloud license

 

Now it´s time to activate the license. Navigate to admin mode > Config > Manage websites > Cloud license. Activate the license in both test and production with the activate button. (See screen dump below). The servers (azure instances) are counted towards the total number, limited by the license.

Cloud license activate

You should not activate the other host names, only the one listed that is the same as the main URL.

Since the cloud license is a floating license, you can deactivate instances and activate others as you see fit, as long as you do not exceed the total number of instances allowed by your license. For an example, if you have 3 instances for your production environment, 2 for pre-production and one for test, you can deactivate all non-production instances and use 6 instances in production in case you need to handle an increased amount of traffic for a period.

Oct 18, 2016

Comments

valdis
valdis Oct 18, 2016 03:51 PM

Instance for production for instance: is that app service scale out? where I 'm able to configure to run more than one instance simultaneously? Or that is something else?

Pontus Hagman
Pontus Hagman Oct 18, 2016 03:55 PM

Yes, that's it exactly. If you set your web app to scale to 3 instances, you need to have 3 servers available in the license (in addition to any test and pre-prod instances you currently use.)

Henrik Fransas
Henrik Fransas Oct 18, 2016 04:42 PM

I have been using these kind of License for a while now and I have two problems with them that I am wondering if you know how to solve.

1: When using it on Azure and I scale out it adds servers ok, but when I scale down it does not remove servers so the next time I need to scale out (or use them on pre-prod) they are reported as new servers. So since it has an "Phone home" function, it should also be able to deactivate servers/instances automatily.

2: I am often updating my dev environment with database from production and when I am using these kind of licenses on development after an DB restore it says that I do not have an active license but when I go in to the web interface it says I have an active license for that domain so I need to deactivate and then activate it again manually and that is not good. All other stuff like updating the host-settings I do bu sql script but I have not found any way to do this by code or SQL. Are there any way to automate it since Backstaging should always be done by code to be efficient.

Tommi Raunio
Tommi Raunio Oct 19, 2016 02:34 PM

What's your take on Azure Web App deployment slots with auto swap, from license point of view?

I mean the process where the a new version of the app is first deployed to the Web app deployment slot, and then warmed up automatically by Azure. After the warm up is complete, a hot swap (auto swap feature) is done by Azure. We use this process to prevent cold starts on the new app version. The whole process takes less than a minute in Azure.

If we have one license for production, can we use these Azure web app deployment slots with auto swap feature, or are they prohibited by the license? How about technically? Does the deployment slot version of the app start, if the old production version (that is about to shutdown in a few seconds) is still running?

Pontus Hagman
Pontus Hagman Feb 24, 2017 11:47 AM

Sorry for embarrassingly slow response...

@henrik:
1) There was a bug in the admin mode UI that showed all servers (even old inactive servers) which led you to believe that those were counted towards the license. This bug was only affecting the UI. There have never been a situation were inactive instances are counted towards the total number of servers. (This bug was fixed many months ago).

2) Assuming you are switching to a dev license here, that is why it requires re-activation in the database (since the database is activated on the prod license). No good answer here on how to do this in a smoother way. Did you find an solution yet?

@tommi:
You could use the name instances interchangeably with servers since it is the same thing when it comes to these type of licenses. It is just a floating server license.

Episerver supports deployments-slots technically and from a license point of view. In Azure as long as you stick to an "App Service Plan" that does not have more instances than the number of instances in your license you should be fine. It does not really matter how many web apps and slots you have since they share the same instances/servers.
There is also a "grace period' which is around 20 minutes today. (This time period might be changed in the future). This is to handle re-scaling where the environment might temporarily be doubled, or during Windows patching were machines might overlap etc. The main idea is that if you are running on too many instances for an extended period of time you will see the yellow bar in edit mode rather than interrupting operation of the site.
Remember that if you use the same database (in production) for the new staging-slot, you could potentially upgrade Episerver-database-version when deploying new code to it. The Episerver-database-version would then be out of sync with the Episerver-code-version running in production, causing error in production. 
Note: Response above is for the "Cloud license" which is an on-premise license based on floating number of instances. As for the DXC Service it does not have validation of instances and does not require manual activation. 
I know more detailed documentation on this topic is on its way. 

naresh Azhagarselvam
naresh Azhagarselvam Jun 1, 2017 05:11 PM

I have a question with this point 

"To avoid license error it’s important that you enter the same URL in both the test and production environment"

How can the URLs be the same between test and prod? Is there an alternative where the URLs can be different and still we can use the same  license config

Pontus Hagman
Pontus Hagman Jun 2, 2017 09:49 AM

"Enter the same URL" means entering the URL under General section. You still need to enter the spesific url under "Host names" for test and production respectivly.  

Please aslo see the offical documentation on this topic here: http://world.episerver.com/documentation/developer-guides/CMS/Deployment/managing-cloud-licenses/

Henrik Fransas
Henrik Fransas Oct 12, 2018 07:00 AM

"Enter the same URL" is not a good solution since that URL is used in all kind of places so there is a very big risk that editors or users ends up on production instead of test when having the production URL there on the test environement.

This need to be fixed with a version that maps to the old licenses where you had the possibility to have a test and a prod if you had two servers license.

So you need to bring out a license that is:

Two sites on one Server (per site)

Linus Engback
Linus Engback Oct 31, 2018 07:03 AM

After E-mailing a bit with Episerver I got some further clarity. To avoid the issue where the editor end up on production instead of test it is important to set the test-url as Primary under Host Names. Then this seems to work correctly.

If you then need to get an absolute url I think you should use the following approach:

http://dodavinkeln.se/post/how-to-get-the-external-url-to-content

Which takes "Primary" into account. (Havn't tried it myself)

Per Atle Holvik
Per Atle Holvik Feb 19, 2021 04:49 PM

The dodavinkeln.se site no longer exists, but one can find the blog post here: 

https://web.archive.org/web/20190906233420/http://dodavinkeln.se/post/how-to-get-the-external-url-to-content

Per Atle Holvik
Per Atle Holvik Feb 19, 2021 04:51 PM

The dodavinkeln.se site no longer exists, but one can find the blog post here: 

https://web.archive.org/web/20190906233420/http://dodavinkeln.se/post/how-to-get-the-external-url-to-content

Please login to comment.
Latest blogs
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog