5 Replies Latest reply on Feb 14, 2013 12:04 AM by Jörg Hoh

    How to replicate bundle from Author to Publish

    deepbluez

      Hi,

       

      I have published a java bundle by right clicking and select 'Build Bundle' on the 'bnd' file, the bundle gets deployed properly on the 'Author' instance, but the 'publish' instance deploy failed.

       

      The code currently works in 'Author'.

       

      How do I replicate the bundle from Author to Publish? Does 'Build Bundle' only deploy the bundle to 'Author'? If yes, step by step how do I replicate the bundle to Publish?

       

      Thanks.

        • 1. Re: How to replicate bundle from Author to Publish
          Kristian Wright Level 1

          From what I've seen, the build deploys only to the author.  To replicate it across, you can either create a package containing the bundle, and replicate that to the publishers, or go to /etc/replication/treeactivation.html on the author, select the path to the bundle, and replicate that way.

           

          K

          • 2. Re: How to replicate bundle from Author to Publish
            splram Level 1

            The right way of deploying bundle to publish instance is to take the JAR file, use felix console's Install/Update bundle option.

            • 3. Re: How to replicate bundle from Author to Publish
              deepbluez Level 1

              Thanks Splram, but does that mean I have to manually install the bundles on all publish instances I have? Just wondering if there's a batch repliation job I can execute?

              • 4. Re: How to replicate bundle from Author to Publish
                Kristian Wright Level 1

                Yes, using the Install/Update functionality from the OSGi console will need to be done manually on each publisher.  Replicating the branch of the tree or packaging the jar and replicating the package would send to all publishers at once.

                • 5. Re: How to replicate bundle from Author to Publish
                  Jörg Hoh Adobe Employee

                  The canonical answer would be: Put the bundle into a CRX package (path: /apps/<appname>/install) and then upload the package to the instances you want to deploy the package.

                   

                  If you want to transport that package via replication, it will work. But be aware, that then you deploy it to all publishs more or less in parallel, which might be an unwanted behaviour. The usual trick is to partition your publishs into 2 distinct sets. One set is active and receives requests by the loadbalancer, the other is idle and does not receive any requests from the loadbalancer in front of them.

                   

                  Then reconfigure the replication agents pointing to the active set of publishs, and change their port to an unused one. This prevents that the replication is successfully working to this publishs, but the agents do still accept replication requests from the authors (but they are not executed). If you activate then the package, the package will be replicated only to the idle set of publishs and is installed there. Then switch the configuration for both sets of publishs and make the active set the idle one and vice versa. Now you only need to wait until the replication queues to the (new) idle set of publishs is emptry and the package is installed. Now all publishs have the new package installed and you can configure all replication agents back to "normal" settings.

                   

                  That's a common deployment strategy used by many projects. If done properly you don't face any problems on your live site.

                   

                  cheers,

                  Jörg