如何最方便地将依赖数百个文件的本机代码库部署到Windows Azure?

发布于 2024-11-10 06:02:39 字数 337 浏览 4 评论 0原文

本指南展示如何将包含单个 .dll 文件的 COM 对象部署到 Windows Azure角色使用启动任务机制。

现在我有一个 COM 对象,它依赖于数百个其他文件 - .dll 文件(我也自己构建它们)以及其操作所需的一些二进制数据,这些数据需要部署为目录树。将其包含到角色项目中(因为它是针对指南中的单个文件完成的)似乎相当愚蠢 - 这些文件不属于角色功能,而是角色仅依赖于 COM 对象。

如何最方便地将包含 COM 对象及其依赖项的巨大子树部署到 Windows Azure 上?

This guide shows how to deploy a COM object consisting of a single .dll file to a Windows Azure role using the start-up task mechanism.

Now I have a COM object that depends on several hundred other files - .dll files (I build them myself as well) and some binary data required for its operation that need to be deployed as a directory tree. Including that into the role project (as it is done for the single file in the guide) seems rather dumb - those files don't belong to the role functionality, instead the role just depends on the COM object.

How do I deploy a huge subtree containing the COM object and whatever it depends on onto Windows Azure most conveniently?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暖树树初阳… 2024-11-17 06:02:41

一种流行的技术是将这些文件存储在 blob 存储中。有两种方法可以实现此目的:

  1. 为 DLL 和依赖文件创建一个容器,并将每个文件存储在其自己的 blob 中。
  2. 创建 DLL 和依赖关系树的 zip 文件,并将该 zip 存储在单个 blob 中

通过提升的启动任务,您可以复制文件并安装 COM 组件。

选项 #2 可能会导致启动时间更快,因为它是单个副本,并且存储事务更少。您只需要捆绑一个 zip 应用程序(或将其存储在单独的 blob 中)。Nate

Totten 为 Windows Azure 构建了一个多租户 Web 角色,他用于部署网站的技术涉及上面的选项 #2(尽管不是如启动任务)我建议查看 项目 以查看 zip 文件如何复制到本地存储并解压缩

编辑:还有一个选择是查看 AzureRunMe,一个开源工具,用于在 Windows Azure 角色中解压和启动应用程序。

One popular technique is to store those files in blob storage. Two ways to do this:

  1. Create a container for your DLL and dependent files, and store each file in its own blob.
  2. Create a zip file of your DLL and dependency tree, and store that zip in a single blob

With an elevated startup task, you can copy down the file(s) and install your COM component.

Option #2 will likely result in a quicker bootup time, since it's a single copy, and it will have less storage transactions. You'll just need to bundle a zip application (or store that in a separate blob.

Nate Totten built a multi-tenant web role for Windows Azure, and the technique he uses for deploying a website involves option #2 above (although not as a startup task). I suggest looking at that project to see how the zip file is copied to local storage and unzipped.

EDIT: One more option is to look at AzureRunMe, an open source tool for unzipping and launching apps in a Windows Azure role.

初见你 2024-11-17 06:02:41

如果文件的更改独立于角色的更改过程,那么我会同意 David 的建议 - 我会将它们全部放在 Blob 存储中的 zip 中,然后使用启动任务来下载和安装文件。

但是,如果这些文件不会独立于角色中的文件进行更改,那么我会将这些文件打包在 .zip 中,然后运行启动过程以从角色中解压缩并安装这些文件。这种方法的优点之一是该项目在“devops”中部署和版本化非常简单 - 它对 Blob 存储没有任何依赖性。

最后一个选择是,您还可以将 DLL 放入 Azure 驱动器中 - 您可以在角色启动期间挂载该驱动器并从该驱动器安装 COM 对象。

If the files are going to change independently of the change process on the role, then I would agree with David's suggestions - I would put them all in a zip in Blob Storage and then use a startup task to download and install the files.

However, if the files are not going to change independently of the files in the role, then I would package the files in a .zip and then run a startup process to unzip and install those files from the role. One of the advantages of this approach is that the project is very straight-forward to deploy and version in "devops" - it doesn't have any dependencies on Blob storage.

One final option is that you could also put the DLLs in an Azure Drive - you could mount that drive and install the COM object from that drive during role startup.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文