4 Replies Latest reply on Mar 1, 2011 11:19 AM by efrinmn

    Deployment with twiddle / twiddle documentation

    willemnoorduin

      Using JBoss 5.1.0, nn our production situation we don't want to use Hot Deployment for the obvious reasons. So we removed the hd-scanner service from the deploy directory. Now w e must rely on tools like twiddle. We can deploy stuff with:

       

      ./twiddle.sh -u admin -p <password -s localhost invoke "jboss.system:service=MainDeployer" deploy /tmp/application1.war

       

      and we can see it is deployed with:

       

      ./twiddle.sh -u admin -p <password> query 'jboss.web.deployment:*'

       

      But there are a couple of questions about this:

       

      1. The deployed application is not visible in the JBoss admin console (in the web application tree element). Why is that ?
      2. The deployed applucation is not copied to <instance-dir>/deploy, but unpacked under <instance-dir>/tmp/<uuid>/application1.war/ . Why is that ? Now we always have to use a find to find the deployed application (or the above twiddle query) ?
      3. Can you (and how) use twiddle.sh to deploy to a cluster ? Normally (I think you need hot deployment for that, but I am not sure)) I make the application.war available in the <instance-dir>/farm directory of one of the clyster node.
      4. Can you deploy (jdbc-) datasources via twiddle ?
      5. All these things ought to be somewhere in the documentation of twiddle, but I can only find samples via Google and fora like these. Is there such a beast like documentation for twiddle (with explaining examples) ?
        • 1. Deployment with twiddle / twiddle documentation
          jaikiran

          Willem Noorduin wrote:

           


           

          But there are a couple of questions about this:

           

          1. The deployed application is not visible in the JBoss admin console (in the web application tree element). Why is that ?

          From what I know, the admin-console just checks for applications that are part of the normal "deploy" folder. I don't know if it has been fixed in later versions. Probably not yet.

           

           

          Willem Noorduin wrote:

           

          The deployed applucation is not copied to <instance-dir>/deploy, but unpacked under <instance-dir>/tmp/<uuid>/application1.war/ . Why is that ? Now we always have to use a find to find the deployed application (or the above twiddle query) ?

          That's correct, the MainDeployer just "deploys" it to the tmp folder. The added disadvantage is that on a server restart, you'll have to again run the twiddle query to deploy the application, since the application isn't really available in the "deploy" folder.

           

           

          Willem Noorduin wrote:

           

          1. Can you (and how) use twiddle.sh to deploy to a cluster ? Normally (I think you need hot deployment for that, but I am not sure)) I make the application.war available in the <instance-dir>/farm directory of one of the clyster node.
          2. Can you deploy (jdbc-) datasources via twiddle ?

          twiddle is just a wrapper to invoke the available MBeans. So you'll have to check if there are MBeans which allow you to do this.

           

           

          Willem Noorduin wrote:

           

          All these things ought to be somewhere in the documentation of twiddle, but I can only find samples via Google and fora like these. Is there such a beast like documentation for twiddle (with explaining examples) ?

          http://community.jboss.org/wiki/Twiddle

          • 2. Deployment with twiddle / twiddle documentation
            massios

            We are also interested as part of a security hardening to disable the hdscanner and we find all the questions of Willem very relevant.

             

            1.

            It sounds funny that the server is running something and that the admin application cannot detect it.

            2.

            I do not understand what prevents us from copying the application to deploy and running twiddle on the application copied to deploy. Would this fix

            problem number 1?

            3.

            We are interested in farm deployment and hasingleton deployment. Willem have you found a way to do this?

            4.

            Ooops. If we remove the hdscanner, would the datasources and standard jboss applications have to to be deployed using twiddle?

            5.

            Good question the

            http://community.jboss.org/wiki/Twiddle

            doesn't contain much info.

             

            Nikos

            • 3. Deployment with twiddle / twiddle documentation
              peterj

              The older docs had an entire section on twiddle, with examples:

              http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/Connecting_to_the_JMX_Server-Command_Line_Access_to_JMX.html

              Some of the examples might no longer work (due to deprecated mbeans) but they should still provide clues as to how to use twiddle to perform various types of tasks (get mbean property value, call mbean operations, etc.)

              1 of 1 people found this helpful
              • 4. Deployment with twiddle / twiddle documentation
                efrinmn


                One possibility is that the admin console may have a refresh rate and may not have picked up the newly deployed (or undeployed) applications.  More likely the browser has cached the page.  I have noticed that sometimes I need to hit the refresh button on  my browser to get the page updated.  I have also noticed that in JBoss 5.1 the admin console has some bugs that still need to be worked out.  It appears that a more stable version will be available in JBoss 6.

                 

                Previous versions of JBoss allowed you to disable hotdeploy without having to remove the HDScanner.  That was extremely useful because you could then force a scan when you needed one.  I am hoping they returned that functionality in JBoss 6, but I haven't tried it out yet.