Search code examples
c#azureazure-sql-databasesql-server-2014azure-batch

How to deploy an application that uses SqlServer as db server to Azure Batch


I am trying to execute a pre-existing application on Azure Batch. What I have done so far that I have studied about Azure Batch, since I am a beginner for Azure, and I have created a sample application in C# .NET (Console Application) that interacts with my Azure Batch account and executes an .exe application on Batch pool. My sample application creates a new Job on Azure Batch Pool and manages three different tasks for this Job. Now I look forward to my pre-existing application to execute it on Azure Batch. The problem is my application uses MS SqlServer as database server. I'm not sure how to deploy this app on Azure Batch. As we know, In Azure Batch, we have to upload our data files and application code on Azure Storage in case to execute on Batch Pool Nodes so here how would I suppose to upload my whole existing database. I would appreciate the precious suggestions for looking forward.


Solution

  • There are a few paths forward:

    1. Create a custom image that contains your application (MS SqlServer) with all of the data preloaded. You can use this custom image as the operating system to use for the compute node.
    2. Package your application (and even the data) as an Application Package coupled with a start task to install, if required. If you don't want to package the data as an application package, you can use a resource file for this instead. This does not require a custom image.
    3. Use a start task as you would like option #2, but use Resource Files to download your application. This might be a simpler option if you do not need to have Batch manage your applications. This does not require a custom image.
    4. Package your application and data as a Docker Windows Server Container. As of 2017-10-19, Batch provides "native" Docker container support with the SKU 2016-Datacenter-with-Containers. You need to specify a ContainerConfiguration on the pool and tasks' should specify TaskContainerSettings. Note that this documentation is for REST, the .NET documentation is forthcoming.

    The custom image path may be the path of least resistance, but may require more upkeep in the future depending upon your scenario requirements for software freshness and data needs.