Jetty document root?

693 views
Skip to first unread message

Anthony Shortland

unread,
Feb 10, 2011, 8:32:38 PM2/10/11
to rundeck...@googlegroups.com
Looking at the Rundeck 1.1 RPM installation it seems that there's no "free" web document root with the Jetty installation (unlike with a full Jetty install).

In the absence of any other web server to store files and packages to be distributed by Rundeck jobs, configuring Jetty to provide a web document root (under "/var/rundeck" somewhere?) would be a very great convenience.

Looking at Jetty 6.1.21 (included with Rundeck) it seems this is done by configuring the "DefaultServlet" (http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/servlet/DefaultServlet.html) context. e.g.:

Anthonys-MacBook-Pro-2:jetty-6.1.21 anthony$ more contexts/controltier.xml 
<Configure class="org.mortbay.jetty.servlet.Context">
  <Set name="contextPath">/www</Set>
  <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/var/rundeck/www</Set>
  <Call name="addServlet">
    <Arg>org.mortbay.jetty.servlet.DefaultServlet</Arg>
    <Arg>/</Arg>
  </Call>
</Configure>

...  "org.mortbay.jetty.servlet.DefaultServlet" is included in jetty-6.1.21.jar so perhaps it is possible to do this with Rundeck?  Perhaps from the "com.dtolabs.rundeck.RunServer" class?

Anthony.

Noah Campbell

unread,
Feb 10, 2011, 11:14:51 PM2/10/11
to rundeck...@googlegroups.com
I bet you'd find httpd ready to go on just about any server you install RunDeck on.  It's much better suited for serving static content and just as convenient.  

-Noah

Anthony Shortland

unread,
Feb 10, 2011, 11:34:47 PM2/10/11
to rundeck...@googlegroups.com
Not Windows boxes, and not many non-Linux Unix servers.

Noah Campbell

unread,
Feb 11, 2011, 12:05:39 PM2/11/11
to rundeck...@googlegroups.com
IIS is pretty good these days.  non-Linux...yeah, you'd have to dig a bit deeper, but lighttpd, nginx, even apache can be made to run on those platforms.

-Noah

Anthony Shortland

unread,
Feb 11, 2011, 12:45:12 PM2/11/11
to rundeck...@googlegroups.com
Great. All doable.

What I really want to discuss though is the technical feasibility of enabling the "org.mortbay.jetty.servlet.DefaultServlet" already included in the Rundeck distribution.

The default Jetty install uses "$JETTY_HOME/lib/start.jar" to start, which brings in a bunch of configuration complexity. Am I correct in thinking that we could just (even optionally) run an instance of  "org.mortbay.jetty.servlet.DefaultServlet" without all this overhead?

Looking at the Javadoc (http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/servlet/DefaultServlet.html). Seems we'd just have to take care of:  "The following initParameters are supported, these can be set either on the servlet itself or as ServletContext initParameters with a prefix of org.mortbay.jetty.servlet.Default." in one way or another ...  initParameters appear to be a generic construct  at "javax.servlet.GenericServlet" or beyond ... but I can't see how to "set them on the servlet itself" ... where are the setters?

Also we'd probably have to expose some of the parameters as installation specific configuration to make this really useful.

Anthony.
 [ mobile: 650.215.3117 | aim: anthony....@me.com yahoo: anthony.shortland skype: anthony.shortland]




Reply all
Reply to author
Forward
0 new messages