Share

LinkedIn

Using Template Deployment for Sitecore Server Architecture in Windows Azure

With Windows Azure now proving themselves in the market, the move to Azure for clients is becoming much more common.

Using the IaaS model, which most Sitecore partners and clients are familiar with, you can now rapidly deploy a Virtual Machine (VM) and databases for a single Sitecore installation very quickly using the Classic deployment model of Azure.  As an example, if we wanted to create a single VM using the class deployment model, we simply login to the Azure portal, create a new VM (classic), add a host name, user name, password, pricing tier (CPU/RAM), Resource Group, and Location of the server (based typically on where the most traffic will be coming from).

 

Classic Deployment Model User Interface

Once that is all put in, you click Create and the VM is created within minutes.  This is great for a single Sitecore installation if the client has monetary limitations, and does not want to pay for a dual CM/CD environment. However, if the client does have the monetary ability to go with the recommended dual CM/CD environment you should definitely take that approach.

The steps below will help you to move rapidly in the creation of 2 Virtual Machines under a Load balancer with a load balancing rule on Port 80 using Template Deployment in Azure.  This template can be reused with any client to rapidly setup a Production environment within minutes once you have a solid diagram of your environments in place.  Using this approach, will save you quite a bit of time because the Template deployment also deploys a Storage Account, Virtual Network, Public IP address, Availability Set and Network Interfaces using the Resource Manager deployment model.

Let's get started:

  • Login to Azure Portal
  • Click on New
  • In the search box type in "template" and you will see the "Template deployment" option in the drop-down box, now click on that option
  • Template deployment should be at the top of the list, now click on that option
  • You will see the description of what Template deployment is all about now, which is below:
    "Applications running in Microsoft Azure usually rely on a combination of resources, like databases, servers, and web apps. Azure Resource Manager templates enable you to deploy and manage these resources as a group, using a JSON description of the resources and their deployment settings."
  • Click on Create

Now, you have the ability to put in your template using the Edit template option.  Below is our .json template we are going to use, which can be modified if you are savvy, but if you are not just go with the default.  This will give you a solid base template to work with and start from if you do want become savvy and want to modify over time.  Copy and paste the .json code into the Edit template window:

Azure Quickstart Template

Now that you input the template, you should make one edit to the template before saving. Place the cursor in the Edit template pane and search for "myAvSet" and change this to what you would like the name your Availability Set to be named, for example "PRODCDAvailSet". Otherwise, it will be named "myAvSet", and when you have multiple Availability Sets (CM/CD) they will need different names to make the differentiation between environments.  Once, you have made this change, go ahead and save the template.

Naming is pretty key in Windows Azure especially when you start getting into multiple deployments.  I recommend following a naming convention that is consistent with your environment (DEV, QA, PROD) and if the servers are content management or content delivery (CM, CD).  You can even go further and add the location (EAST, WEST, etc) but for simplicity we won't add that for now. For instance, here is a diagram of a typical Production environment:


Production Environment Diagram For Azure

Using this diagram, we can start inputting the data into the parameters in the template for the the 2 VM's in the CD set:

STORAGEACCOUNTNAME (string): PRODCDStorageAccount
ADMINUSERNAME (string): [adminusername]
ADMINPASSWORD (securestring): [adminpassword]
DNSNAMEFORLBIP (string): prodcd
VMNAMEPREFIX (string): PRODCD
IMAGEPUBLISHER (string): Use Default
IMAGEOFFER (string): Use Default
IMAGESKU (string): Use Default
LBNAME (string): PRODCDLB
NICNAMEPREFIX (string): PRODCDNIC
PUBLICIPADDRESSNAME (string): PRODCDPIP
VNETNAME (string): PRODCDVNET
VMSIZE (string): Standard_A3 [Depends on the size you want for your VMs]

Now, just select your subscription, resource group, resource group location of where you want the VM's based, and accept the legal terms and click on Create.

After 5-15 minutes, Azure will create your 2 VM's into an Availability Set and set them up in a load balancer without ever having to use Windows Azure PowerShell to create and configure the internal load balancer, which at the time of this post is the only way to do that when using the Resource Manager deployment method. My expectation is that Microsoft is working on getting the UI in place to make that happen but in the interim, you now have some more tools in your toolbox to rapidly setup a production level Azure environment for Sitecore.

Sitecore development, Sitecore custom code, Windows Azure

Comments

Add a Comment

*
*

Please confirm you are human by typing the text you see in this image:

Karl Girthofer said: 9/20/2016 at 3:15 PM

Did you ever get to write more blog posts about this? Specifically the DB's and CM's? :)