Java Webapp installation
I've been asked to package apache-solr [1] in Fedora. This is a java
library and webapp posing as a frontend to lucene for searching. Packaging java jars is not a problem, but there are more problems with webapp part. I made it into subpackage apache-solr-webapp. Ant build creates war file (basically a zip with metadata and dependencies bundled). I expand this war file and replace dependencies with symlinks to %{_javadir}. I then place content of this directory inside /usr/share/java/webapps/apache-solr/. This makes it possible to use webapp in container (tomcat/jetty) while enabling us to update dependencies independently. I was thinking about adding default configuration for tomcat inside yet another subpackage. But this would be just one simple xml file inside /etc/tomcat6/Catalina/localhost/. Plus solr needs additional configuration: * creating of SOLR_HOME directory and placing it somewhere, presumably /var/lib/solr). I have example solr home dir in %doc, but it is generic and configuration is not really usable in that state for anything other than serve as a commented example. All in all seems like too much of a hassle for little gain. Someone who is installing webapp should probably be able to deploy it (it's point and click with manager webapp, or one simple 3-line long xml). Plus I'd have to add another subpackage for jetty I guess... My approach is similar to what we discussed on Java SIG meeting in December and what was proposed in debian packaging draft[2]. We don't have a tool to make deployments of webapps from /usr/share/java/webapps into proper container directories yet, so this burden will stay with users (for now). I'd like to get more input on my approach and see if anyone sees a problem with this. Note that there is no guideline for Java webapps as of now so keep it light :-) [1] http://wiki.apache.org/solr/ [2] http://dep.debian.net/deps/dep7/ -- Stanislav Ochotnicky <sochotnicky@redhat.com> Software Engineer - Base Operating Systems Brno PGP: 7B087241 Red Hat Inc. http://cz.redhat.com -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel |
Java Webapp installation
I've been asked to package apache-solr [1] in Fedora. This is a java
library and webapp posing as a frontend to lucene for searching. Packaging java jars is not a problem, but there are more problems with webapp part. I made it into subpackage apache-solr-webapp. Ant build creates war file (basically a zip with metadata and dependencies bundled). I expand this war file and replace dependencies with symlinks to %{_javadir}. I then place content of this directory inside /usr/share/java/webapps/apache-solr/. This makes it possible to use webapp in container (tomcat/jetty) while enabling us to update dependencies independently. I was thinking about adding default configuration for tomcat inside yet another subpackage. But this would be just one simple xml file inside /etc/tomcat6/Catalina/localhost/. Plus solr needs additional configuration: * creating of SOLR_HOME directory and placing it somewhere, presumably /var/lib/solr). I have example solr home dir in %doc, but it is generic and configuration is not really usable in that state for anything other than serve as a commented example. All in all seems like too much of a hassle for little gain. Someone who is installing webapp should probably be able to deploy it (it's point and click with manager webapp, or one simple 3-line long xml). Plus I'd have to add another subpackage for jetty I guess... My approach is similar to what we discussed on Java SIG meeting in December and what was proposed in debian packaging draft[2]. We don't have a tool to make deployments of webapps from /usr/share/java/webapps into proper container directories yet, so this burden will stay with users (for now). I'd like to get more input on my approach and see if anyone sees a problem with this. Note that there is no guideline for Java webapps as of now so keep it light :-) [1] http://wiki.apache.org/solr/ [2] http://dep.debian.net/deps/dep7/ -- Stanislav Ochotnicky <sochotnicky@redhat.com> Software Engineer - Base Operating Systems Brno PGP: 7B087241 Red Hat Inc. http://cz.redhat.com -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel |
Java Webapp installation
Whatever you do please do not break per instance tomcat6 installations.
By this I'm referring to these instructions located at the head of /etc/sysconfig/tomcat6 There seems to be a general misunderstanding of the per instance tomcat mechanism which leads to packaging and configuration changes that break it. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/ -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel |
Java Webapp installation
Le Mer 9 mars 2011 15:44, Stanislav Ochotnicky a écrit :
> I've been asked to package apache-solr [1] in Fedora. This is a java > library and webapp posing as a frontend to lucene for searching. > > Packaging java jars is not a problem, but there are more problems with > webapp part. I made it into subpackage apache-solr-webapp. Ant build > creates war file (basically a zip with metadata and dependencies > bundled). I expand this war file and replace dependencies with > symlinks to %{_javadir}. I then place content of this directory inside > /usr/share/java/webapps/apache-solr/. This makes it possible to use > webapp in container (tomcat/jetty) while enabling us to update > dependencies independently. This is nothing new and actually why jpackage-utils contains a build-jar-directory command that populates a directory with symlinks (and a rebuild-jar-directory that refreshes them if necessary) /usr/share/java/webapps/ is likely to conflict with this command logic BTW. /usr/share/java/ was supposed to contain only jars on jpackaged systems originally. > I was thinking about adding default configuration for tomcat inside > yet another subpackage. But this would be just one simple xml file > inside /etc/tomcat6/Catalina/localhost/. Plus solr needs additional > configuration: > * creating of SOLR_HOME directory and placing it somewhere, presumably > /var/lib/solr). I have example solr home dir in %doc, but it is generic > and configuration is not really usable in that state for anything > other than serve as a commented example. > > All in all seems like too much of a hassle for little gain. It's not little gain. If you find it too complex to do manually, the usual solution is to write rpm macros or shell helpers to help deploy this kind of webapp. -- Nicolas Mailhot -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel |
Java Webapp installation
Excerpts from Nicolas Mailhot's message of Thu Mar 10 09:55:47 +0100 2011:
> > Le Mer 9 mars 2011 15:44, Stanislav Ochotnicky a écrit : > > I've been asked to package apache-solr [1] in Fedora. This is a java > > library and webapp posing as a frontend to lucene for searching. > > > > Packaging java jars is not a problem, but there are more problems with > > webapp part. I made it into subpackage apache-solr-webapp. Ant build > > creates war file (basically a zip with metadata and dependencies > > bundled). I expand this war file and replace dependencies with > > symlinks to %{_javadir}. I then place content of this directory inside > > /usr/share/java/webapps/apache-solr/. This makes it possible to use > > webapp in container (tomcat/jetty) while enabling us to update > > dependencies independently. > > This is nothing new and actually why jpackage-utils contains a > build-jar-directory command that populates a directory with symlinks (and a > rebuild-jar-directory that refreshes them if necessary) Yes. I of course know about build-jar-repository (typo on your part?). Question wasn't so much about that, but general approach since AFAIK there was no previous Java Webapp in Fedora (therefore noone dealt directly with war files). > > /usr/share/java/webapps/ is likely to conflict with this command logic BTW. > /usr/share/java/ was supposed to contain only jars on jpackaged systems > originally. This is I guess more problematic aspect I haven't really though of. I don't really think it would cause practical issues, but I agree it's better to get it right(tm). So how about /usr/share/java-webapps ? Or to have nice ordering with php(?) webapps /usr/share/webapps-java. > > I was thinking about adding default configuration for tomcat inside > > yet another subpackage. But this would be just one simple xml file > > inside /etc/tomcat6/Catalina/localhost/. Plus solr needs additional > > configuration: > > * creating of SOLR_HOME directory and placing it somewhere, presumably > > /var/lib/solr). I have example solr home dir in %doc, but it is generic > > and configuration is not really usable in that state for anything > > other than serve as a commented example. > > > > All in all seems like too much of a hassle for little gain. > > It's not little gain. If you find it too complex to do manually, the usual > solution is to write rpm macros or shell helpers to help deploy this kind of > webapp. I meant little as at least in this case it really requires manual modifications of SOLR_HOME and I have a feeling people would try to use default configuration. Even if you use upstream war file you still have to do these things, because for example you have to change property of solr.home for given tomcat instance/context or it just won't work. Problem with putting SOLR_HOME into var is that there are configuration files that would fit more in the /etc. Then it's not so intuitive to understand how to run two instances, because deploying it twice will not work without having separate SOLR_HOME and configs. Oh well..I guess I'll just concentrate on making one instance work more-less out-of-the box and let them figure out how I did it... It's really not a technical issue, more of a "what's the most normal way" issue :-) -- Stanislav Ochotnicky <sochotnicky@redhat.com> Software Engineer - Base Operating Systems Brno PGP: 7B087241 Red Hat Inc. http://cz.redhat.com -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel |
Java Webapp installation
Le Jeu 10 mars 2011 10:17, Stanislav Ochotnicky a écrit :
> Excerpts from Nicolas Mailhot's message of Thu Mar 10 09:55:47 +0100 2011: >> >> Le Mer 9 mars 2011 15:44, Stanislav Ochotnicky a écrit : >> > I've been asked to package apache-solr [1] in Fedora. This is a java >> > library and webapp posing as a frontend to lucene for searching. >> > >> > Packaging java jars is not a problem, but there are more problems with >> > webapp part. I made it into subpackage apache-solr-webapp. Ant build >> > creates war file (basically a zip with metadata and dependencies >> > bundled). I expand this war file and replace dependencies with >> > symlinks to %{_javadir}. I then place content of this directory inside >> > /usr/share/java/webapps/apache-solr/. This makes it possible to use >> > webapp in container (tomcat/jetty) while enabling us to update >> > dependencies independently. >> >> This is nothing new and actually why jpackage-utils contains a >> build-jar-directory command that populates a directory with symlinks (and a >> rebuild-jar-directory that refreshes them if necessary) > > Yes. I of course know about build-jar-repository (typo on your > part?). Yes, sorry about that, long time I've not used it :( > Question wasn't so much about that, but general approach since > AFAIK there was no previous Java Webapp in Fedora (therefore noone > dealt directly with war files). > >> >> /usr/share/java/webapps/ is likely to conflict with this command logic BTW. >> /usr/share/java/ was supposed to contain only jars on jpackaged systems >> originally. > > This is I guess more problematic aspect I haven't really though of. I > don't really think it would cause practical issues, but I agree it's > better to get it right(tm). The only practical issue is if someone ever tries to packages a webapp.jar as the build-jar-repository will do lookups on directories too (to allow replacing transparently foo.jar with a foo subdir containing a set of jar files) > So how about /usr/share/java-webapps ? Or > to have nice ordering with php(?) webapps /usr/share/webapps-java. Anyone will do, being consistent with php would of course be nice to users. > It's really not a technical issue, more of a "what's the most normal > way" issue :-) "normal" way with Java deployment? That's an oxymoron. The only Java deployment conventions so have have been written by distro people. I'd suggest to look at the php webapps included in the distro, derive something similar for Java, and write a formal Fedora packaging guideline so others have an answer to your question. Everything but the location of the tomcat/jetty/jboss config files is likely to be identical no matter what the webapp language is Regards, -- Nicolas Mailhot -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel |
| All times are GMT. The time now is 08:01 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.