简体   繁体   English

Azure:逻辑应用程序、容器和安装 Azure 文件共享

[英]Azure: Logic App, Container , and mounting an Azure File Share

I am trying to run a container instance using logic apps and I need to mount an azure file share .我正在尝试使用逻辑应用程序运行容器实例,我需要安装一个azure 文件共享

I am using a container with azure file share.我正在使用具有 azure 文件共享的容器。 This article is very clear on how to do this with command line. This article非常清楚如何使用命令行执行此操作。 https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files This works exactly as expected: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files这完全符合预期:

az container create `
    --resource-group pass `
    --name $CONTAINER `
    --image "$REGISTRY/$CONTAINER::latest" `
    --restart-policy Never `
    --registry-username $USERNAME `
    --registry-password  $PASSWORD `
    --os-type Linux `
    --cpu 0.2 `
    --memory 0.5 `
    --azure-file-volume-account-name $ACI_PERS_STORAGE_ACCOUNT_NAME `
    --azure-file-volume-account-key $STORAGE_KEY `
    --azure-file-volume-mount-path $ACI_MOUNT_PATH `
    --azure-file-volume-share-name $ACI_PERS_SHARE_NAME `
    --environment-variables ID=XXXX
az container logs --resource-group pass --name $CONTAINER    

How do you create the logic app task for the container.如何为容器创建逻辑应用程序任务。 I found the following properties:我发现了以下属性:

  • Container Volume Mount Path - 1容器卷装载路径 - 1
  • Container Volume Mount Name - 1容器卷装载名称 - 1

But I cannot see the equivalent of但我看不到相当于

--azure-file-volume-account-name $ACI_PERS_STORAGE_ACCOUNT_NAME
--azure-file-volume-account-key $STORAGE_KEY 

Also I need to:我还需要:

  • delete the container after the run运行后删除容器
  • delete a folder in the file share after the run ( I can't find a delete folder task, just delete file)运行后删除文件共享中的文件夹(我找不到删除文件夹任务,只删除文件)

Make sure az is up-to-date and use the following确保 az 是最新的并使用以下命令

az container create \
    --resource-group $ACI_PERS_RESOURCE_GROUP \
    --name hellofiles \
    --image mcr.microsoft.com/azuredocs/aci-hellofiles \
    --dns-name-label aci-demo \
    --ports 80 \
    --azure-file-volume-account-name $ACI_PERS_STORAGE_ACCOUNT_NAME \
    --azure-file-volume-account-key $STORAGE_KEY \
    --azure-file-volume-share-name $ACI_PERS_SHARE_NAME \
    --azure-file-volume-mount-path /aci/logs/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用逻辑应用程序在 azure 文件共享中提取附件并上传 - extract attachment and upload in azure file share using logic app 使用 sftp-ssh 通过逻辑应用程序将 1Gb 文件上传到 Azure 文件共享 - Upload 1Gb file through Logic app using sftp-ssh to Azure File share 在逻辑应用和 Azure 应用功能之间共享应用服务计划 - Share App Service Plan between Logic Apps and Azure App Functions 在通过 Azure 逻辑应用程序中的创建 blob 操作完成整个写入操作之前,Azure blob 容器中的 0 kb 文件 - 0 kb file in Azure blob container before entire write operation completes via Create blob action in Azure Logic App 编辑Azure逻辑应用 - Editing an Azure Logic App Azure 逻辑应用程序可从 Azure blob 容器动态获取 Blob 内容,而无需在路径中保存文件名 - Azure Logic App to dynamically get Blob contents from Azure blob container without having to save the name of the file in path Azure逻辑应用程序:在Blob中创建CSV文件 - Azure Logic App: Create CSV File in Blob 用于接收带有附件的电子邮件的 Azure 逻辑应用程序 - Azure Logic App to receive email with attached file Azure 逻辑应用程序 - 将 csv 文件导入 Azure 中的 sql server 表 - Azure Logic App - import a csv file to a sql server table in Azure Azure SFTP逻辑应用 - Azure SFTP Logic App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM