5 Replies Latest reply on May 31, 2013 7:26 AM by William Bertan

    Update Deployments in client's server automatically

    William Bertan Newbie



      We started a few months ago a new project with JBOSS, so far we have like 12 servers running in client side.


      If I need update the deploy, I need remotely update one by one, and I lost a few hours to finish this task, and it's annoying...


      So, I want to update automatically those deploys.


      My idea was one webservice here in my company, and one windows service in our clients, then time by time this service look in our webservice if for that client it's available any update. If yes, it download the new deploy and do the deploy in the folder standalone\deployments, after that stop and start the JBOSS service, and send to us a signal for success or fail...


      I don't know if this is the best way or if JBOSS have some service for easily do this task...


      I would be thankfully for any advice about this discussion, and if maybe, if doesn't already have one, a way for automatically update a .war.


      Kind Regards,

      William Bertan

        • 1. Re: Update Deployments in client's server automatically
          Darran Lofthouse Master

          Is there a reason you have chosen 12 stanadlone server installations?  It sounds like you could benefit from domain mode where you could deploy once and it will be deployed to all server in a server group.

          • 2. Re: Update Deployments in client's server automatically
            Nicklas Karlsson Master

            I get the picture he's talking about separate clients. Automatic deployment is always tricky, even if the delivery problem is solved you always have the risk of the deployment failing in a non-atomic way. You would have to have some way of testing that the deployment succeeded also. And if you're connecting to a DB, you would have to synch some DB update script so there isn't a mismatch between the app and the DB.

            • 3. Re: Update Deployments in client's server automatically
              ksreen Newbie

              You could try writing a script using the Jboss Application Server Management API (https://docs.jboss.org/author/display/AS7/Management+API+reference) to write your own script to deploy and do the necessary verifications on the servers.  This would automate your task and you could customize it to add your own functionality to manage your entire environment.

              • 4. Re: Update Deployments in client's server automatically
                Nicklas Karlsson Master

                Yes, that's always an option (firewall rules permitting). I've been thinking of the same problem but haven't reached any conclusions yet since


                a) We rarely distribute a new version to *all* customers at the same time (production breaks need scheduling)

                b) Almost always there are SQL alters and/or data conversions that have to be run at the same time

                c) When things go wrong, you have shot yourself in the foot x26 and all productions envs are down and need manual fixing. NOW!


                Upgrades, I think can be "push" (you initiate them) or "pull" (client checks for updates).


                Push could probably be done with CLI or some servlet picking up the deployment and running script on the client side

                Pull could probably use some service to check for updates and replace WARs before server start (or a subsystem for it?)


                That still leaves the SQL changes which would have to be run. The problem is that the deployment would have to be atomic with the deployment. Including rollback. And with table alters etc it's no good.


                But do tell me what you figure out ;-)

                • 5. Re: Update Deployments in client's server automatically
                  William Bertan Newbie



                  I don't have any SQL to execute yet, we have another system to update database, the desktop system.


                  The servers are for sync between branches, some have another mobile system running with services, and one for monitoring the DB, servers, etc...


                  The server for mobile system need more often updates, It's because this I need to do the automatic update, and in our current scenario, all DB changes are already done.


                  The item "a)", I fully agree, then I think in select the customers that will be available to get that update, and the others don't.


                  Maybe I will have today and the next week to figure out how I will do this task, I will check for JBOSS Application Server Management API too, thanks ksreen.


                  When I figure out I will share with the community



                  William Bertan