Enabling Self-Service On-Demand Provisioning of Dev Environments

Check out other posts in this multi-author series by going here.

Development environments are a primary use case for using Azure today. As with production scenarios, the elastic nature of the cloud allows organizations to spin up computing power based on usage. If you only need a dev/test environment for a few minutes, then that’s all Azure will bill you for. In my experience though, Operations has been primarily focused on production – as they should be! Unfortunately, this means it can be challenging to find the resources needed to provision AND maintain development environments. On top of this, developers are being asked to dramatically increase their release cycles, so they may need to spin up and down numerous environments with very little advance notice to order hardware and then allocate time to provision and configure.

Enter Self-Service!! Azure gives your team the ability to stand up their own development and test environments. There are numerous ways to provision environments using Azure. In this post, I’ll detail the following options:

  • Visual Studio Platform Images for MSDN Subscribers
  • Visual Studio + Azure SDK
  • Azure Management Portal
  • Windows Azure Pack

Visual Studio Platform Images for MSDN Subscribers

In some cases, the only development environment you need is a machine running Visual Studio. Azure provides a gallery of virtual machine images with preinstalled software and it includes images with Visual Studio ready to go! (At the time I wrote this, these images were not available in the Azure preview portal [“Ibiza”] and were only available in the full Azure portal.)

Each Visual Studio image is tied to an MSDN subscription level. For example, as an Ultimate subscriber, I can provision a virtual machine preloaded with Visual Studio Ultimate since I own that license. (Selecting a version of Visual Studio that I am not licensed for can put my organization at risk of non-compliance!)

If you are a developer with Visual Studio Premium or Ultimate, then you are already Premium/Ultimate MSDN subscriber. If you are a QA person running Microsoft Test Manager, you are also an MSDN Premium subscriber.

Step 1: In Internet Explorer, navigate to the Microsoft Azure Management Portal (http://manage.windowsazure.com), click NEW in the bottom-left corner, select VIRTUAL MACHINE, and select FROM GALLERY.

Step 2: In the CREATE A VIRTUAL MACHINE wizard, select VISUAL STUDIO from the filter list, select the desired, and click the Next arrow. Be sure to select the image that corresponds to your MSDN Subscription level and the desired OS.

Step 3: On page 2, enter a unique name for your machine, select a tier/size, provide an administrator username/password, and click the Next arrow.

Step 4: On page 3, you can specify additional information about your virtual machine (DNS, subscription, region, endpoints, etc.). Click the Next arrow when you are finished.

Step 5: On the final page, be sure to leave the Install the VM Agent checkbox checked. This agent allows us to remotely interact with the virtual machine. Click the Finish checkmark to start the provisioning process.

And, that’s it! Alternatively, you could provision one of these images using PowerShell. You now have a virtual machine with the following software pre-installed:

Windows Server 2012

Windows 7

Windows 8.1

Visual Studio Professional, Premium, or Ultimate with Update 2

Yes

Yes

Yes

Windows Azure SDK for .NET 2.3

Yes

Yes

Yes

SQL Server 2012 SP1 Developer Edition

Yes

No

No

SharePoint 2013 Trial

Yes

No

No

Scripts to provision SharePoint 2013 and SQL Server

Yes

No

No

Develop for Windows Store apps

No

No

Yes

Develop for Windows Phone apps (coming later)

No

No

No

 

USE CASE: I work on several, very different types of projects concurrently.

Most developers have just one development machine, but most developers are also working on several different projects at the same time. If your projects differ dramatically, then you can stand up any number of Visual Studio environments in Azure. Each of these environments can be configured for the specific technologies and configurations you need on a given project without worrying about “dirtying” up your machine for other projects. And because Visual Studio supports roaming settings, you can opt to sync your IDE preferences across these machines. Visual Studio and MSDN are licensed per user, so you only pay for the Azure usage.

USE CASE: I’m a SharePoint developer.

In some ways, developing for SharePoint is much more challenging than developing traditional LOB applications. You either directly develop on Windows Server running on you host machine, develop locally and deploy/debug to a remote Windows Server, or develop on Windows Server running on a virtual machine. That last option is quite common, but it means your local machine needs an extravagant amount of resources on your local machine. With the pre-installed software and provided scripts on the Windows Server images, you can simply run some pre-installed PowerShell scripts to quickly stand up an environment ideal for SharePoint development. Included scripts let you set up SharePoint with or without Active Directory, setup a virtual network, provision a virtual machine for Active Directory, and joining to a domain.

USE CASE: My machine isn’t always up-to-date.

In some organizations, it can be very challenging to keep developers up-to-date with both hardware and software. Development teams within an organization often make up a small percentage of the employee base, so it’s challenging to dedicate some portion of your desktop support staff to just this group’s specialized needs.

  • Fast hardware: The tools, utilities, etc. often eat through resources like no other single machine in your organization, so Azure lets them scale the compute power for the needs at hand.
  • Latest VS and other software: Many organizations keep a list of evaluated and approved software that can be installed on employee machines. Unfortunately, developers and IT Pro’s are often called on to work with unapproved or alpha/beta versions of tools, utilities, and libraries. It can be especially disappointing to be “stuck” on older versions of Visual Studio while trying to develop “tomorrow’s” applications for the organization. While it doesn’t eliminate the need to be a responsible employee, by moving your development environment to Azure, these power users can use these as yet unapproved tools in a relatively safe way.
  • Admin access: Closely related to the last point, the somewhat isolated and potentially temporary nature of these cloud development environments means these users will have complete administrative access to these machines to install and configure the software as needed – a requirement to develop a lot of today’s modern applications.

Visual Studio + Azure SDK

One of the things we’ve been doing with the Visual Studio Azure Tools is to make the experience of working with cloud resources as seamless as working with your own local resources. Starting really with Azure SDK 2.2, we allowed to provision, debug, and shut down Azure resources without leaving Visual Studio.

Step 1: In Visual Studio, create a new web project and click the OK button. (This only works for those projects based on ASP.NET Web Applications, so it won’t work for applications like WCF.)

Step 2: The New ASP.NET Project dialog appears. In the bottom-right corner check the box labeled Host in the cloud and select either Web Site or Virtual Machine from the dropdown list. (I’ve always been confused why this page is needed. It seem like this stuff could be in the project’s Properties page.)


Step 3: If you elected to create a VM, the Create virtual machine on Windows Azure dialog appears. Provide the desired details like DNS name, VM image and size, and credentials. Click the OK button when you are ready.

After you click OK, you can immediately start writing code. The virtual machine provisioning will start in the background and Azure will do most of the work. The Visual Studio Output window will appear so you can follow along with what’s happening.

USE CASE: I develop ASP.NET web applications.

As you can see, if you are an ASP.NET web developer, we make it trivial to spin up an Azure Web Site or Virtual Machine to use as your development environment. You’ll still need to publish your app, but you’ll see we’ve already created the publish profile for your application.

If you are signed into Azure, the resource will appear in your Server Explorer under the appropriate Azure node. Amongst other actions, you can right-click it and select Enable Debugging. This enables remote debugging so you can run the web application in Azure and have it break into your local Visual Studio instance to see how it behaves.

USE CASE: I don’t use Visual Studio, but I provision environments for applications.

If you aren’t a Visual Studio user, then provisioning your application environment from the IDE won’t really help you. Well, you’re in luck! When a developer creates a new Visual Studio web project and opts to provision an environment, we actually do this by generating and running a PowerShell script. That PS script file, along with a JSON configuration file are saved with the Visual Studio project. The project creator can make these files available to you so you can modify as you choose and run them yourself. It’s common for developers to initially provision an environment using their own MSDN subscription to take advantage of their monthly credits, but soon after, it makes sense to spin these environments up for use by others. While the developer could do this, they may not be owners of the organization’s Azure account.

Azure Management Portal

Unlike the previous options, you are likely already familiar with the Azure Management Portal – the web application that gives you access to create, configure, and shut down all of our Azure services. But, did you know you can do much of the same thing with PowerShell and there’s even a REST API for developers?

While the current version of the portal is very focused on IT Pro’s, we are hard at work on a newer version of the Azure portal that is committed to offering a better DevOps experience. It’s our belief that a successful DevOps collaboration starts by providing more transparency between the developers and operations sides of the house. Among other things, this new portal will make it easy for operations to send identified issues with actionable feedback to developers in Team Foundation Server and let them track these issues as they move through the development team.

USE CASE: I’m not a developer.

The previous options are pretty obviously geared toward developers, but there are a lot of other people working on the technology solutions that run the modern business: business analysts, QA, product owners, and, of course, operations. People in these roles can use the management portal in their browser to check up on applications, networks, and other services. Whether you care about monitoring applications, managing billing, or configuring the wide variety of Azure services, the management portal is the one-stop shop.

USE CASE: For more fine-grained control or visibility into my Azure resources.

While Visual Studio is hands-down the best developer environment in the world, it does not provide you with all of the capabilities present in the management portal, PowerShell, client libraries and the REST API. Don’t forget about these other tools!

PowerShell can be used to automate common or complex tasks of all kinds, but Azure provides a specific set of PowerShell commandlets that can help you do things like the following:

Check out the Azure Script Center for more samples.

Sometimes, you need to integrate Azure management capabilities with your own applications. This is a brief description of many of what is provided by Azure’s web services.

Service Management Programmatically manage virtual machines, disks, SQL Azure, and cloud services
Azure Mobile Services Query and alter backend data and authenticate with specific identity providers
Web Sites Management Create and configure web sites; check status and usage
Storage Services Programmatically access storage account, blob, queue, table, and file services
Azure AD Graph Create, update, and delete users, groups, roles, and contacts
ACS Management Engage the Access Control Service for claims-based authentication
Managing BizTalk For BizTalk services, create, update, suspend/resume, or delete; create, delete, and list hybrid connections
Scheduler Create, update, and delete scheduled jobs
Service Bus Send and receive messages to or from the service

 

By the way, if you think of a feature that would really help you, let us know at our feedback site.

Windows Azure Pack

Windows Azure Pack is a collection of the tools we use to provide our cloud-hosted experience, but packaged up for you to provide an analogous experience on top of your on-premises resources.

You can download the Windows Azure Pack for Windows Server here.

USE CASE: I still have to manage some on-premises resources.

Wrap your on-premises resources with Windows Azure Pack to provide the following capabilities:

  • A customizable self-service portal
  • An administrative portal to manage user accounts and quotas
  • A service management API for integration into other systems
  • Virtual machine clouds for Windows and Linux IaaS
  • Web site clouds for scalable web hosting
  • Service bus clouds for reliable messaging

So, what goes where?

You should probably create some guidelines within your organization to define when you should use MSDN, when you should use your organization’s Azure subscription, and when you should use on-premises resources. Most organizations have policies on what kinds of data developers should have access to and how to access on-premises or third-party services for development. These same policies are a great starting point to define your organization’s policies on the use of Azure.

If your organization has already developed some policies on when to use Azure for dev/test, I’d love to hear about them. Every organization has a slightly different take on this, but I think there are probably some good, common practices.

Summary

I’ve tried to show you several options for setting up your development environment. But this is not the end of the road, we have a lot more ideas we’ll be rolling out in the next few months and for years to come. The idea of DevOps is not a new one, but no other company is better able to help you deliver on it than Microsoft!

About these ads

Posted on May 12, 2014, in Visual Studio and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 161 other followers

%d bloggers like this: