Emulated Azure local environment

Tom Troughton asked on March 4, 2015 10:47


I'm about to start my first Kentico on Azure build. I've been looking into the environments I need. My ideal is:

  1. Local development team environment running Azure emulator locally. Multiple developers.
  2. Internal testing environment hosted on local physical servers emulating Azure.
  3. UAT and production environments both actually in Azure

I have come across two challenges so far. For the local development environment I have found that it isn't possible to set up an Azure storage emulation on a shared server which all devs can use. To me this was essential because if they're sharing a Kentico dev database (Kentico have recommended against each developer working against a local database) then they'd need to share storage too. It would appear the only option is to use a real Azure storage account in this case. Would I be right in this assumption?

The second challenge I have is setting up an emulated Azure environment on physical servers which will emulate a web farm deployment of Kentico. My first question is, is this worth the effort and would it be better to follow these instructions to run Kentico as a standard web application for the sake of internal testing? If any of you have experience though with emulating an Azure environment on physical servers I'd appreciate some guidance. I've been through this, but unsure as to next steps.

Correct Answer

Bryan Soltis answered on March 4, 2015 18:13

Hi Tom,

I have done a lot of development with Kentico on Azure so I definitely understand your points. I’ll address them below:

  1. Shared Storage The only real solution here is to use an actual Azure storage account for the developers to share. Emulated Azure Storage is specific to the machine the site is running against and cannot be access from other machines (to my knowledge). It may be possible to access another developer’s emulated storage via IP, but I’ve never tried that.

  2. When I have typically developed for Azure, I would do that majority of my testing using the web app project. I would still set up an Azure project, however, I would comment out the contents of the “ApplicationStartInit” method in the /Old_App_Code/CMSModules/WIndowsAzure/AzureInit.cs file. This is the code that tells Kenitco it’s running in Azure and to hook up the roles. If you do this, you will want to make sure you have a valid CMSConnectionString in your web.config as Kentico won’t know to go look for it in the ServiceConfiguration file.

After I make sure my code is running fine, I will uncomment the above method and usually deploy to Azure for UAT testing. It is possible to run this in the emulator, however, at this point I am usually pretty confident it works and want to go directly to Azure.

Every developer works a little differently so you will need to try out the different options to see what works best. One of the best features of Azure is you can consume any part of you want. In many projects, I would actually have the DB already in Azure, even though I was running the site locally. This caused a minor latency during development, however, simplified deployment when we were ready to go live. Additionally, hosting your DB in Azure from the start gives your backups , restores, and all of the other goodies the platform brings.

Hopefully this help!

  • Bryan
1 votesVote for this answer Unmark Correct answer

Recent Answers

Tom Troughton answered on March 4, 2015 18:21

Really helpful, thanks Bryan :)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.