Azure Service Fabric REST API - 如何将应用程序包复制到图像存储?
Azure Service Fabric REST API - how to copy application package to image store?
我正在寻找 Service Fabric REST API 方法,用于将应用程序包复制到 Service Fabric 集群的映像存储。即,类似于 Power Shell cmdlet Copy-ServiceFabricApplicationPackage and Service Fabric Client .NET API method FabricClient.ApplicationManagementClient.CopyApplicationPackage.
的方法
我在Service Fabric Client REST API Reference中找不到这样的方法。
如何使用 Service Fabric REST API 方法完成类似的操作?
AFAIK CopyApplicationPackage
和 Copy-ServiceFabricApplicationPackage
都使用 ImageStore API under the hood, so I think ImageStore REST API 是你要找的。
我设法使用 ImageStore REST API 方法 Upload File. In this case only the manifest files are uploaded as they define Azure Container Registry location where container packages are stored. After manifest files were loaded to ImageStore, I succeeded to Provision Application Type 将清单文件复制到 Service Fabric 集群。
让我头疼的细节:
- 上传文件:清单文件已上传到图像存储区的文件夹中,其中包含子文件夹。需要将空文件“_.dir”上传到每个文件夹;这是图像存储服务内部使用的标记文件,用于指示链接文件夹的可用性。请参阅 API 参考和 GitHub 讨论“Provisioning application type throws exception”。
- 可以使用 REST API 方法 Get Image Store Content 检查图像存储内容。无论如何,在提供应用程序类型之前,通过此方法看不到上传的文件。
- 如果你 Provision Application Type using 'ImageStorePath' option, the value given to body parameter ApplicationTypeBuildPath 是 相对于 到 'fabric:ImageStore'。我花了一些时间使用 'fabric:ImageStore/MyAppType',直到我意识到将其修复为 'MyAppType'。
我正在寻找 Service Fabric REST API 方法,用于将应用程序包复制到 Service Fabric 集群的映像存储。即,类似于 Power Shell cmdlet Copy-ServiceFabricApplicationPackage and Service Fabric Client .NET API method FabricClient.ApplicationManagementClient.CopyApplicationPackage.
的方法我在Service Fabric Client REST API Reference中找不到这样的方法。
如何使用 Service Fabric REST API 方法完成类似的操作?
AFAIK CopyApplicationPackage
和 Copy-ServiceFabricApplicationPackage
都使用 ImageStore API under the hood, so I think ImageStore REST API 是你要找的。
我设法使用 ImageStore REST API 方法 Upload File. In this case only the manifest files are uploaded as they define Azure Container Registry location where container packages are stored. After manifest files were loaded to ImageStore, I succeeded to Provision Application Type 将清单文件复制到 Service Fabric 集群。
让我头疼的细节:
- 上传文件:清单文件已上传到图像存储区的文件夹中,其中包含子文件夹。需要将空文件“_.dir”上传到每个文件夹;这是图像存储服务内部使用的标记文件,用于指示链接文件夹的可用性。请参阅 API 参考和 GitHub 讨论“Provisioning application type throws exception”。
- 可以使用 REST API 方法 Get Image Store Content 检查图像存储内容。无论如何,在提供应用程序类型之前,通过此方法看不到上传的文件。
- 如果你 Provision Application Type using 'ImageStorePath' option, the value given to body parameter ApplicationTypeBuildPath 是 相对于 到 'fabric:ImageStore'。我花了一些时间使用 'fabric:ImageStore/MyAppType',直到我意识到将其修复为 'MyAppType'。