0

here is a diagreme explains what i do manually && what i want to automate

this diagramme

  • connect to an on-premise gitlab-ce instance
  • start a gitlab backup and wait for it to finish
  • copy the backup files to azure blob and wait for it to finish
  • copy the backup files from blob to azure vm and and wait for it to finish
  • connect to azure vm and restore the backup

i want to automate those tasks that i do with an azure tool . can someone guide me to a direction where i can start looking?

can Azure Functions perform those kind of tasks??

thanks.

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
ossama assaghir
  • 298
  • 2
  • 16
  • 1
    You could achieve this using a _Durable_ Azure Function with the [Function Chaining pattern](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp#chaining). There is some documentation available [here](https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-python-vscode) that will step you through creating your first Durable Function. There are also samples available [here](https://github.com/Azure/azure-functions-durable-extension/tree/dev/samples). – Matt Stannett Oct 29 '21 at 09:07
  • 1
    thank you Matt for your respond , i'll start reading about it now. – ossama assaghir Oct 29 '21 at 09:12
  • 1
    You need to automate the initiation of the gitlab backup and pushing that as a blob to Azure blob storage - this part needs to run on-prem, so you could use Powershell to this. Then, your Azure blob storage ```trigger function``` can pick up the backup blob and do the rest of the steps via initiating a durable function, it has to use Azure sdk to restore the backup inside Azure VM. – Anand Sowmithiran Oct 29 '21 at 11:26
  • Please do not edit solution announcements into the question. Accept (i.e. click the "tick" next to it) one of the existing answer, if there are any. You can also create your own answer, and even accept it, if your solution is not yet covered by an existing answer. Compare https://stackoverflow.com/help/self-answer – Yunnosch Sep 12 '22 at 10:31

1 Answers1

1

Thank you Matt Stannett and Anand Sowmithiran. Posting your suggestions as an answer to help other community members.

You can achieve this using a Durable Azure Function with the function chaining pattern.

You need to automate the initiation of the gitlab backup and pushing that as a blob to Azure blob storage - this part needs to run on-prem, so you could use Powershell to this. Then, your Azure blob storage trigger function can pick up the backup blob and do the rest of the steps via initiating a durable function, it has to use Azure sdk to restore the backup inside Azure VM

You can refer to Create your first durable function in Python, Storage Providers for Azure Durable Functions, Azure Functions: How to manage Durable Functions with Blob Triggers?, and Automate Linux VM Customization Tasks Using CustomScript Extension

Ecstasy
  • 1,866
  • 1
  • 9
  • 17