Me and My Boss – The Saga Continues With Basic Tier Azure Virtual Machines
Me and My Boss – The Saga Continues With Basic Tier Azure Virtual Machines
Join the DZone community and get the full member experience.Join For Free
Man, my boss is always on my case. After what I did with Azure Mobile Services with him, he’s always after me. So this Friday, he calls me up in his office and following conversation happens between us:
Boss: The Virtual Machines we’re hosting in Azure, we want to bring the cost of them down.
Me: Boss, but they’re already very low. You got per-minute billing, different VM sizes to suit your need and on top of that we can bring our MSDN license to Azure, what more do you want?
Boss: Agreed (Me: Score!!! First time he agreed with me). But see if we can further bring the costs down. I don’t care much for our actual production servers but see if we can do something about dev/test VMs we are running in Azure. Essentially see if we can get no-frills VMs in Azure for our dev/test scenarios.
For the first time, I could see his point. He makes a very valid point. But then, him being a boss it is my duty to defy him plus I know that like last time he will give me a task and forget about that. Furthermore, recently Microsoft announced a lots of changes during their //Build/ conference and I have to catch up on those so I thought “screw him” and let me focus on what new stuff has been announced.
So I came back and started going through all the announcements and stumble upon something called “Basic Tier” for Azure Virtual Machines. It kind of looked interesting me so I started reading some more about it. As I read through the information about this, I realized this is exactly what my boss is looking for. Essentially from what I understood, Virtual Machines running under basic tier are:
- No frill Virtual Machines in the sense that they don’t provide “load balancing” and “auto scaling” though if needed you can bring your own load balancer. They are currently available for “General Purpose Instances” and not “Memory Intensive Instances”.
- They cost less than your standard instances (at this time about 10 – 20% cheaper depending on the instance size you choose.
Man-o-man … Did I hit the jackpot again??? This is exactly what my boss is looking for. Thank You, Thank You Microsoft for saving me again! I can now barge into his room and proclaim to be a superhero who saved his day (and his butt) again.
Excited and all charged up, I walked up to his room. I was about to enter his room but I saw two guys sitting with him. Now let me tell you about these two guys.
First, is a “Developer Dude”. Like a child, he wants to do all by himself. If there’s an API, nothing gives him more satisfaction and pleasure than to write code for that API. It doesn’t really matter if there’re already tools available to do the work. He would still want to write code :). I knew if I went into the room right now and talk about this basic tier, he would ask me the question “How would I create Virtual Machines in Basic Tier using Azure Service Management API”?
Second, is a “IT Pro Dude”. Like all other IT Pros, he live in the world of PowerShell. I know that he has been using Azure PowerShell Cmdlets, and the moment I talk about this he would want to know how can do work with this basic tier by using them.
I wanted it to be my moment of glory and wanted to go in prepared for all the questions I could be asked, I came back. Tried to find answers to the questions that I know Developer Dude and IT Pro Dude and to my surprise the answers were rather simple. The functionality already exists and same stuff can be used. Confident enough, I walked back into boss’s room. Those two guys were still there.
Me: Boss, Recently Microsoft announced “Basic Tier” for Virtual Machines. They are perfect for our dev/test scenarios + we will save anywhere from 10 – 20% on our Virtual Machine pricing. One catch is that these VMs don’t have “load-balancing” and “auto-scaling” feature and the other catch is that they are not available for “Memory Intensive” instances but that should be fine for the scenarios we’re considering.
Boss: That’s great! (I could see the shine in his eyes :)).
Developer Dude: But I use Azure Service Management API to create VMs. Do I have to use a new operation to create this basic tier VM? Where’s the API for that?
Me: (Confidently, as I already anticipated the question) No. You would still use “Create Virtual Machine Deployment” operation. The only change you have to do is when you want to create a basic tier VM, you just have to prefix “Basic_” to the VM size. So for example, you wish to create a “Basic Tier Medium Sized” Virtual Machine (or in other words “A2”), in the request payload you specify the value for “RoleSize” element as “Basic_A2”. I also handed him a sample request payload for creating a Virtual Machine which is included below.
<?xml version="1.0" encoding="utf-8"?> <Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <!--Your host service name--> <Name>DemoVM</Name> <DeploymentSlot>Production</DeploymentSlot> <Label>DemoVM</Label> <RoleList> <Role i:type="PersistentVMRole"> <!--Your virtual Machine Name--> <RoleName>MyWinVM</RoleName> <OsVersion i:nil="true"/> <RoleType>PersistentVMRole</RoleType> <ConfigurationSets> <ConfigurationSet i:type="WindowsProvisioningConfigurationSet"> <ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType> <!--Your Computer Name--> <ComputerName>MyWinVM</ComputerName> <!--Computer pass word--> <AdminPassword>S0m3thing</AdminPassword> <AdminUsername>AwesomeAdmin</AdminUsername> <EnableAutomaticUpdates>true</EnableAutomaticUpdates> <ResetPasswordOnFirstLogon>false</ResetPasswordOnFirstLogon> </ConfigurationSet> <ConfigurationSet i:type="NetworkConfigurationSet"> <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType> <InputEndpoints> <InputEndpoint> <LocalPort>3389</LocalPort> <Name>RemoteDesktop</Name> <Protocol>tcp</Protocol> </InputEndpoint> </InputEndpoints> </ConfigurationSet> </ConfigurationSets> <DataVirtualHardDisks/> <Label>bXlzdmMxZGlubzY=</Label> <OSVirtualHardDisk> <!--VHD address and source image name--> <!--replace these two properties to avaliable value--> <MediaLink>https://myaccount.blob.core.windows.net/vhds/abc123344.vhd</MediaLink> <SourceImageName>a699494373c04fc0bc8f2bb1389d6106__Win2K8R2SP1-Datacenter-201403.01-en.us-127GB.vhd</SourceImageName> </OSVirtualHardDisk> <RoleSize>Basic_A2</RoleSize> </Role> </RoleList> </Deployment>
IT Pro Dude: (Frantically browsing the Internet on his smart phone) …. Did they announce a new version of PowerShell Cmdlets just to support that? Man, now I have to go back and rewrite all my scripts. I tell you man, sometimes I wonder about Microsoft. Do they try to make our lives hard on purpose?
Me: Dude, Chill!!! Yes, the new version of PowerShell Cmdlets are announced but for this stuff to work you don’t really have to use it. You can still use old Cmdlets. So if you’re using “New-AzureQuickVM” Cmdlet to create a Virtual Machine, you would again prefix “Basic_” to the Virtual Machine . Again, for example, you wish to create a “Medium Sized” Virtual Machine (or in other words “A2”), in the request payload you specify the value for “-InstanceSize” parameter as “Basic_A2”. I gave him the command details.
New-AzureQuickVM -Windows -InstanceSize "Basic_A2" -ServiceName "DemoVM" -name "DemoVM" -ImageName "a699494373c04fc0bc8f2bb1389d6106__Win2K8R2SP1-Datacenter-201403.01-en.us-127GB.vhd" -Password "S0m3thing" -AdminUsername "AwesomeAdmin"
Developer Dude & IT Pro Dude: Man, Its’ Awesome!!! (Then both looked at me) What about you?
Me: (Considering I’m neither a developer nor an IT pro and a lazy bum) I got Azure Portal. The functionality is there on the portal so if I want to make use of it, I would simply go to Azure Portal and do it there.
Boss: (Already started working on cost spreadsheet and thinking how much his bonus will go up) Go on. Let’s start using the basic tier for our dev/test machines. what’re you waiting for?
Me: (Thinking) How about a thank you???
That’s it for this post. I hope through this (funny) story, I was able to convey the value proposition of this new feature. Jokes aside, I think Microsoft is making some really good progress on IaaS side and is evident from this change and many other changes announced recently.
As always, if you find some issues with the post please let me know so that I can fix it ASAP.
Published at DZone with permission of Gaurav Mantri , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.