简体   繁体   中英

Azure service fabric continuous deployment and rollback options after upgrade

I read about continuous deployment of service fabric with VSTS. I need a help/suggestion in this scenario where

  • I have a group of services deployed by Continuous deployment in Azure
  • Now I upgrade one service, I know that when this upgrade fails, service fabric rolls back to the previous state. Lets assume the upgrade is successful, Now I run integration tests (as a part of build definition pipeline) and it failed, in this case how to rollback this particular service alone, so that the other services remains unaffected and roll back should be automated, there should not be any manual intervention

Example: -

  1. Push your code
  2. Upgrade the deployment of service A where group of services are running
  3. Perform integration tests
  4. On failure, Rollback service upgrade of A and on success, continue to upgrade other nodes

Can this be achieved fully automated in VSTS?

I referred this link: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade#rolling-upgrades-overview

The rollback API can only be used to rollback the current in-progress upgrade that is rolling forward to new version, you can roll back a completed upgrade through API, so you can't do it in VSTS build/release.

Based on this thread: Staging slot and vip-swap , you can create an instance for a new application version.

You can use the built-in service health monitoring . By implementing custom health monitors (that run your integration tests), you can report 'unhealthy' when they fail during upgrade. You can use this information to have SF automatically roll back the upgrade. (By configuring health thresholds.) You can also control upgrades manually, for example by using PowerShell Start-ServiceFabricApplicationUpgrade .

Scott Hanselman gave a good presentation about this in action here . Another example here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM