5 Replies Latest reply on Mar 12, 2015 10:49 PM by kucerarichard

    deploy war files to tomcat servers

    lzmuda

      Hi, I'm trying to deploy package with war file using Bundle. When I choose resource group as platforms, deployment is working. Unfortunately it's not comfortable, cause I have to write full path to webapps catalogue. But when I choose tomcats server group, error is occurring, something like resource group is not supported. Is it possible to deploy wars directly to tomcats and I'm doing something wrong or it's not possible? We have rhq 4.13.1 and tomcat 6.

       

      Regards,

      Łukasz

        • 1. Re: deploy war files to tomcat servers
          jayshaughnessy

          Although I'm a little surprised it seems the Tomcat plugin does not define any bundle-targets.  That means it does not provide any hooks for deploying bundles directly under the Tomcat Server itself.  So, deploying at the platform level would be required, I think.  For example, JBoss AS7/EAP servers can deploy bundles directly.

           

          The alernative is to implement this feature in the plugin. We would happily accept the contribution.  I can't quite remember but it may not even reuire any Java coding, it may be a fairly easy addetion to the plugin descriptor (rhq-plugin.xml).  You could take a look at https://git.fedorahosted.org/cgit/rhq/rhq.git/tree/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml… which is where we define bundle-targets for an AS7 standalone server.

          1 of 1 people found this helpful
          • 2. Re: deploy war files to tomcat servers
            lzmuda

            Thanks for the reply. I was surprised too, so I asked about it. I was almost sure, that it's possible. I know that deploy to Jboss is supported. We use it, and I think it's very useful tool.

            Therefore I would like use similar mechanism for tomcat's server. I think I'll try implement this stuff to tomcat's plugin. Wish me good luck

            • 3. Re: deploy war files to tomcat servers
              lzmuda

              Hi!

               

              I added few lines in rhq-server.xml file and now RHQ can deploy packages to tomcats servers.

              It was really easy... So of course I would like to add my changes to rhq-project.

              What have I to do?

              Should I create bug on bugzilla, create new brand based on brand 4.14.0-snapshot, send request pull to to rhq-project and write email to rhq-devel@lists.fedorahosted.org.

              Am I right?

               

              Regards,

              Łukasz

              • 4. Re: deploy war files to tomcat servers
                tsegismont

                Hi,

                 

                Yes, first create a Bugzilla report: here

                Then send a pull request on github indicating the Bugzilla report number.

                 

                Thank you very much!

                Thomas

                • 5. Re: deploy war files to tomcat servers
                  kucerarichard

                  I need to deploy to Tomcat also.   Are you able to specify a Context?    I would need to add environment variable for Solr homes.   Tomcat can run multiple Solr instances easily with the Context file that links the war file with its environment,    but I was shocked to learn this is a pain in JBoss (there's no way to run multiple solr instances without rejarring the war file or some other hard options).   The Jetty options are far worse than JBoss however it seems...  Resin has a similar Context config to Tomcat that could do it...   would like to run Solr on JBoss because there would be more instrumentation,   but the requirements to add env vars for the WAR is a deal-breaker unless I'm missing something,  which is always possible.   someone did the work for me in this case:

                  Multipe Solr on Torquebox · grosscol/umichwrapper Wiki · GitHub