我可以使用 Azure Functions 来自动化 linux 任务吗
Can I use Azure Function to automate linux tasks
这里有一个图表解释了我手动做什么&&我想自动化什么
- 连接到本地 gitlab-ce 实例
- 启动一个 gitlab 备份并等待它完成
- 将备份文件复制到 azure blob 并等待它完成
- 将备份文件从 blob 复制到 azure vm 并等待它
完成
- 连接到 Azure 虚拟机并恢复备份
我想自动执行那些我使用 azure 工具完成的任务。
有人可以指导我开始寻找的方向吗?
Azure Functions 可以执行这类任务吗??
谢谢。
谢谢Matt Stannett and Anand Sowmithiran。将您的建议作为答案发布,以帮助其他社区成员。
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
可以参考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
这里有一个图表解释了我手动做什么&&我想自动化什么
- 连接到本地 gitlab-ce 实例
- 启动一个 gitlab 备份并等待它完成
- 将备份文件复制到 azure blob 并等待它完成
- 将备份文件从 blob 复制到 azure vm 并等待它 完成
- 连接到 Azure 虚拟机并恢复备份
我想自动执行那些我使用 azure 工具完成的任务。 有人可以指导我开始寻找的方向吗?
Azure Functions 可以执行这类任务吗??
谢谢。
谢谢Matt Stannett and Anand Sowmithiran。将您的建议作为答案发布,以帮助其他社区成员。
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
可以参考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