GithubHelp home page GithubHelp logo

javierromancsa / automate-data-ingestion-and-computation-for-a-containerize-hpc-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azuregomez/batchtask

0.0 0.0 0.0 177 KB

Submit batch job and task for existing pool

License: MIT License

C# 100.00%

automate-data-ingestion-and-computation-for-a-containerize-hpc-app's Introduction

Automate data ingestion and event trigger HPC compute for containerize apps or tasks

Using ADF, Az Storage File Share, Az Blob, Az Function app, Az Batch and ACR, to Automate genomics raw sequence data for ingestion and computation.

acrchitecture

BatchTask

This repo implements an Azure Function that runs on a Linux plan.

  • Submits a batch job and task for existing pool.
  • Uses a container for the task.
  • Implemented in C#, .net core.
  • Sends output files to Blob
  • Triggered by HTTP
  • Expects a JSON body
  • Task name will be the job name with a suffix of DateTime in ticks.

Pre-requisites

  • Azure Subscription
  • Azure Data factory pipeline builded
  • Existing Azure Batch Account
  • Existing Azure Container Registry with images to be used by tasks
  • Existing Azure Batch Node Pool with configured images
  • Viaual Studio 2019 or later version. The code can also be ported to VS Code.

Building Azure Data factory pipeline and Azure Files Configuration

Configuration Required (in the Function App)

Name Value
AccountName Name of the Batch account to be used
BaseUrl Full url of the Batch account, like https://yourbatchaccount.azregion.batch.azure.com
KeyValue Batch Account Key. To be used in order to create the job and submit the task
ImageName Container Registry and image name to be used by the task. Example: myregistry.azurecr.io/myimage:v1

Sample JSON Body

{ 
  'poolName' : 'batchpool1',
  'jobName' : 'job1'
  'taskCmd' : '/software/myscript.sh'
  'containerArgs': 'arguments_for_the_task', 
  'outputFiles' : [
      {
            'destination' : {
                'container' : {
                    'containerUrl' : 'https://myblobaccount.blob.core.windows.net/myblobcontainer',
                    'path' : 'task_output',
                    'identityReference' : {
                        'resourceId' : '/subscriptions/mysubscription/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mymanagedidentity'
                    }
                }
            },
            'filePattern' : '**/*',
            'uploadOptions' : {
                'uploadCondition' : 'taskcompletion'
            }
        },
        {
            'destination' : {
                'container' : {
                    'containerUrl' : 'https://myblobaccount.blob.core.windows.net/myblobcontainer',
                    'path' : 'task_output',
                    'identityReference' : {
                        'resourceId' : '/subscriptions/mysubscription/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mymanagedidentity'
                    }
                }
            },
            'filePattern' : '../std*.*',
            'uploadOptions' : {
                'uploadCondition' : 'taskcompletion'
            }
        }
    ] 
}

Links

https://docs.microsoft.com/en-us/azure/batch/batch-docker-container-workloads

https://docs.microsoft.com/en-us/azure/batch/batch-task-output-files

automate-data-ingestion-and-computation-for-a-containerize-hpc-app's People

Contributors

azuregomez avatar javierromancsa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.