lift-and-shift-service

Having written about lifting and shifting a Console Application, I decided to mirror the scenario and describe how a similar method can be used to lift and shift a Windows Service to Microsoft Azure.

Moving a Service to Microsoft Azure

Every time I dig a little deeper into Azure, I’m amazed at how much there is to know. Having done a few projects with Cloud Services in the past, I thought it would be interesting to see if it was possible to lift and shift a Windows Service into an Azure Worker Role.

Lift and Shift: The action of moving a workload to a new environment, without altering the application’s code.

Continue Reading…

Configuring Internal Endpoints Cloud Services

Opening Ports on Cloud Services

There are scenarios that warrants us to open ports of the Windows Firewall. Imagine an application that coordinates work across many compute nodes. The workload coordinator needs to know and manage each compute node.

The diagram above, depicts a Virtual Machine that has direct access to instances of a Cloud Service without going through a Load Balancer. Both the Virtual Machine and Cloud Service are deployed to a Virtual Network on Microsoft Azure. Using Internal Endpoints in this scenario, would not yield the desired configuration. Endpoints are defined at the Cloud Service boundary and are IP addresses belong to the Data Center’s Network Address Space. Therefore, In order to allow the Virtual Machine to communicate over specific ports to individual Cloud Service instances, we need to use PowerShell and a Startup Task to configure the Windows Firewall. Continue Reading…

InternalEndpoint

Configuring Internal Endpoints

There are many scenarios where Internal Endpoints make sense. Imagine a web application that needs to communicate with a middle tier. The communication between both Cloud Services does not need to leave Microsoft Azure networks. The diagram above depicts a scenario where a Web Role has access to a middle tier Cloud Service without going through the public Internet.

Role instances running in a Cloud Service on Microsoft Azure communicate through internal and external connections that vary depending on the type of communication that is needed. An internal endpoint can connect by using a protocol of HTTP, TCP or UDP.

The configuration of an Internal Endpoint is done through the Service Definition. Below is the template used to describe what can be done in terms of Endpoint configurations.  Continue Reading…

Deploying

Configuring Elevated Privileges

There are various scenarios that require us to execute applications with elevated privileges. It’s common for this requirement to surface during lift and shift efforts.

This configuration is done in the Service Definition file. It requires us to specify the Runtime Execution Context to elevated.

Runtime Configuration Template

This template uses the ProgramEntryPoint as an EntryPoint. Roles also support NetFxEntryPoint.

<Runtime executionContext="[limited|elevated]">
   <Environment>
     <Variable name="<variable-name>" value="<variable-value>">
      <RoleInstanceValue xpath="<xpath-to-role-environment-settings>"/>
    </Variable>
  </Environment>
  <EntryPoint>
     <ProgramEntryPoint commandLine="worker.cmd" setReadyOnProcessStart="true" />
   </EntryPoint>
</Runtime>

Continue Reading…

Deploying to a Virtual Network

Deploying a Cloud Service to a VNet

In a recent post about Microsoft Azure Virtual Networks, I made the recommendation that Cloud Services should be deployed to Microsoft Azure Virtual Networks. The driving factor behind this recommendation comes from my personal real-world experience, where I learned the hard way, that moving a deployed Cloud Service to a Virtual Network meant downtime… Continue Reading…

92e6c8b649650126b3dad3ccf657600c

Why are Virtual Networks Important?

As a developer, I used to forget about Virtual Networks. And to be fair, I shied away from pretty much everything that can be considered as infrastructure.

Microsoft Azure is a game changer! It requires Developers and IT Pros to collaborate on projects. Let’s take a moment to set things right. Developers and IT Pros are not competing against each other in this new world. They collaborate in order to produce value for the business and customers.

As we move to a Cloud First and Mobile First world, security is more important than it ever was. On Microsoft Azure, the first step towards securing your application resources is to create a Virtual Network. Continue Reading…

blob-latency

Find The Closest #Azure Data Center

I regularly get asked about how to choose a Microsoft Azure Data Center for optimal deployments. The answer is to pick the Data Center that is nearest to your users. For applications that have a broad user base, it’s favorable to deploy multiple instances of the application and to use Microsoft Azure Traffic Manager to direct users to the closest Data Center. This typically provides the best user experience. Continue Reading…

Star-forming_region_S106_(captured_by_the_Hubble_Space_Telescope)

Uploading Content to Azure Blobs

I use Azure Blobs on a regular basis. They’re generally really useful and help me through some tough situations. Working with Blobs is simple. You can interact with them using Visual Studio, third-party tools, REST and even through PowerShell.

The following PowerShell command demonstrates how I upload content to Azure Storage.

Set-BlobContent -StorageAccountName 'scaleupdowndemopkgs' `
                -StorageContainer 'packages' `
                -FilePath 'C:\Service\cloud_package.cspkg' `
                -BlobName 'extra_small_vm_cloud_package.cspkg'

Continue Reading…

d1d15bddf7b3d0c63d2f0822d02918ed

Saving Microsoft ARM Templates as JSON files on disk

If you are creating a brand new environment on Azure, you should be using Windows PowerShell and Resource Manager. Instead of creating and managing individual resources, use a template (resource model) to create a resource group that has the resources need to support your service. You can create your own templates or pick a template from the gallery.

If you’re starting off with the Azure Resource Manager (ARM), I recommend taking a look at what others have published. Then modify them to create a resource model that represents your service. Continue Reading…

missing! Lost! Gone!

Finding an Invisible NAS on a Network

Over the weekend I decided to migrate data from an older NAS (Network Attached Storage) device to a newer device. So I plugged in the new NAS and set it up with two brand new HDDs. Provisioned a RAID 1 (Mirror) and finally I secured the device with a better password than “blank“.

Plugging in the older device, I expected that it would show up in Windows Explorer, but it did not. I spent the next couple hours trying to figure out why I could not find the device’s IP. I connected to my router, looked at the DHCP map and it wasn’t showing up.

Obviously, I hadn’t used the device for some time and had forgotten the devices name. So here I was, with no IP or Name for the device. The RJ45 plugged in and the flashing lights telling me that something was going on… Continue Reading…