Creating a Visual Studio 2017 Developer Workstation in Azure

Here’s some brand new content from the SoftwareArchitect.ca YouTube channel that you might find interesting.

I had a few minutes to play in Azure this afternoon, so I recorded this video showing how you can create a “developer box” for Visual Studio 2017 in Azure.

Do you ever have a short-term need to develop something but don’t want to go and install a bunch of software on your local machine just so you can work in the code you hardly ever touch?

And sure, you can VirtualBox something, but then you need to install Windows and install the Visual Studio environment. And it’s hard to share that with others.

So you can create a developer box in the cloud. Spin it up when you need it, and shut it off when you don’t. A C# developer workstation ready to go.

Quickstart Series: Windows Web App in Azure

In this video, I show you how to create a Windows Web App in Microsoft Azure. Windows Web App. We go through the Azure Portal, and see how form fields get filled in. If you can’t afford to create resources in Azure, but want to see how it’s done in 2018, this is the video for you.

Or you can see the video directly on YouTube.

Transcript:

Hi guys, it’s Scott and I’m taking a little break from working on my courses to create this video for you on YouTube. I want to thank you so much for being here. Today we’re going to look at creating a Visual Studio developer machine within the cloud. A lot of times we might find ourselves needing to do some development and you can obviously go to the Visual Studio website, download a copy of Visual Studio, install it on your local machine. But maybe you don’t have a Windows machine at your disposal or maybe that Windows machine is not powerful enough for you. Or maybe you want to have a developer machine that other people can share so that you can just remote into it, do to development you need. And then other people can remote into it to do development that they need. So Microsoft Azure does have a Visual Studio images within the marketplace.

So if I go into the add resource and say Visual Studio, you can see here there’s a ton of options. Now I’m looking at the ones that are created by Microsoft. There is this option for this company called Genesys Source, it’s not an official Microsoft option. But you can see here they’re offering in All-In-One Visual Studio IIS and SQL server for around $49 a month, including the costs of the virtual machine. So you could set yourself up with this and you’ll have a basically a development box that you can use, including all the software set up and ready to go for around $50 a month. And so for a lot of companies that’s a very decent option. The other option is to have three servers, IIS Server, a SQL Server and Development Servers. And so you can have, you know, three servers to run your cloud environment for $99 a month.

So there’s these third party companies that offer this solution. Now what I’m looking for is the community edition because the community edition is free. So the enterprise edition would cost you a little bit. We can see here that we have Visual Studio, 2015, 2017, latest preview, latest release, and different options for operating systems. So let’s say I want the latest release of 2017 running on, I could get a Windows 10 box or a Windows Server. I’m going to choose the Windows Server option. So let’s hit create. So this is going to at the end of this process, I’m going to have a Visual Studio installed on Windows. I have to give it a name. So this is azsjdtestvisual. Now this name is only for me to see, so it’s going to appear on my dashboard. Now the choice of this type is pretty straight forward.

You get the cheapest options, of course are the physical magnetic, old fashioned spinning hard drive. When we get into choosing the virtual machine size, we will be offered virtual machines that support this option. If we go into these flash solid state drives, we’re going to get a different set of virtual machines and different pricing. Microsoft now has a premium SSD option as well. The premium SSD is sort of their highest performance lowest latency. If you are looking for production performance then the premium option is option to you. The standard disc is a slightly less performance and you know, good for development environments. I don’t think there’s any reason to choose premium in a development machine, but maybe you’d want that for your web servers, et cetera. Okay. We’re going to have to choose a name and I have a standard name that I use and we’re going to have to choose a password. Now this is the user ID and password I’m going to be using to log into this machine using Windows Remote Desktop, so it’s important to remember this.

Remember this is a Windows machine, so we’re using remote desktop or SSH. My only have one subscription is pay as you go. You may have a different one. Your corporate subscription, MSDN subscription, other types of subscriptions. I pay for everything that I use. Now, it’s asking me to create a resource group. Whenever I do testing, I like to put things into their own resource group because it makes it easy to clean up after, but if you have, and let’s say you need to create four or five of these for your developers, you may want to put them all into one resource groups. Resource groups are good for tracking costs for basically able to manage all the resources inside the group enter as one collective. The location, in this case, I would put the machines at the closest location to your developers. So if your developers are in Europe probably makes sense to have European hosted these machines because really it’s just one user who’s going to be using this.

Okay. So location only matters in terms of knowing physically where these people are going to be that use this machine and putting it closest to them. If you have the, this is called a hybrid option. If you have the Windows licenses through your agreement with Microsoft, a hybrid benefit could actually reduce the cost ’cause you wouldn’t have to pay for a license, additional Windows license online. So I don’t have a Windows license, I’m going to say okay. Now choosing the machine, now remember we’re doing this development machine for the purpose of having a decent development environment. So we’re going to want to … First let’s focus on the RAM. So we’re going to want a machine that has a decent amount of RAM like 16 Gigs RAM, something like that so that we can do development and things are snappy and fast and compilations and things like that.

A one Gigabyte RAM is going to be tough to do any kind of development on. Now it turns out these are the cheaper options of course, right? So one and two Gigabytes RAMS are $12 a month, $22 a month, $50 a month. So I would go for a higher RAM option if that’s me. So I would say 16 or maybe maybe eight, but 16 is probably right. Now you might look at this cost and say, oh my God, this is a lot more than I’m expecting to pay. Remember that you’re paying for the usage. And so if you’re smart about this, you can have this to auto shut down at a certain time. Let’s say your developers end work before 7:00 p.m. and So you could set this up so that it shuts down at 7:00 p.m. and then they only turn it on when they’re about to use it.

So they go to connect, they have to go into the portal, they switch it on. You could also do things via script where, you know, it turns on this machine or fires up this machine, and then connects to them forward. So I would even not, I’d not be too afraid of this because you’re not developing 150 hours a week. If you’re using this machine 10 hours a week, then you are basically paying 90% less than this. So let’s go ahead and select that one. So you’ve chosen to use a standard disc on sizes of course premium disc.

No, I’m not going to upgrade. I could use premium disc, but I’m not going to. Now the availability zones, we don’t have to worry about it. We’re not setting up development environments like this in Visual Studio to be low balanced, to be running on multiple machines. We’re going to leave the availability alone. Standard disc we chose, managed disks this are required for SSD types. So Microsoft is going to manage this for us and we don’t have to [inaudible 00:08:27] that storage accounts work will be a bit different because of managed disk. It’s going to … Every machine goes onto a network. I’m going to let it create a brand new virtual network and a brand new public IP address. We need a public IP address for this. We do need the RDP port. We know that we’re going to want to connect to this machine over RDP. Unless you’re going to set this up on a private network and require VPN access, then you could change this upright.

But in a public network we allow RDP. We’re not going to have any extensions. I’m going to enable shut down. So like I said, 7:00 p.m. I am in Eastern Time. So 7:00 p.m. in Eastern Time this is going to shut down. Maybe we do want to notify people when it’s about to shut down and so this can be the email address, I’ll turn that off, leave the default monitoring. It’ll create a storage account for any diagnostics. We’re not running this under a different identity. So we can see here creating a virtual machine allows us to create an account within Azure Active Directory. If I said yes, Azure will create an account for this in Azure Active Directory and use that account at the permissions of that account when the VM starts up. And then it will actually, when we delete the VM, it will actually delete the credentials as well. So I’m going to leave that up and say okay.

And so we can see here we’re signing up for B4ms VM, it’s going to cost us 24 cents an hour. Remember, we’re going to want to only use this when we’re in the development, you know, maybe nine to five or noon to five or whatever. We have hours of operation where we use this and so we’re not going to spend that $200 a month or $170 a month. I’m okay with that. I’m going to say create. So this is going to go off and create. S, so far this is acting just like a regular virtual machine, a Windows virtual machine. But remember, we’re actually having it install Visual Studio community edition option. So when this is done and when I remote into this, I’m expecting Visual Studio to already be there, already be set up and for us to be able to continue starting to basically a development project and have a server at our disposal to work on.

So we can see here I’m going to go up to the resource group, and we can see here that’s seven resources were created in this request. We’ve got the virtual machine, we’ve got an operating system disk for the virtual machine, the network interface card. The diagnostics that it’s going to be stored in a different account, public IP address, the network, and the network security group. So all of these resources got fired off a based on this request. We look at this it took six minutes and two seconds to get that spun out. That is pretty impressive to get a server and a development environment down, installed and running in six minutes and two seconds. So, when I go back into it here, go into the virtual machine, now we’re going to use Windows Remote Desktop to connect to it. So one of the ways you can do it, you can just go, there’s the IP address, I can go into Windows Remote Desktop and then just try to connect to this IP address. Remember we told them to open the RDP port. So we’re expecting the RDP port to be open.

Actually we can really quick double check that, the network security group actually if we go to the resource group, we go into the network security group, we go into the inbound rules, we can see that RDP was opened because we asked it to be opened, right? So on the virtual machine and we’re going to say connect. Now, this is going to download the RDP file to our computer and you’ll see out here and now if I click on this, Windows RDP should recognize it as that and it’s telling me that I was attempting to connect to a machine, I can authorize it. I do need to log in with those credentials and not with my credentials. So I have to say more choices and use a different account. That’s where I give the test user and password that I created when I created the virtual machine. Cross my fingers that this works. Click okay. Now it’s telling me I have to accept the security certificate because we don’t recognize it. That is perfectly fine. We expect it.

Now, this is the first time logging into the machine and we know that when a Windows computer first starts up, there’s some startup things going on. It’s creating me personalized settings, personalized desktop. It has to have the Windows directory available for my user. So there is from one time task that’s going on here and we can let this run. Now we’re starting to see the Windows desktop. We’re starting to see, we can see Visual Studio icon, we can see Unity icon right on the thing. Do we want this PC to be discoverable? So this is opening up network sharing. Generally not a good idea unless you really expect , and so I’m going to say no to that. Now this still is a Windows Server and so we will expect the startup screen from the Windows Server to come in a moment or two. All right, so this is the typical screen that starts up when you start a Window Server log in for the first time. It gives you this option to add rules and add things if I wanted to. Let’s check to see if IIS is installed, remote desktop services.

So we’ve got file services. We do not have the Web server installed on this machine, so this would be where if we wanted on local version of IIS, if we needed it for some reason we could install IIS using this technique. I’m going to close that out. Now let’s go into Visual Studio. We’re going to expecting to see the first time running. Visual Studio is going to ask us who we are et cetera, et cetera. But we can see we’ve got a Visual Studio 2017 on this image, we didn’t have to install it, download it or do anything with it. So this is the first time Visual Studio is running. We can choose which language we prefer to work in. We can choose a theme. I was working with the dark theme these days and Visual Studio will optimize our environment, again preparing for first time use.

All right, so here’s, here’s where we are. So Visual Studio has sort of set itself up. The humidity edition does require you to sign in, so you’re going to need a Windows a Microsoft Live account or Windows license essentially. So sign in and then you’ll be able to work with Visual Studio within Microsoft Azure. Again, this is all completely free except for paying for the infrastructure of course. And you can do your development in here. Save your files and shut the machine down. And when you come back to it, pick it up where it left off.

So that is one way to get a Visual Studio development environment where you don’t want to install any software, you don’t have a Windows machine at your disposal. Maybe it conflicts with some other versions of Visual Studio that you have, et cetera. A quick and easy Windows machine at your disposal to do development. If you like this video, I appreciate it if you give it a thumbs up, if you hit the subscribe button and the notification button. I create videos talking about Microsoft Azure mostly, or enterprise architecture or software architecture. Would love to keep in touch with you, so thanks a lot guys and have a great day.