lördagen den 10:e november 2012

Running EPiServer on Windows Azure

Not long ago Microsoft released their IaaS on Windows Azure, making it possible to run Virtual Machines in the cloud. One of the biggest problems with running EPiServer on Azure has been the license model being bound to either MAC or IP address. Neither of these parameters have been possible to maintain persistent. Until now. :) With the introduction of Virtual Networks in Windows Azure we are now able to specify the internal IP addresses making it possible to run EPiServer on Azure without any license errors. This blog post shows you how to get EPiServer up and running in the cloud in no time!

First of all, go and get a free Windows Azure trial here https://www.windowsazure.com/en-us/pricing/free-trial/. Just sign in with your Microsoft account, add some more details and your done! Then navigate to the Portal. The first thing you should do is to create the Virtual Network. This is done by navigating to the Networks section and clicking the "New" button and the bottom left corner.



Choose Networks > Virtual Network > Custom Create. This will open a three step wizard.

Step 1: Name your VNET and choose to create a new affinity group. Name that group as well.

Step 2: Enter address space and subnets. For simplicity you can use the same as I've entered in the screenshot above.

Step 3: DNS server. You can just leave this one empty and Windows Azure will fix it for you.

Click the Complete button and the Virtual Network will be created! Simple as that.

Now we should create a storage to put the virtual machine in. Click the New button again and navigate to Data Services > Storage > Quick create.

Enter a URL of your own choice and pick the previously created affinity group.

Click the Create Storage Account button and you're done! Now we should create the actual Virtual Machine and put in into the storage. Navigate to New > Compute > Virtual Machine > From Gallery.

 Step 1: Pick the operating system of your choice (Windows Server 2012 of course).

Step 2: Enter some basic configuration.

Step 3: Enter a DNS name and select your storage account and VNET. Also make sure you're creating a standalone VM.

Step 4: Select your frontend subnet and click Create.

The new Virtual machine is now created! You can click the Connect button at the bottom to access the VM using Remote desktop.

And this is actually pretty much it! From now it's just an ordinary server installation. In my case I had to install the Web Server (IIS) Role, install MVC 4 and of course EPiServer CMS 7.

Run ipconfig /all and note the internal IP to get the correct license from EPiServer...

 ...and we're done! :)

After a restart you can notice that the internal IP is still the same...

...and that the site is still running.

I think that this is really cool! We're now able to easily and really fast get a development/test/staging environment up and running without having to think about aspects of hardware at all. Instead of choosing a default VM from Microsoft it is possible to upload and use an image of your own, making it really fast to set up new development environments for new projects or project members.

8 kommentarer:

  1. Svar
    1. I think it should be "Super Awesome cool!" ;) Thanks!

      Radera
  2. Great post and super tutorial! I'm sure this will help a lot of people.

    SvaraRadera
    Svar
    1. Thank you Allan! I hope so to! This is exciting stuff! :)

      Radera
  3. Great guide! You should also mention that an endpoint needs to be setup in order to access the server using HTTP on port 80 directly. Or isn't that needed when setting up a virtual network like this?

    SvaraRadera
  4. Thanks Björn! Please excuse my late reply. You are right, you need to set up an endpoint for this. I am currently only using this for development purposes accessing the site locally but I will try to update the post with instructions how to access it from the outside.
    Br
    Erik

    SvaraRadera
  5. NIce tutorial, but how about running EPiServer 7 as a proper Azure Website?

    SvaraRadera
  6. Hi Erik,

    Have you encountered anything problematic with this approach compared to just running on with an ordinary hosting service? Besides the setup I mean.

    Regards
    Magnus Karlsson

    SvaraRadera