5
votes

I am writing an application that will be deployed both to the cloud and to on-premise data-centres (for those clients who, essentially, don't yet trust the cloud with their data.

If i choose to go MS Azure I can use the new cloud project types with their Web and Worker roles. But how can I get the worker roles running for the on-premise variant?

Do I have to write my own host (say as a windows service)? This is not ideal as it requires additional code and deployment.

Is there an Azure compatible approach, say in the Windows Azure Pack or the App Fabric stuff (is App Fabric still current?) that doesn't require the full setup of the private cloud ?

2

2 Answers

4
votes

This doesn't exist in Azure Pack.

There is no need to try and have a Worker Role on premise. All you need to do is to have a Virtual Machine that you install a Windows Service on.

It's easy to create a Windows Service using Topshelf.

Deployment of a Windows Service with Topshelf is actually much easier than deployments for Worker Roles because you just run the .exe you create with the install and then with the start arguments.

Because of this you actually need less code than for a Worker Role since you don't need a second wrapper project.

0
votes

While I haven't used Windows Azure Pack before it does seem capable of providing this functionality in house, however the requirements and setup procedures are intense and it is certainly geared towards enterprise.

A better option is for you to create a console app that triggers the OnStart() and Run() functions for your WorkerRole based on your OS Task Scheduler.

Not too much work in my opinion and you get to keep your WorkerRoles as is but just add the console app for any on premise solutions.