In previous post, Part 1: Creating Azure Network and Storage, we set up your Azure account ready for two virtual machines that’ll be the backbone of your own testing environment. One of these servers will run the Active Directory and the other one will host your SQL Server 2012 instance. The Active Directory server is really optional, you can do a test environment without it but I prefer test environments that mimic the production.
Go to Virtual Servers and choose Create A Virtual Machine.
For the Active Directory server we can use Compute / Virtual Machine and From Gallery option. I choose Windows 2008 R2 server from the list, since this is what most of our environments are running at the time.
I don’t need all that much resources on, so I chose Small size. I wanted the latest version and choose the latest Version Release Date available. Then give the server a name, an administrator account you wish to use and complex enough password and you’re good to go to next step.
In the next page I choose the virtual network we created before, it has only one subnet in it so there’s no choice there. We also choose the Storage Account we created in Part 1 of this guide.
Finally we set up the Endpoints we want to use for accessing our almost created virtual machine. By default it’ll offer Remote Desktop and Powershell. You can use Auto for Public Port on Remote Desktop, but I’ve had some instances where I’ve had to set to same as the Private Port to be able to connect. Just click on the icon in right bottom corner and you’re all set!
While the server is being provisioned, you can go and add another server following the instructions above. Just choose the Windows and SQL Server combination from the Gallery you want to build your test environment on. For my own test environment, I went with Windows Server 2012 with SQL Server 2012 Standard Edition. I did pick the Medium sized box for the extra CPU core.
Creating Active Directory
Once your servers are up and running, you can connect to them by using Remote Desktop just like any other server you have running in your own network. The first thing we’ll do is to create the Active Directory and we’ll do it by logging into our brand new Windows 2008 R2 server.
From my opinion, the easiest way to do this is to open up an elevated (Run as Administrator) Command Prompt and enter the command “dcpromo”. This will check if you have the Active Directory Services binaries installed, if you don’t have them, it’ll install them for you.
Once the binaries are installed it’ll fire up the Active Directory Domain Services Installation Wizard. This tool is used for creating the Active Directory itself. For test environment, I’ll just go with the defaults on this page.
An Operating System Compatibility message will come up, but since we’re not going to run any older versions of Windows in this environment we’ll just click Next. In the Choose a Deployment Configuration page, we’ll need to select “Create a new domain in a new forest” option, since this is our first Active Directory server. Then click Next to proceed.
In the next page, you’ll need to give fully qualified domain name (FQDN) for your Active Directory root domain. Once you’ve come up with a proper name you’d like to use, click Next.
On the page called Set Forest Functional Level, you need to make a decision on what is the functional level of your AD. This will affect the available features for your Active Directory, I chose the highest possible for all of the supported features. After you click Next, a windows will pop-up saying: “Examining DNS configuration.”
Since we didn’t set up any DNS services before running dcpromo, we’re now prompted to add that as an additional option to our domain controller. So click Next to continue with the installation.
A warning will come up saying that the computer has dynamically assigned IP-addresses. In test environment, I’ll just go with it and pick the not recommended option. You will get another warning about DNS Server delegation and a prompt to continue, choose Yes.
The next page will ask for location for database and log files as well as location for SYSVOL. For a test environment the defaults will do just fine.
After clicking next, it’ll ask for Directory Services Restore Mode Administrator Password (write this down somewhere, in case you do something unexpected to your AD). Click Next to get to Summary window. If everything here is as you wanted, click Next again and it’ll start configuring your Active Directory.
It’ll take couple minutes for the configuration to complete, after which you’ll see a following window.
And that’s it, you now have Active Directory set for your test environment! Click Finish to close the Installation Wizard, then choose Restart Now.
Note! After making server a Domain Controller for your Active Directory, the local user accounts no longer exist. So change your login domain to whatever you decided to call your Active Directory when prompted for username and password. Then all that is left, is to set up your SQL Server, which we’ll cover in the next part.
Other articles for this series:
Part 1: Create Azure Network and Storage
Part 3: Setup your SQL Server for testing purposes.
Leave a Reply