简体   繁体   中英

Azure Batch integration with Bitbucket

Is there any way to build and deploy Azure Batch Application Packages when changes are pushed to Bitbacket repository?

I'm looking for the same Deployment approach as for Azure Functions or something like this.

To start with this is what I think on top of my head.

Cool, I will share some information and thoughts around this, I am sure you can make use of the information to help your idea.

There are 2 levels of application package:

  • Pool level; and
  • Task level

Detail information here: https://docs.microsoft.com/en-us/azure/batch/batch-application-packages

The pool level is set at the pool level and available to any task joining the pool where as the task level gets unpacked at the creation of task.

Please be aware of the max limits of pkgs etc: * https://docs.microsoft.com/en-us/azure/batch/batch-quota-limit#other-limits

Key

AFAIK, there is no flag which can tell the vm that the current pkg is updated, hence in your scenario 2 things can happen:

  • pool level Scenario: if you are joining the pool every time: If you can afford to create pool ie at the join pool level then you can keep the package name and every time the code is updated you can recreate the pool which will end up creating the whole thing again ie the new package will get picked up.

  • Task level: If you don't want to create pool all the time, then you can do it by creating new task every time your code gets changed, not the caveat to that will be the max limit which is described at the link above.

Both ways you can do it via user code but deciding between what scenario will suite you depends on the grand architecture of the case.

Information flow possibility at user end

  • some resource in bit bucket.
  • User at any change in that resource ==> packs it in *.zip format and then carry on with the batch side of things.
  • User create the pool or mention task level packages (depending on the detail above); can also add the versions for the same package (beaware of the max limits here)
  • pkg is available in vm.

Alternate approach:

  • There is another way this can be done which is non package way:
  • Mount drive to the node at start task:
    • And user code has to make user that drive always gets updated will latest version of “*.files”

I hope this help your scenario \\ design :) , thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM