Share

LinkedIn

Instantiating Your First Sitecore Azure Site

Windows Azure has made a pretty large footprint in the world of cloud hosting. With a strong showing in Infrastructure as a Service (IaaS) and Platform as a Service (PaaS), Azure is the perfect environment for a completely cloud based Sitecore solution.

Sitecore has created an effective Azure deployment and management tool that leverages the power of Azure with the capabilities of Sitecore. This guide will tell you everything you need to know to begin a Sitecore Azure experience and allow you to utilize the power of Sitecore in the cloud. 

What you need to know before you start:

  • Where are you deploying your servers?
  • Are you deploying content management as well as content delivery servers?
  • What size servers do you need?

What you need to install before you start:

What you need to have before you start:

Installing Azure
Once you have a working version of Sitecore and you have installed the necessary libraries, it’s time to start the package installation.  

Sign into Sitecore in desktop mode and open the installation wizard and upload your package. As you go through the wizard you may be prompted to overwrite a few files – namely Heartbeat.aspx and Report.aspx – accept and finish the installation. Once the installation is complete the Sitecore Azure Management console will become available, and you will be able to open the Sitecore menu from the desktop and select the Sitecore Azure application.

On the first launch the screen you will see will be the local emulator setup. If you are going to install the Azure Emulator, you would configure it here. Since the goal of this installation is to deploy out to Azure, select the ‘Add’ button to create Staging and Production development deployments. 

The next thing you will be prompted to do is upload the environment file, and you will find download links for the items mentioned in the prerequisites section of this article. If you don’t yet have an environment file, you can fill out the form to obtain one through the link provided. Next you will select your environment file and click upload.

Once you upload the environment file select ‘Development Staging’ from the environment type dropdown and you will be taken to the main Azure dashboard where you will see all the available servers that Azure offers. From here you would select the server you want for deployment of content management or content delivery. Note that if you are having trouble deploying to one of the servers, try deploying to one of the 4 core servers (i.e.g, East US, West US, Northern Europe or East Asia). The error you might see is something along the lines of “Location Constraint is not Valid,” which indicates that your subscription only permits the use of certain datacenters.

Now you will want to add your instances by clicking on a server farm and selecting which type of environment you wish to create. If this is your first time setting up a farm, you will be prompted to select or create a certificate. Azure will assist you in creating a certificate based off of your subscription ID for testing, if you need to acquire a subscription ID you can do so by going to Azure's publish profile page. Upon selecting which type of farm you would like, you will see the VM setup options. The server options range from Small (1 core) to Extra Large (8 core). Though small is available, it is not recommended. The same goes for having less than 2 instances, since 2 instances allows for the server to have nearly guaranteed uptime.

When you begin deployment you will notice several things in Sitecore Azure. Under the Data\Azure Packages folder a deployment package is created, as well as a configuration file that Azure needs to create the cloud services. On the first deployment Azure creates the full databases, as well as the web roles, which are the virtual machines on the cloud service. If you check your Azure Dashboard you will see that all the Azure items are being created or are online.

Once deployment succeeds the Azure dashboard will allow you to manage all your environments easily.  Select an environment and you will see you can browse to it, pause it or dynamically change the resources allocated to it. One important feature is the upgrade files option, which allows you to republish your site.

Keep in mind the upload will take your site offline and may take up to one hour depending on the size and depth of your site. It is possible that some DLLs installed in the GAC will need to be pulled into the deployment – if so copy them into the bin directory and use upgrade files to push them out to the server. If you see any basic database errors, incorrect passwords, missing stored procedures, missing views – anything of that nature – it is likely the database did not deploy on the first try. Remember the database only gets created on the new deployment command, and you may need to remove the instance and start the deployment over. Another important feature from this context menu is the ability to scale your deployment. Scaling a deployment is the process of adding load balanced instances of your site to the cloud service, adding more horsepower to help with the demand your site is experiencing. 

When you need to push your site from staging to production or update your site from your codebase, the process should roughly follow this path. First update staging through the use of upgrade files, and once your staging server is updated with your new site you will want to select ‘Swap’ in order to switch the staging instance with production. When production is on the stage, you will want to select upgrade files once again so that your staging and production instances are mirrored. All of this can be accomplished through the Windows Azure management portal, but with Sitecore you can easily and quickly make the changes you need.

Once your site is deployed or upgrade files have finished running, you should be able to select ‘Browse’ from your context menu and see your Sitecore site on Azure.

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: