Develop in the Cloud!

Another copy/paste from my other blog: www.IndieDevSpot.com

To read this article there: https://indiedevspot.azurewebsites.net/2014/09/29/develop-in-the-cloud/

The end of that article contains a contact form that you can use to reach me.

-----------------------------------------------------------------------------------------------------------------------------------

Hello Readers,

This particular article goes out to a few of my students.  I teach C# at a local community college during my Thursday evenings.  One of the things that happens, especially at community colleges, is that you get all sorts of different people from various walks of life.  These walks of life do not always come with laptops with i5 processors and 4gb of ram and 500gb hard drives.  These students only have access to library computers, or computers that are left over from a previous owner that are good for little else than checking email and browsing the internet.  Which in this day and age is perfect for doing hardcore development, but you have to do it in the CLOUD!

alive

So lets get started with how to do this.

  1. Get an Azure account.   https://azure.microsoft.com/en-us/ You can do the free trial (recommended).  If you are a student or a startup, you need to contact me via the contact form or twitter: @DavidCrook1988.  I will give you free space on Azure to do this.  The entire solution is very cheap and you only pay when you use it.  Perfect.  We are talking less than $20/month (depending of course).
  2. Log In to Azure.

 

Browse to the Portal

The portal is sort of like your command center for Azure.  It has everything that you have built.  If this is your first time to Azure, there is very likely nothing there.  You should be able to see much of what I have from this image.

AzurePortal

Select Virtual Machines from the Left Panel

Virtual Machines is the first conduit to one of the services that Azure Offers, IaaS (Infrastructure as a Service).  Azure’s IaaS is phenomenal.  I have used these services quite regularly in Dev/Test scenarios and you can replicate your entire production deployment right here for very good realistic tests, even going so far as geo dispersed solutions cross data centers.  Needless to say, there are many other situations you can use it for, that’s just my personal experience with it.

VMs

Select to Create a Virtual Machine from Gallery

Azure has several prebuilt options that through extensive telemetry we have determined are the most common configurations and have made them available at the click of a few buttons.  This is great, because now we can even SKIP THE INSTALL and just have Visual Studio ready to roll once the box is allocated for us.

FromGallery

Select Visual Studio 2012 Ultimate or later Edition

Make sure you still choose Ultimate if it is available though.  Any time you get the opportunity to use this very expensive version of Visual Studio for essentially free, you totally should, even if you don’t use the features :).  What this is doing is creating a Windows Server 2012 (or later) Virtual Machine that is pre-loaded with Visual Studio 2012 on it along with a few SDKs :).  Excellent!

VSImage

Choose your Configuration – Name/User/Size

This is a bit tricky to really hone in on for what makes financial sense mixed with what makes sense for my application.  The nice thing is, you can change the size on the fly WITHOUT shutting down your VM.  So I just rolled with the default, because 2 cores and 3.5 GB of memory seem about right for VS.

configuration

Choose your Configuration – Services/Locations/Endpoints

This is a place many users get stuck as well.  I like to roll new stuff for each of my VMs, because, I am probably going to Nuke it eventually, and for me personally it makes it easier to find.  The flip side is that you might be an organization, so you should roll with whatever naming standards, services, and storage you allocate for your use case.  For my students, just use new everything and follow the image, except for Region.  Choose the region closest to you.  If you see multiple, just pick one.  (Its probably a duplicate datacenter).

configuration2

Choose your configuration – Extras!

So I was pretty excited when I saw this new page, WOOT for knowing your audience!  If you are putting up a Visual Studio Image in the cloud, you probably want to use Chef, Puppet or Custom Scripts.  These are more advanced features and out of the scope of this article, but I definitely wanted to call out how awesome it is to have those available as instant installs.  For this, we just want the VM Agent.

configuration3

Push next and wait till its ready!

So configuration and everything is done.  Now we just wait for it to allocate space and get everything set up.  Takes about 3 minutes (maybe less) according to what I just did just now (I didn’t pay that close of attention).

ImageReady

Great, I have a VM, but how do I do something with it?

Connecting to your VM

This is probably one of my favorite parts of the VMs in Azure.  No longer do you have to memorize all of those numbers and garbage.  There is literally just a button that says “Connect”!  Navigate back to the Virtual Machines view and select your new Virtual Machine.  On the bottom row, you should see this incredible button appear!

connect

The art of clicking YES – Even if you don’t know what it does!

So just like it sounds, just click yes a bunch of times through all of the scary looking windows.  If you want, you can read it, but if you click NO on any of them, you just have to go back and start over and click YES anyways.  You will also be prompted for credentials.  Use the same username/password you set up in the configuration section of this article.  I am only posting pictures of that.  You will see the scary warning messages to ignore as they come up menacingly.

credentials

ITS ALIVE!!!!

So you have an RDP connection now into your virtual machine that lives in Azure.  Now you can do your hardcore development from a tablet, the library, or any other under powered location you feel like it as long as you have an internet connection, you are ready to code!

alive