5 Replies Latest reply on Apr 25, 2017 5:10 PM by ray2017

    Does Wildfly Support - Canary Release Deployment (Side By Side) Deployment

    ray2017

      Hi All,

       

      Appreciate if someone share idea/knowledge on how we can achieve side by side deployment with Wildfly to ensure 0 downtime application deployment in Wildfly 10.

       

      Regards,

      Ray

        • 1. Re: Does Wildfly Support - Canary Release Deployment (Side By Side) Deployment
          abhijithumbe

          Create a rollout deployment plan using CLI with rolling-to-servers=true. The package will be deployed to each server in the server group in a serial manner.

          An example CLI deployment plan for serial deployment is provided below:

           

          ~~~

          deploy WebApp.war --name=WebApp.war --runtime-name=WebApp.war --server-groups=ha-server-group --headers={rollout ha-server-group(rolling-to-servers=true)}

          ~~~

          To apply a rollout plan to all to all the server-groups, you need to mention the names of each server-group in master host :

           

          ~~~

          deploy /valid/path/WebApp.war --name=WebApp.war --runtime-name=WebApp.war --server-groups=main-server-group,other-server-group --headers={rollout main-server-group(rolling-to-servers=true),other-server-group(rolling-to-servers=true)}

          ~~~

          NOTE: Next time if user wants to update the same application with the rolling-to-servers=true then "--force" option need to be used and "--server-groups" need not to be specified. 

           

          There are several additional options that are useful when creating a deployment plan. Read more about deployment plans in wiki articles Command-lineOperationRequestFormat and FormatOfADetypedOperationRequest

           

          If a deployment plan is not used then the other option is to split the cluster into multiple server groups and deploy to each server group manually one at a time. Without rolling upgrades to servers, there are possibilities of running into Infinispan session replication race conditions if deployment is occurring concurrently which is the default behavior.

           

          In cluster domain mode, it is highly recommended to utilize a deployment plan for deployment operations.

           

          Alternatively, users can configure clustered domain into two (or more) server groups and use commands like this to do a sort of 'manual' rolling deployment:

           

          ======

          #Deploy original version

          deploy dist/helloWorld.war --all-server-groups

          #Deploy new version to "other-server-group"

          undeploy helloWorld.war --server-groups=other-server-group --keep-content

          deploy --server-groups=other-server-group --runtime-name=helloWorld.war dist/helloWorld2.war

          #Deploy new version to "main-server-group"

          undeploy helloWorld.war --server-groups=main-server-group

          deploy --server-groups=main-server-group --name=helloWorld2.war --runtime-name=helloWorld.war

          ===

          • 2. Re: Does Wildfly Support - Canary Release Deployment (Side By Side) Deployment
            ray2017

            Thanks Abhijit. In our enviornment we are using standalone servers clustered behind a loadbalancer (Azure LB). In this case how does the rolling deployment will work

            • 3. Re: Does Wildfly Support - Canary Release Deployment (Side By Side) Deployment
              ray2017

              Thanks Abhijit. In our environment we are using standalone servers clustered behind a loadbalancer (Azure LB). In this case how does the rolling deployment will work

              • 4. Re: Does Wildfly Support - Canary Release Deployment (Side By Side) Deployment
                abhijithumbe

                For standalone mode you can split cluster, one cluster will be having new version of application and another will be having older version of application.

                • 5. Re: Does Wildfly Support - Canary Release Deployment (Side By Side) Deployment
                  ray2017

                  Currently we only have 3 servers in standalone mode behind a Azure Loadbalancer, not sure how to achieve split cluster as if we spin up another set of server it will be a costly affair