Views: 3764
Number of votes: 4
Average rating:

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

valdis
(By valdis, 10/18/2016 5:51:36 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
(By Pontus Hagman, 10/18/2016 5:55:03 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
(By Henrik Fransas, 10/18/2016 6:42:50 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
(By Tommi Raunio, 10/19/2016 4:34:41 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
(By Pontus Hagman, 2/24/2017 12:47:14 PM)

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
(By naresh Azhagarselvam, 6/1/2017 7:11:33 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
(By Pontus Hagman, 6/2/2017 11:49:21 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
(By Henrik Fransas, 10/12/2018 9:00:46 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
(By Linus Engback, 10/31/2018 8:03:33 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)

Please login to comment.