5 Replies Latest reply on Oct 4, 2004 9:05 PM by didickman

    Proposal to redesign and simplify server instance setup


      This proposal is motivated by the desire to make JBoss more suitable in a shared-style enterprise installation. For example, in this situation a system admin would unpack jboss under the /opt directory which is a read-only partition. This is a problem because jboss needs to have write access to $JBOSS_HOME/server by default. The typical solution is to make use of the jboss.server.base.dir property to use a different directory to which a developer has write permissions.

      I'm proposing to make some changes to JBoss that address this issue. What's more, this proposal would make the creation of custom server instances drastically easier, quicker and less error prone.

      The basic idea is to create a script called $JBOSS_HOME/bin/setup.{bat,sh} which would be responsible for creating server instance configurations rather than supplying pre-built instances like all, default, minimal, and standard. This script would prompt the developer for the required information, and automatically modify some template configuration files to create a server instance.

      The setup script would use template files stored in $JBOSS_HOME/conf/. Jars needed by the setup script would be stored in the $JBOSS_HOME/server/ directory. (ie. this directory would only contain the common jars that are currently stored under $JBOSS_HOME/server/*/lib/, all other existing files under the server directory would be turned into templates and moved to the conf directory). The idea is that this new server directory, containing jars useful for server instances, would parallel the existing client directory which contains jars used by clients.

      When running the setup script it would prompt the developer for things like: JDK to use if $JAVA_HOME is not defined, location to store the server instance configuration files, which services should be enabled (eg. jndi, http, clustering), and for each service which ports should be used, etc. Once all questions have been answered the server instance will be created.

      What's more, the setup script should be usable in interactive mode (as described above) as well as in non-interactive mode. The idea is that a developer could record the choices they make in interactive mode and create a scripted session which could be used to automate this server instance configuration process. This scripted file could be used in continuous build systems and could be version controlled. Example scripted files should be shipped with JBoss which can be used to automatically recreate the same "all", "default", "minimal", and "standard" configurations that are currently shipped with jboss under the server directory.

      Using this script will have a few benefits. For example, it will make it much easier for beginner developers to know exactly which services a server instance actually contains (today it's not really obvious what the differences between default and standard are, for example). Secondly, having these automated scripts will probably cut down a huge amount of questions like "I can't get X working, here is my config file" which is then followed by "Your file looks wrong, you should have had Y". Finally, this is a nice way to get jboss installed in a shared-style installation which is what this proposal was meant to address in the first place.