Thursday, 23 July 2015

Microsoft Exchange 2016 on Microsoft Azure

Microsoft Introduced Exchange Server 2016 to the world on May 2015 (Link) and yesterday (22nd July 2015) they announced Preview (Link) which is available for everyone to download (Link), test and learn.

As Exchange is officially supported on Azure (Link), I thought to create a step-by-step installation article which will help my readers in quickly installing & then evaluating rich features of Exchange 2016.

For those who wants to understand architecture changes in Exchange 2016 watch this (Link1 & Link2), for rest follow the steps below for installation – for those only interested in seeing installation steps, please skip azure steps :)

1) Created a VNET called as “DummyVNET” with IP Subnet as 192.168.1.0/24 which will host my active directory and single exchange server 2016.



2) Created 2 VMs inside this VNET.



3) This is how Both the VMs looks like from azure portal.



4) To make sure this VMs always get same Private IP address – I hardcoded it (static IP) using azure PowerShell commands.



5) Now Took RDP of Dummy-DC and made it as Domain Controller (Domain Name: DummyOrg.com), joined 2nd VM (DummyEx16) to this Domain (DummyOrg.com)

6) Installed Exchange 2016’s pre-requisite following this article (Link), you just need to install below before starting exchange 2016’s setup;

Microsoft .NET Framework 4.5.2 (Link)
Unified Communications Managed API 4.0 Runtime (Link)

7) Then Downloaded Exchange 2016’s setup file on “DummyEx16”



8) Started Installation – Below are some screen shots:









































9) Wow – Setup finished successfully and we are ready to get inside Exchange Administration (Admin) Center.



10) Various options (left side) which you can see inside admin Center.



11) Now,

I Pointed my public domain name “owa.dummyorg.com” to Azure VIP (Public IP) of VMs DummyEx16 and created endpoint for port 443
Created MX  record for “dummyorg.com” to Azure VIP (Public IP) of VMs DummyEx16 and created endpoint for port 25 (Note: Receive Connector is By Default Created in Exchange 2016 like previous versions)
Created Send Connector to send all emails from my exchange 2016 to Internet.

12) Tried Accessing OWA from internet and was successful in accessing it.



13) Sent a mail from my Gmail Account (shakeel977@gmail.com) to shakeel@dummyorg.com and Hey.! Received it :)


14) Now, Sent a mail from OWA (My Exchange 2016’s Mailbox) to my Gmail account (shakeel977@gmail.com) and :) received it on my Gmail..!! Hurray..!!




Tuesday, 30 June 2015

Configuring External Load Balancer in Microsoft Azure

In this article we will be having a look on how to create External Balancer and how Microsoft Azure built-in external load balancer distributes the traffic between the VM’s present within a Load-Balanced Set as depicted below:


To demonstrate the External Load Balancer, I have followed below mentioned steps:

1. Created two VM’s named “SQUONS-MITP-WS1” and “SQUONS-MITP-WS2” under the cloud service “squons-mitp-t2”. Both the server’s are running IIS service within them working as web server.


Note:  To make both the server highly available, I have configured both the server into Availability Set named “MITP_WS_AS”. You can also configure External Load Balancer between the VM’s which is not under any Availability Set.

2. Details of both the VM’s are as follows:


 As depicted above, it’s visible that both VM’s are sharing same public ip as they are in same cloud service whereas their internal ip addresses are different.

 3. As we will be accessing through web browser over http so we need to allow port 80 on Endpoints, as by default only RDP and PowerShell ports are allowed on Endpoints.

Note: Only one port 80 can be opened per cloud service, hence we can open port 80 for only 1 VM present within the cloud service and when we try to open port 80 for other VM then it shows an error stating endpoint rule already exist. So here in my scenario I have 2 VM's present within the cloud service and when the traffic comes for port 80 it will get mapped to the VM on whom I have created endpoint rule for port 80.

To overcome this problem, I have used External load balancer so that when the traffic comes for port 80 it will get mapped to External Load Balancer virtual ip and the load balancer will balances the traffic between 2 VM's accordingly.

4. To configure Load-Balanced Set, go to VM1 under Endpoints tab. Click Add.



5. Select “Add a Stand-Alone Endpoint” and click Next.


6. Specify the details of endpoint by providing the name of the endpoint, protocol to be used, public and private port to be opened.

Next tick on checkbox Create A Load-Balanced Set, to create new set for load balancing between VM’s.  It is used to load balance the network traffic from internet across the VM's of a cloud service.

Note: Enable Direct Server Return is used because the client incoming request can be of small bits but the server reply will be 'n' times of the incoming request in bits. So to relieve the load balancer to handle huge traffic load, the server directly respond to the client rather than going back through load balancer.

7. Now you need to define the parameters for Load-Balanced set, i.e. its name, Protocol to be used, on which port the probe will be sent to check the status of VM’s, probe interval in seconds which is sent every after 15 seconds by default to determine the status of VM’s, Number of probes which defines after how many probe the ELB can declare particular VM is down from the set (Keep alive timer).
Click Finish.



8. Now, will add the Endpoints to rest of the VM’s that will be participating in Load-Balanced Set and make them as a member of Load-Balanced Set SQUONS-WS-LB.

Go to VM2 under Endpoints tab. Click Add.



9. Here select “Add An Endpoint To An Existing Load-Balanced Set”, as I have already created one before.
Select the one which you have created from drop down box. If only one exist then it is selected by default.


10. Everything is reflected as it is from previously created endpoint apart from Name. Assign Name to the endpoint; here I mentioned the same as previous ‘HTTP’.
Moreover you can edit the Load-Balanced Set if you want to from this window and also can configure Enable Direct Server Return for VM2.
Click  Finish.



External Load Balancer is ready now; you can confirm the endpoint setting by going within the VM under Endpoints tab as depicted below:




Now you can test whether your configured External Load Balancer is functioning or not by browsing over internet as depicted below and check by refreshing the webpage its being load balanced or not:

Note: You can access your websites through public ip or through cloud service name. Moreover you can also use your own dns domain name by mapping cname to your existing domain.


 

Monday, 11 May 2015

Assigning Static ip address to VM through PowerShell in Azure

We can assign static ip address to VM in Azure through PowerShell and new management portal which was not possible in older Azure management portal.

Static IP address doesn't mean that TCP/IP configuration inside a VM will have "static ip" as ticked mark (no it will be dynamic in TCP/IP configuration), but azure will make sure the VM gets same IP address always.

In this article, we will have a look on how to assign static ip address to VM through PowerShell. Before assigning static ip address to VM, we should first create the Virtual Network and subnet so that we can assign one ip address from Virtual Network Subnet to VM.

Following things to be added while deploying VM via PowerShell so as to assign static ip address to VM from Network Subnet under Virtual Network.

$vnetName = "SQUONS-NETWORK"     # Name of Virtual Network
$subnet = "SQUONS-SUBNET"               # Name of Subnet created under Virtual Network
$staticIP = "192.168.1.10"                         # Static ip to be assigned to VM
New-AzureVMConfig -Name $vmName `
                                      -InstanceSize $size `
                                      -ImageName $imageName |

Add-AzureProvisioningConfig -Windows `
                                                    -AdminUsername $adminUser `
                                                    -Password $password |

Set-AzureStaticVNetIP –IPAddress $staticIP |
               Set-AzureSubnet –SubnetNames $subnet |
                          New-AzureVM -ServiceName $serviceName `
                                                    -Location $location `
                                                   -VNETName $vnetName

As we are assigning static ip address through PowerShell, I have already created Virtual Network in Azure management portal named as “SQUONS-NETWORK” and subnet named as “SQUONS-SUBNET”.



Now, while deploying the VM via PowerShell you get the option to assign static ip address as depicted below:

$adminUser = "Shakeel"
$password = "###########"
$serviceName = "squons"                # ServiceName means CloudService name e.g. “squons”
$location = "West US"                     # In which location you want to deploy your VM e.g. "West US"
$size = "Medium"                                       # Size/Tier name e.g. “Small/Medium/Large” etc
$vmName = "SQUONS-VNET-VM2"                # Name or Virtual Machine e.g. “SQUONS-VM1” 
$imageFamily = "Windows Server 2012 R2 Datacenter"
$vnetName = "SQUONS-NETWORK"                       # Name of Virtual Network
$subnet = "SQUONS-SUBNET"                          # Name of Subnet created under Virtual Network
$staticIP = "192.168.1.10"                         # Static ip to be assigned to VM
$imageName = Get-AzureVMImage |
                                                             where { $_.ImageFamily -eq $imageFamily } |
                                                             sort PublishedDate -Descending |
                                                             select -ExpandProperty ImageName -First 1

New-AzureVMConfig -Name $vmName `
                                      -InstanceSize $size `
                                      -ImageName $imageName |

Add-AzureProvisioningConfig -Windows `
                                                    -AdminUsername $adminUser `
                                                    -Password $password |

Set-AzureStaticVNetIP –IPAddress $staticIP |
 Set-AzureSubnet –SubnetNames $subnet |
  New-AzureVM -ServiceName $serviceName `
                            -Location $location `
                            -VNETName $vnetName



To verify the properties of deployed VM, use the following syntax:

Get-AzureVM –NAME “VM Name” –ServiceName “Cloud Service Name”





 

Sunday, 10 May 2015

Assigning Static ip address to VM in Azure

We can assign static ip address to VM in Azure through new management portal which wasn’t possible in older Azure management portal.

Static IP address doesn't mean that TCP/IP configuration inside a VM will have "static ip" as ticked mark (no it will be dynamic in TCP/IP configuration), but azure will make sure the VM gets same IP address always.

Before assigning static ip address to VM, we should first create the Virtual Network and subnet so that we can assign one ip address from Virtual Network Subnet to VM.

As we are assigning static ip address through new Azure management portal, I have created Virtual Network in new Azure management portal named as “SQUONS-VNET” and subnet named as “SQUONS-SUBNET1”.



Now, while deploying the VM in new Azure management portal you get the option to assign static ip address as depicted below:



Note: We can also assign static ip address to the VM which is already deployed in Virtual Network by going to VM “All settings” as depicted below: