无需 TFS 或 VSTS 即可自动部署 Service Fabric 项目
Automate deployment of Service Fabric project without TFS or VSTS
我知道您可以 publish a Service Fabric application written in C# using Visual Studio, and I have read this article on using TFS or VSTS 设置 Service Fabric 应用程序的持续集成 DevOps 构建。
我怎样才能使用 PowerShell 手动完成所有这些操作? 我知道我可以使用 this article on deployment 中的 PowerShell 执行以下操作:
- 使用Visual Studio打包项目。
- 将包传输到远程服务器。
- 当我在远程服务器的上下文中时,使用文章中的 PowerShell 脚本示例部署包。
相反,这里有两个我似乎无法弄清楚哪些可以帮助我从 PowerShell 执行此操作的位:
- 使用 PowerShell,当您处于 Visual Studio 的上下文中时,如何以与您相同的方式打包我的 Service Fabric 项目?
- 使用 PowerShell,我如何才能像在 Visual Studio 上下文中一样远程部署我的 Service Fabric 项目?
如果您还没有看过这篇 link,请查看 Deploy and Remove Packages using Powershell 文章。
Suppose you have a folder named MyApplicationType that contains the necessary application manifest, service manifests, and code/config/data packages. The Copy-ServiceFabricApplicationPackage command uploads the package to the cluster Image Store
获取目录并上传。然后你必须告诉它拍摄该图像并在应用程序中使用它。
The Register-ServiceFabricApplicationType command returns only after the system has successfully copied the application package. How long this takes depends on the contents of the application package. If needed, the -TimeoutSec parameter can be used to supply a longer timeout.
注册后您可以创建应用程序:
You can instantiate an application by using any application type version that has been registered successfully through the New-ServiceFabricApplication command
要通过命令行生成包,您可以在 sfproj 文件上调用 "Package" 目标。
在 create a deployment package for Service Fabric that includes all artifacts necessary to run the designed workflows at runtime
上查看我的回答
然后按照 blackSphere 建议的 https://azure.microsoft.com/en-us/documentation/articles/service-fabric-deploy-remove-applications/ 中的说明进行操作。
我知道您可以 publish a Service Fabric application written in C# using Visual Studio, and I have read this article on using TFS or VSTS 设置 Service Fabric 应用程序的持续集成 DevOps 构建。
我怎样才能使用 PowerShell 手动完成所有这些操作? 我知道我可以使用 this article on deployment 中的 PowerShell 执行以下操作:
- 使用Visual Studio打包项目。
- 将包传输到远程服务器。
- 当我在远程服务器的上下文中时,使用文章中的 PowerShell 脚本示例部署包。
相反,这里有两个我似乎无法弄清楚哪些可以帮助我从 PowerShell 执行此操作的位:
- 使用 PowerShell,当您处于 Visual Studio 的上下文中时,如何以与您相同的方式打包我的 Service Fabric 项目?
- 使用 PowerShell,我如何才能像在 Visual Studio 上下文中一样远程部署我的 Service Fabric 项目?
如果您还没有看过这篇 link,请查看 Deploy and Remove Packages using Powershell 文章。
Suppose you have a folder named MyApplicationType that contains the necessary application manifest, service manifests, and code/config/data packages. The Copy-ServiceFabricApplicationPackage command uploads the package to the cluster Image Store
获取目录并上传。然后你必须告诉它拍摄该图像并在应用程序中使用它。
The Register-ServiceFabricApplicationType command returns only after the system has successfully copied the application package. How long this takes depends on the contents of the application package. If needed, the -TimeoutSec parameter can be used to supply a longer timeout.
注册后您可以创建应用程序:
You can instantiate an application by using any application type version that has been registered successfully through the New-ServiceFabricApplication command
要通过命令行生成包,您可以在 sfproj 文件上调用 "Package" 目标。
在 create a deployment package for Service Fabric that includes all artifacts necessary to run the designed workflows at runtime
上查看我的回答然后按照 blackSphere 建议的 https://azure.microsoft.com/en-us/documentation/articles/service-fabric-deploy-remove-applications/ 中的说明进行操作。