简体   繁体   English

Azure Service Fabric持续集成在Visual Studio Team Services中失败(是VSO)

[英]Azure Service Fabric continuous integration fails in Visual Studio Team Services (was VSO)

I have tried to set up continuous integration to deploy my Azure Service Fabric cluster automatically on git push events in Team Services. 我尝试设置持续集成,以便在Team Services中的git push事件上自动部署我的Azure Service Fabric集群。 I followed the default template for a Team Services Build Definition and a Team Services Release Definition based on this guide: 我遵循了基于本指南的Team Services Build Definition和Team Services Release Definition的默认模板:

Set up continuous integration for a Service Fabric application by using Visual Studio Team Services 使用Visual Studio Team Services为Service Fabric应用程序设置持续集成

Here are my settings: 这是我的设置: 构建定义 发布定义

For the most part everything works for the first deployment. 在大多数情况下,一切都适用于第一次部署。 After that it throws the following error: 之后它会抛出以下错误:

An application with name 'fabric:/<APP>' already exists, its type is '<APP>Type' and version is '1.0.0.20160812.7'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.

From that it appears as though it is trying to completely redeploy the service instead of just upgrading the service. 从那看起来好像它试图完全重新部署服务而不是仅仅升级服务。 I have searched through all of the settings and tried creating and recreating the tasks but have not been able to resolve. 我搜索了所有设置并尝试创建和重新创建任务但无法解决。

Has anyone encountered this before? 有没有人遇到过这个?

You need to add or update a publish profile to enable the upgrade mode and use that profile to deploy the Service Fabric after the first deployment is succeed. 您需要添加或更新发布配置文件以启用升级模式,并在第一次部署成功后使用该配置文件部署Service Fabric。

To do this quickly, you can right click on your project and select "Publish" from Visual Studio, check "Upgrade the Application" option and click "Configure Upgrade Settings" if needed, and then click “Save Profile" link and commit/push the changes. 要快速执行此操作,您可以右键单击项目并从Visual Studio中选择“发布”,选中“升级应用程序”选项,然后根据需要单击“配置升级设置”,然后单击“保存配置文件”链接并提交/推送变化。 在此输入图像描述

Though there is an accepted answer, I would still like to add to this thread. 虽然有一个公认的答案,但我还是想加入这个帖子。 In the approach below we need to edit only the Azure Devops Task. 在下面的方法中,我们只需要编辑Azure Devops任务。 Hopefully this will be useful to others who may encounter the same issue: One simple workaround when you encounter this issue is to change the "Overwrite Behavior" under the Advanced Setting for the build task to "Always". 希望这对可能遇到相同问题的其他人有用:遇到此问题时,一个简单的解决方法是将构建任务的“高级设置”下的“覆盖行为”更改为“始终”。 However, care must also be exercised so that if there are services which may already be running - all of them do get upgraded via a rolling upgrade (see second image). 但是,还必须注意,如果有可能已经运行的服务 - 所有这些服务都会通过滚动升级进行升级(参见第二张图片)。

在此输入图像描述

To ensure that rolling upgrade is applied to all the services, in addition to the above, also ensure that the upgrade settings are configured as below: 为确保将滚动升级应用于所有服务,除上述内容外,还要确保升级设置配置如下:

升级设置

暂无
暂无

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

相关问题 通过REST API概述(用于Visual Studio Team Services和Team Foundation Server)从Microsoft vso WorkItem访问注释 - Accessing the comments from a microsoft vso WorkItem via REST API Overview for Visual Studio Team Services and Team Foundation Server Visual Studio Team Services - 如何将构建的 Windows 服务文件复制到 Azure VM - Visual Studio Team Services - How to copy built Windows service files To Azure VM 在 Visual Studio 中为 5 节点群集调试 Azure Service Fabric 应用程序 - Debugging Azure Service Fabric Application in Visual Studio for 5 node cluster 使用Visual Studio Team Services通过内存中的SQL数据库运行单元/集成测试 - Running Unit / Integration tests through an in-memory SQL database using Visual Studio Team Services 从VS2010中的WinForms代码对Visual Studio Team Services(是TFS在线)的身份验证失败 - Authentication to Visual Studio Team Services (was TFS Online) fails from WinForms code in VS2010 Visual Studio Team Services-将附件附加到工作项 - Visual Studio Team Services - Attaching an attachment to a workitem MVC 5构建在Visual Studio Team Services上失败 - MVC 5 build failing on Visual Studio Team Services Visual Studio Team Services程序集版本控制 - Visual Studio Team Services Assembly Versioning Visual Studio Team Services使用外部dll构建 - Visual Studio Team Services build with external dll 扩展Visual Studio Team Services(在TFS上在线) - Extend Visual Studio Team Services (was TFS Online)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM