Add multiple Public IPs to Azure ARM loadbalancer

I am not sure about you, but I certainly find that certain tasks in Azure are just painful. Either the documentation is out of date, or it just does not exist. I get that the platform is moving so fast that keeping documentation up to date is a big ask. Yet a few years ago deploying code and features with such pace was also tough…. Rant over. I promise.

What I wanted to do was to have multiple websites hosted on different public IP addresses. Simple. Well it wasn’t and I am hoping that the following powershell will help you out.

GOTCHA – So I learnt the hard way, that there is a limit of 5 static public IPs that can be added to an Azure LB. To be able to add more you have to request it from Azure support.

#Set Resource group and location.
$RG=’My resourcegroup name’
$Location=’northeurope’
$lb=Get-AzureRmLoadBalancer -Name AzureLBName -ResourceGroupName $RG

#Create new public IP’s. Remember you get 5 free with your subscription. The rest are charged each month.
$PIP1=New-AzureRmPublicIpAddress -Name PublicIP-website1 -ResourceGroupName $RG -Location $Location -AllocationMethod Static
$PIP2=New-AzureRmPublicIpAddress -Name PublicIP-website2 -ResourceGroupName $RG -Location $Location -AllocationMethod Static
$PIP3=New-AzureRmPublicIpAddress -Name PublicIP-website3 -ResourceGroupName $RG -Location $Location -AllocationMethod Static

#Create the new front end configurations. These contain the public IP addresses.
$FEConfig1=New-AzureRmLoadBalancerFrontendIpConfig -Name FEConfig1-website1 -PublicIpAddressId $PIP1.Id
$FEConfig2=New-AzureRmLoadBalancerFrontendIpConfig -Name FEConfig2-website2 -PublicIpAddressId $PIP2.Id
$FEConfig3=New-AzureRmLoadBalancerFrontendIpConfig -Name FEConfig3-website3 -PublicIpAddressId $PIP3.Id

#Add Frontend configurations to the LB
$lb.FrontendIpConfigurations.Add($FEConfig1)
Set-AzureRmLoadBalancer -LoadBalancer $lb

$lb.FrontendIpConfigurations.Add($FEConfig2)
Set-AzureRmLoadBalancer -LoadBalancer $lb

$lb.FrontendIpConfigurations.Add($FEConfig3)
Set-AzureRmLoadBalancer -LoadBalancer $lb

At this point if you look in the Azure portal all you will be able to see if the new Static Public IPs. To see the new front end configurations you need to call your $lb value back.

Now you need to join up an Azure LB rule and Probe to the new front end configuration that has the Static public IP in it. At the time of writing this, I could not do this in the Azure Portal. As the Azure portal only exposes the default public IP of the LB.

So I wrote these additional lines of Powershell. Note I reused the $lb variable we set earlier. I only have one backend pool. You may have more. I will show you how to bind one rule to a front end configuration. You can scale this out as required. Also I am opening up TCP 1433 for SQL in my example. You may want to open HTTP. So please change as required. Finally I actually created my probe using the Azure portal before I ran these commands.

#Set some variables for the values we will require in the next command. Failing to do so will result in a lovely error!
$FEconfigWeb1=Get-AzureRmLoadBalancerFrontendIpConfig -Name FEConfig5-website1 -LoadBalancer $lb
$BEpool=Get-AzureRmLoadBalancerBackendAddressPoolConfig -LoadBalancer $lb -Name “LB_POOL”
$ProbeWeb1=Get-AzureRmLoadBalancerProbeConfig -LoadBalancer $lb -Name Probe-Website1

#Add the new backend rule to an existing Probe and frontend config.
$lb | Add-AzureRmLoadBalancerRuleConfig -Name “Website1_Rule” -FrontendIPConfiguration $FEconfigWeb1 -BackendAddressPool $BEpool -Probe $ProbeWeb1 -Protocol “Tcp” -FrontendPort 1433 -BackendPort 1433 -IdleTimeoutInminutes 15 | Set-AzureRmLoadBalancer

I hope this helps.

Advertisements

Reflections on hosted telephoney

This past few weeks have been really interesting as I have been digging around in the world of hosted telephony & UC solutions. As a company we have had little mandate to look for hosted services but I am looking to change that ethos and move some of our non core ( and by that I mean core to the business not IT) to hosted or “cloud” services.

Another key driver being imposed on me and my team is to gain flexibility of being able to scale up and down quickly. Great I thought my goals and business goals are fully aligned and we set about speaking to vendors.

So far I have spoken to two UC providers, one who uses MyTel and the other Cisco. The story is the same, minimal CAPEX costs (handsets mainly) and a OPEX cost model, as you would expect.

At this stage I am less concerned with features and feature parity, I think they are all similar and I know they will for the most part do what I need. What is of interest are the terms, duration of contract and dealing with the variability. All things that I just thought would be simple, however maybe I have been a little wet behind the ears here but I found a few things out that may help others who are looking for hosted UC and telecoms.

It is pretty evident that nearly every vendor that I have spoken with have a hosted offering through one of many channel partners. You can scale up as much as you like but if you want to scale back then you had better think again. As the vendor licensing program’s do not seem to support doing that as the channel partner has to by X licenses and put them aside for your business, so why would they foot the bill if you decided two months in to drop say 30% of your users off their platform.

The best deal I have found to date is one channel partner would allow us to flex down by 15% but in return we had hiked monthly rates and had to commit to a five-year contract!

To date I have now spoken to the following vendors (Avaya, MyTel, Cisco, Arista and Gamma) and some of their channel partners hosting their respective platforms and the story of scale up but not down is unanimous. Yet they all tout a consumption based model in the cloud is what they do. I disagree and think that they all need to get up to speed here, as there must be other businesses of a similar size who are looking for the same flexibility.

There is however some hope…

I wrote that first section a few weeks back and I never got around to publishing it. Since then I actually discovered two channel partners one of which is using Avaya and the other is on….

They both offer a true consumption based offering that you can scale up and down as you need too. The Avaya partner is interesting as they are pioneers in some respects, as they were the first partner to convince them to offer this type of license model and as such they have worked with them to fine tune this model.

I do not want to plug their business on my blog, but please message me in the comments if you would like to speak with them.

Microsoft Virtual Acadamy (MVA)

As you may have seen in an earlier post I joined the MVA. Thought I would give some first impression now that I have completed a number of courses and also high light some up and coming courses that Microsoft are dude to release.

I found out as I mailed some feedback to the dean and said branching the courses out into other areas would be good, such as virtualization. See his/her response below.

Now that I have reached the dizzy heights of silver membership I can say that I am actually enjoying the courses and the content. It’s toatlly free and obviously part of the M$ marketing drive to pedal their solution but in my eyes as a consultant it’s always good to know about more than one product as they all have strengths and weaknesses. The questions are not great but when you’re squeezing a course into a lunch break like me you don’t want taxing. Besides these are more like sales exams anyway.

Being a 360 gamer I cant help but love achievements, whilst I am not a gamer score whore (gamers will understand what they are) I still like to see the little pop up from time to time. Its much the same with the points/rank in the MVA, and that alone will keep me coming back for more!

E-mail response from Microsoft MVA Dean about up and coming courses. Being  VMware guy I for one am looking forward to see how the Hyper-V skills transfer goes.

There are certainly more courses coming and we have them lined up to release starting from around 25th April. Below I’ve set out the roadmap for you.

May 15th                                   Microsoft Virtualization for VMWare Professional – The Platform

                                                      Microsoft Virtualization for VMWare Professional – Management

                                                      Microsoft Virtualization for VMWare Professional – VDI

May 16th                                  Success with Private Cloud

Post May 16th                       Office 365,

                                                    Office 2010,

                                                    Windows InTune,

                                                    System Center VMM 2012,

                                                    System Center Config Manager 2012,

                                                   Microsoft Cloud Offerings and the IT Pro,

                                                   Windows Azure Hands-on Lab,

                                                   Windows Azure Connect.

                                                  SQL Server “Denali”

We are also working on an update to the platform to enable you to either get emails about new courses or subscribe to an RSS feed for the same information.

 Regards,

Alan Le Marquand

Microsoft Virtual Academy Dean

Microsoft Virtual Academy

Not sure how much any of you reading this know about “the cloud” but I for one must admit I didnt really know a great deal. So I decided to set out on a mission to learn more. If like me you didnt know your SAAS from your PAAS then perhaps you should check this out.

http://www.microsoftvirtualacademy.com/Home.aspx

Its totally free and walks you through Microsofts Clould offerings. You watch presentations that talk around various aspects of  thier cloud solution. You can then take mini assessments to test what you learnt. Passing these tests you earn points that increase your standing with in the M.V.A, pretty cool, especially if like me your all about stats and leaderboards (thats the gamer in me talking!) You can opt in or out of the leaderboards, so dont worry if its not your thing.

The courses on offer cover off the basics of planning and managing your private cloud to the Azure Public cloud offerings.

From my own experience so far these tests are not taxing and can be taken as many times as you like, whilst they are there to test what you learnt I think they could stretch you more than they do. For me though the most important aspect is that I am getting a nice introduction into cloud and I have to say I didnt quite realise how many steps towards Cloud I had already taken.