Service fabric rollback to previous version from visual stuido or service fabric explorer












0















I have published service fabric application version 1.25.0 to the local cluster as well as a cluster in Azure through visual studio publish. All worked.



Visual studio gives me the option to upgrade the application too. But I could not able to find how to rollback and publish the previous version of my application let's say 1.23.0 from visual studio.



If it cannot be possible from the Visual studio is it possible to do it from service fabric explorer?



I have seen posts like Azure Service Fabric Rollback but they are related to PowerShell scripts I am more after looking to rollback from visual studio or service fabric explorer.










share|improve this question























  • i dont think that is possible from SFX (service fabric explorer)

    – 4c74356b41
    Nov 14 '18 at 11:07











  • actually, if you didnt unregister the app you should be able to do that

    – 4c74356b41
    Nov 14 '18 at 11:12











  • u mean unprovision type?

    – Dheeraj Palagiri
    Nov 14 '18 at 11:15











  • yeah, type and app.

    – 4c74356b41
    Nov 14 '18 at 11:18
















0















I have published service fabric application version 1.25.0 to the local cluster as well as a cluster in Azure through visual studio publish. All worked.



Visual studio gives me the option to upgrade the application too. But I could not able to find how to rollback and publish the previous version of my application let's say 1.23.0 from visual studio.



If it cannot be possible from the Visual studio is it possible to do it from service fabric explorer?



I have seen posts like Azure Service Fabric Rollback but they are related to PowerShell scripts I am more after looking to rollback from visual studio or service fabric explorer.










share|improve this question























  • i dont think that is possible from SFX (service fabric explorer)

    – 4c74356b41
    Nov 14 '18 at 11:07











  • actually, if you didnt unregister the app you should be able to do that

    – 4c74356b41
    Nov 14 '18 at 11:12











  • u mean unprovision type?

    – Dheeraj Palagiri
    Nov 14 '18 at 11:15











  • yeah, type and app.

    – 4c74356b41
    Nov 14 '18 at 11:18














0












0








0








I have published service fabric application version 1.25.0 to the local cluster as well as a cluster in Azure through visual studio publish. All worked.



Visual studio gives me the option to upgrade the application too. But I could not able to find how to rollback and publish the previous version of my application let's say 1.23.0 from visual studio.



If it cannot be possible from the Visual studio is it possible to do it from service fabric explorer?



I have seen posts like Azure Service Fabric Rollback but they are related to PowerShell scripts I am more after looking to rollback from visual studio or service fabric explorer.










share|improve this question














I have published service fabric application version 1.25.0 to the local cluster as well as a cluster in Azure through visual studio publish. All worked.



Visual studio gives me the option to upgrade the application too. But I could not able to find how to rollback and publish the previous version of my application let's say 1.23.0 from visual studio.



If it cannot be possible from the Visual studio is it possible to do it from service fabric explorer?



I have seen posts like Azure Service Fabric Rollback but they are related to PowerShell scripts I am more after looking to rollback from visual studio or service fabric explorer.







azure-service-fabric service-fabric-stateless






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 10:54









Dheeraj PalagiriDheeraj Palagiri

1,19311634




1,19311634













  • i dont think that is possible from SFX (service fabric explorer)

    – 4c74356b41
    Nov 14 '18 at 11:07











  • actually, if you didnt unregister the app you should be able to do that

    – 4c74356b41
    Nov 14 '18 at 11:12











  • u mean unprovision type?

    – Dheeraj Palagiri
    Nov 14 '18 at 11:15











  • yeah, type and app.

    – 4c74356b41
    Nov 14 '18 at 11:18



















  • i dont think that is possible from SFX (service fabric explorer)

    – 4c74356b41
    Nov 14 '18 at 11:07











  • actually, if you didnt unregister the app you should be able to do that

    – 4c74356b41
    Nov 14 '18 at 11:12











  • u mean unprovision type?

    – Dheeraj Palagiri
    Nov 14 '18 at 11:15











  • yeah, type and app.

    – 4c74356b41
    Nov 14 '18 at 11:18

















i dont think that is possible from SFX (service fabric explorer)

– 4c74356b41
Nov 14 '18 at 11:07





i dont think that is possible from SFX (service fabric explorer)

– 4c74356b41
Nov 14 '18 at 11:07













actually, if you didnt unregister the app you should be able to do that

– 4c74356b41
Nov 14 '18 at 11:12





actually, if you didnt unregister the app you should be able to do that

– 4c74356b41
Nov 14 '18 at 11:12













u mean unprovision type?

– Dheeraj Palagiri
Nov 14 '18 at 11:15





u mean unprovision type?

– Dheeraj Palagiri
Nov 14 '18 at 11:15













yeah, type and app.

– 4c74356b41
Nov 14 '18 at 11:18





yeah, type and app.

– 4c74356b41
Nov 14 '18 at 11:18












1 Answer
1






active

oldest

votes


















2














There is no Service Fabric Explorer option or buttons to make rollbacks or upgrades, There are some caveats in the deployment that you must pay attention to correctly use the Rollback, if it was just a button, it would increase the chances of making mistakes.



The rollback using scripts are not that complex, you should be able to to with just a few lines of code like the option provided in the answer you linked.



Also, rollback is simple to do but can be complex in some scenarios, for example, changing the configuration of existing services, backups, restores and so on, would be tricky to do an UI to handle many scenarios, using scripts make it more flexible and dynamic. Today the scripts are simple, but in case new features are added in the future, it wouldn't need many changes to support it.



Regarding the scenarios, you could make use of other approaches like:



The first scenario is: Deployment is successful but application is not behaving correctly



This scenario is very common when the new version is successfully deployed, the service runs without errors, but the application has bugs or does not work as expect.



To rollback to a previous version you must upgrade the application and target the Application Version deployed previously. Is just a simple upgrade command, unfortunately there is no "Previous Version" stored somewhere, you have to keep track of previous versions somewhere so that you can find the previous versions.



The command must be run manually like:



Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/VisualObjects -ApplicationTypeVersion 2.0.0.0 -HealthCheckStableDurationSec 60 -UpgradeDomainTimeoutSec 1200 -UpgradeTimeout 3000 -FailureAction Rollback -Monitored



The script Deploy-FabricApplication.ps1 have a parameter UnregisterUnusedApplicationVersionsAfterUpgrade that removes older versions from ServiceFabric Image store, if you use this approach you should avoid, because you have to copy the older version to SF and then apply the upgrade in case a rollback is needed. A better approach is implement an algorithm that runs nightly or after releases and remove old versions and keep the last N.



.



The other scenario is: Service failure during upgrade



In this case is easier to handle, because Service Fabric handles it for you, when you start the upgrade you have the option to make it automatic or manual.



In the automatic, if a service fails on startup, Service Fabric will see it and retry a few times, in case it persists, it will rollback to the service and the application to previous version automatically.



In the manual mode, Service Fabric will start the deployment, but won't take any action, and you should run scripts to continue the deployment to next stages or rollback. This approach is convenient if you have very sensitive services and updates need an extra caution, mainly to validate the behaviour and do manual tests before you continue with the deployment.



These settings can be found here






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298526%2fservice-fabric-rollback-to-previous-version-from-visual-stuido-or-service-fabric%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    There is no Service Fabric Explorer option or buttons to make rollbacks or upgrades, There are some caveats in the deployment that you must pay attention to correctly use the Rollback, if it was just a button, it would increase the chances of making mistakes.



    The rollback using scripts are not that complex, you should be able to to with just a few lines of code like the option provided in the answer you linked.



    Also, rollback is simple to do but can be complex in some scenarios, for example, changing the configuration of existing services, backups, restores and so on, would be tricky to do an UI to handle many scenarios, using scripts make it more flexible and dynamic. Today the scripts are simple, but in case new features are added in the future, it wouldn't need many changes to support it.



    Regarding the scenarios, you could make use of other approaches like:



    The first scenario is: Deployment is successful but application is not behaving correctly



    This scenario is very common when the new version is successfully deployed, the service runs without errors, but the application has bugs or does not work as expect.



    To rollback to a previous version you must upgrade the application and target the Application Version deployed previously. Is just a simple upgrade command, unfortunately there is no "Previous Version" stored somewhere, you have to keep track of previous versions somewhere so that you can find the previous versions.



    The command must be run manually like:



    Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/VisualObjects -ApplicationTypeVersion 2.0.0.0 -HealthCheckStableDurationSec 60 -UpgradeDomainTimeoutSec 1200 -UpgradeTimeout 3000 -FailureAction Rollback -Monitored



    The script Deploy-FabricApplication.ps1 have a parameter UnregisterUnusedApplicationVersionsAfterUpgrade that removes older versions from ServiceFabric Image store, if you use this approach you should avoid, because you have to copy the older version to SF and then apply the upgrade in case a rollback is needed. A better approach is implement an algorithm that runs nightly or after releases and remove old versions and keep the last N.



    .



    The other scenario is: Service failure during upgrade



    In this case is easier to handle, because Service Fabric handles it for you, when you start the upgrade you have the option to make it automatic or manual.



    In the automatic, if a service fails on startup, Service Fabric will see it and retry a few times, in case it persists, it will rollback to the service and the application to previous version automatically.



    In the manual mode, Service Fabric will start the deployment, but won't take any action, and you should run scripts to continue the deployment to next stages or rollback. This approach is convenient if you have very sensitive services and updates need an extra caution, mainly to validate the behaviour and do manual tests before you continue with the deployment.



    These settings can be found here






    share|improve this answer




























      2














      There is no Service Fabric Explorer option or buttons to make rollbacks or upgrades, There are some caveats in the deployment that you must pay attention to correctly use the Rollback, if it was just a button, it would increase the chances of making mistakes.



      The rollback using scripts are not that complex, you should be able to to with just a few lines of code like the option provided in the answer you linked.



      Also, rollback is simple to do but can be complex in some scenarios, for example, changing the configuration of existing services, backups, restores and so on, would be tricky to do an UI to handle many scenarios, using scripts make it more flexible and dynamic. Today the scripts are simple, but in case new features are added in the future, it wouldn't need many changes to support it.



      Regarding the scenarios, you could make use of other approaches like:



      The first scenario is: Deployment is successful but application is not behaving correctly



      This scenario is very common when the new version is successfully deployed, the service runs without errors, but the application has bugs or does not work as expect.



      To rollback to a previous version you must upgrade the application and target the Application Version deployed previously. Is just a simple upgrade command, unfortunately there is no "Previous Version" stored somewhere, you have to keep track of previous versions somewhere so that you can find the previous versions.



      The command must be run manually like:



      Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/VisualObjects -ApplicationTypeVersion 2.0.0.0 -HealthCheckStableDurationSec 60 -UpgradeDomainTimeoutSec 1200 -UpgradeTimeout 3000 -FailureAction Rollback -Monitored



      The script Deploy-FabricApplication.ps1 have a parameter UnregisterUnusedApplicationVersionsAfterUpgrade that removes older versions from ServiceFabric Image store, if you use this approach you should avoid, because you have to copy the older version to SF and then apply the upgrade in case a rollback is needed. A better approach is implement an algorithm that runs nightly or after releases and remove old versions and keep the last N.



      .



      The other scenario is: Service failure during upgrade



      In this case is easier to handle, because Service Fabric handles it for you, when you start the upgrade you have the option to make it automatic or manual.



      In the automatic, if a service fails on startup, Service Fabric will see it and retry a few times, in case it persists, it will rollback to the service and the application to previous version automatically.



      In the manual mode, Service Fabric will start the deployment, but won't take any action, and you should run scripts to continue the deployment to next stages or rollback. This approach is convenient if you have very sensitive services and updates need an extra caution, mainly to validate the behaviour and do manual tests before you continue with the deployment.



      These settings can be found here






      share|improve this answer


























        2












        2








        2







        There is no Service Fabric Explorer option or buttons to make rollbacks or upgrades, There are some caveats in the deployment that you must pay attention to correctly use the Rollback, if it was just a button, it would increase the chances of making mistakes.



        The rollback using scripts are not that complex, you should be able to to with just a few lines of code like the option provided in the answer you linked.



        Also, rollback is simple to do but can be complex in some scenarios, for example, changing the configuration of existing services, backups, restores and so on, would be tricky to do an UI to handle many scenarios, using scripts make it more flexible and dynamic. Today the scripts are simple, but in case new features are added in the future, it wouldn't need many changes to support it.



        Regarding the scenarios, you could make use of other approaches like:



        The first scenario is: Deployment is successful but application is not behaving correctly



        This scenario is very common when the new version is successfully deployed, the service runs without errors, but the application has bugs or does not work as expect.



        To rollback to a previous version you must upgrade the application and target the Application Version deployed previously. Is just a simple upgrade command, unfortunately there is no "Previous Version" stored somewhere, you have to keep track of previous versions somewhere so that you can find the previous versions.



        The command must be run manually like:



        Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/VisualObjects -ApplicationTypeVersion 2.0.0.0 -HealthCheckStableDurationSec 60 -UpgradeDomainTimeoutSec 1200 -UpgradeTimeout 3000 -FailureAction Rollback -Monitored



        The script Deploy-FabricApplication.ps1 have a parameter UnregisterUnusedApplicationVersionsAfterUpgrade that removes older versions from ServiceFabric Image store, if you use this approach you should avoid, because you have to copy the older version to SF and then apply the upgrade in case a rollback is needed. A better approach is implement an algorithm that runs nightly or after releases and remove old versions and keep the last N.



        .



        The other scenario is: Service failure during upgrade



        In this case is easier to handle, because Service Fabric handles it for you, when you start the upgrade you have the option to make it automatic or manual.



        In the automatic, if a service fails on startup, Service Fabric will see it and retry a few times, in case it persists, it will rollback to the service and the application to previous version automatically.



        In the manual mode, Service Fabric will start the deployment, but won't take any action, and you should run scripts to continue the deployment to next stages or rollback. This approach is convenient if you have very sensitive services and updates need an extra caution, mainly to validate the behaviour and do manual tests before you continue with the deployment.



        These settings can be found here






        share|improve this answer













        There is no Service Fabric Explorer option or buttons to make rollbacks or upgrades, There are some caveats in the deployment that you must pay attention to correctly use the Rollback, if it was just a button, it would increase the chances of making mistakes.



        The rollback using scripts are not that complex, you should be able to to with just a few lines of code like the option provided in the answer you linked.



        Also, rollback is simple to do but can be complex in some scenarios, for example, changing the configuration of existing services, backups, restores and so on, would be tricky to do an UI to handle many scenarios, using scripts make it more flexible and dynamic. Today the scripts are simple, but in case new features are added in the future, it wouldn't need many changes to support it.



        Regarding the scenarios, you could make use of other approaches like:



        The first scenario is: Deployment is successful but application is not behaving correctly



        This scenario is very common when the new version is successfully deployed, the service runs without errors, but the application has bugs or does not work as expect.



        To rollback to a previous version you must upgrade the application and target the Application Version deployed previously. Is just a simple upgrade command, unfortunately there is no "Previous Version" stored somewhere, you have to keep track of previous versions somewhere so that you can find the previous versions.



        The command must be run manually like:



        Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/VisualObjects -ApplicationTypeVersion 2.0.0.0 -HealthCheckStableDurationSec 60 -UpgradeDomainTimeoutSec 1200 -UpgradeTimeout 3000 -FailureAction Rollback -Monitored



        The script Deploy-FabricApplication.ps1 have a parameter UnregisterUnusedApplicationVersionsAfterUpgrade that removes older versions from ServiceFabric Image store, if you use this approach you should avoid, because you have to copy the older version to SF and then apply the upgrade in case a rollback is needed. A better approach is implement an algorithm that runs nightly or after releases and remove old versions and keep the last N.



        .



        The other scenario is: Service failure during upgrade



        In this case is easier to handle, because Service Fabric handles it for you, when you start the upgrade you have the option to make it automatic or manual.



        In the automatic, if a service fails on startup, Service Fabric will see it and retry a few times, in case it persists, it will rollback to the service and the application to previous version automatically.



        In the manual mode, Service Fabric will start the deployment, but won't take any action, and you should run scripts to continue the deployment to next stages or rollback. This approach is convenient if you have very sensitive services and updates need an extra caution, mainly to validate the behaviour and do manual tests before you continue with the deployment.



        These settings can be found here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 13:42









        Diego MendesDiego Mendes

        4,60711827




        4,60711827






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298526%2fservice-fabric-rollback-to-previous-version-from-visual-stuido-or-service-fabric%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Bressuire

            Vorschmack

            Quarantine