Full CRM Deployment in Azure – Part 1 – Infrastructure

As part of a recent engagement, one of companies I work with made the decision to move from CRM Online to a CRM 2016 deployment in Azure. That includes full development and production environment virtual machines in Azure, and to take it even a step further, we need all of it to be internet facing (IFD) and connected to multiple Adxstudio portals. Sounds complicated enough? I thought I would share the main steps we went through, the reference (articles, resources) we used and some of the challenges we faced as well as the resolutions.

This post will be broken into 2 parts. The first one, this one, focuses on how we set up the infrastructure. In part 2, I will describe the steps required to configure IFD for CRM in Azure. Time permitting, I write about how we tied in our Portals in the equation.

Overall infrastructure architecture

In order to make this simple, I’ll discuss only our development environment. From an infrastructure standpoint, it is very standard. We planned to have two domain controllers (DCs), always good as a best practice in case one of the two isn’t available. We also planned to have a separate ADFS server, one CRM Server with all roles, and one SQL Server.

image

That all sounds simple enough. However, since we are working in Azure, there are a few things that are done a little bit differently than when you work within an on-premise environment.

Setting up your Virtual Network, Virtual Machines and Domain

For starters, we need to create a Virtual Network that all of our machines will belong to. Once we have that in place, we need to create the required virtual machines, an active directory domain, and join all our machines to that domain. To achieve this, you can follow the steps in the following articles:

These resources are key to get you started. A few key important steps here are worth mentioning.

First, in the process of setting up your DC, you will need to make sure you update the DNS server of your Azure Virtual Network to the domain controller. In doing so, you will lose internet access from your VMs because there is no public DNS server available. That can become a problem very quickly. To solve the issue, you need to add a couple of additional DNS servers to your Virtual Network configuration. These DNS Servers are are Microsoft’s public DNS servers: 169.62.167.9 and 168.63.129.16:

image

Second, after the machines have all been created, we noticed there was no name resolution even through all the VMs were part of the same Virtual Network. We were able to ping using the IP address but not the machine names (short or FQDN, no difference). So we ended up taking a couple of steps to solve that problem.

  • We made our CRM Application Server and SQL Server IP addresses static. There are two ways to do this. If you are familiar with PowerShell, start by installing Azure PowerShell, then in a PowerShell console, connect to your Azure subscription by following the instructions in the installation link, and use the Set-AzureStaticVNetIP command to assign a static IP address to your virtual machine. The other way of achieving this is to use the new Azure Portal. If you navigate to your VM’s IP addresses settings, you can set the Private IP address to be Dynamic or Static as shown below. Select the Static option (see screenshot below)

image

  • We manually added DNS entries for both our SQL and CRM VMs in our DNS Server. If you are not familiar with doing this, check out this well written article.

Third, we initially had only one Domain controller for various reasons. We realized there was often long delays for AD related actions to be available throughout the network (e.g. add a user to an AD group). We created another server, joined it to our domain, added the AD DS role and made it another DC in our domain. Our issues seem to go away after we added an second DC.

That’s it for now. Feel free to post questions if you have any!

Start your CRM Development in Azure!

I attended a presentation by Microsoft TFS ALM MVP Wes MacDonald on Windows Azure  a couple of weeks ago. If you have some level of MSDN Subscription, Microsoft is giving away free $$$ for Windows Azure services.

Knowing that, I decided to use some of my free $$$ to do some CRM development in  Azure. The idea is to create a Virtual machine and just get a feel of the overall experience. To kick things off, we need to activate our Azure Benefits by logging onto our MSDN subscriber account. Navigate to “My Account” and you will see the list of Subscription Services you get based on your level. Click on “Activate Windows Azure” and go thought the activation process. It takes a few minutes.

After that, the rest of the steps are pretty standard. You need to create a VM. There are a couple of options when it comes to doing that.

  1. You prepare your own VM using HyperV and run SysPrep. When that step is completed, you can upload your VM to Azure and boot it…
  2. You can pick from a Template Virtual Machine. In my case, I selected Windows Server 2012 and SQL Server 2012 SP1 (saves me some time)

Once you have done all the steps to create your VM (with Template), you get a RDP file that enables you to connect to your Virtual Machine in Azure. From that point on, it’s standard CRM installation. If you are used to building CRM VMs for development on a local laptop or workstations, typical steps are installing Active Directory, promoting your machine to Domain Controller and installing CRM. It took me about an hour tops to complete the installation (without the development tools i.e. Visual Studio).

For the price and if you are always going to have internet access, it’s much easier to use an Azure Virtual machine for your development. Here are my arguments for doing it:

  • Powerful servers
  • Quick install, fast and easy access (you get to select the data center where you want to VMs to be… Select something close to your location, East US for myself)
  • Possibility to have a separate server for each installation components (SQL, CRM, AD, SharePoint etc…) at a very low cost which you can hardly do on VMs on your local machine
  • Low cost (good discount for MSDN account holders, plus you are only charged when your VMs are running)
  • Azure UI very simple and intuitive
  • Easy integration with Visual Studio 2012 and 2013
  • No need to maintain your own infrastructure and deal with network, hardware and software maintenance

After trying this, I’m leaning towards using moving all my personal development activities to Azure. The cost is low and controllable and it gives me flexibility when it comes to building a better server infrastructure for my CRM Development which I could never have if I work on my laptop (as powerful as it is). Also, it’s worth noting that I am only focusing on infrastructure here but Windows Azure enables you to do much more (Web hosting, storage/backup, mobile, media etc.). If you are looking for a cloud solution, you should take a hard look at Windows Azure!

Cheers