I created an installer with IzPack
. This page documents the procedure.
Install Overview
- The installer starts with a Geronimo installation with no actual configurations, but it has the deployment plans
- It prompts the user for key configuration values (default username/password, network ports, listen address, etc.), and updates the deployment plans accordingly
- It installs the empty Geronimo, and then deploys the updated deployment plans
- Voila! A customized Geronimo install
Preparation
- Get a CVS HEAD
version of IzPack
(or v3.8.0+ once it's released) – for older versions you need to manually patch in support for the so-called "!ExecuteForPacks
".
- cvs -d :pserver:anonymous@cvs.izpack.berlios.de:/cvsroot/izpack login
- Press "Enter" for password
- cvs -d :pserver:anonymous@cvs.izpack.berlios.de:/cvsroot/izpack co izpack-src
- cd izpack-src/src
- ant dist
- See ../_dist (particularly ../_dist/bin/compile)
- add izpack-src/_dist/bin to your PATH
- Get a current source tree of Geronimo
- Build it, at least as far as the assembly module
- The IzPack
installer config files and all necessary Geronimo files are copied into the assembly/target/installer directory during the assembly build, with certain variable substitution performed. This includes modified plans in installer/plan-src (and WARs in installer/wars). These plans have substitution variables for the following items:
- client-system-plan.xml – naming host (localhost) and port (1099) [{{PlanServerHostname}} and {{PlanNamingPort}}]
- interop-server-plan.xml – IIOP listen host (localhost) and port (9000), ORB port (2001), naming host name (localhost), naming port (1050), allowed client addresses (127.0.0.1) [{{PlanServerHostname}}, {{PlanIIOPPort}}, {{PlanORBPort}}, {{PlanServerHostname}}, {{PlanCOSNamingPort}}, {{PlanClientAddresses}}]
- j2ee-server-plan.xml – port for Jetty HTTP (8080) and HTTPS (8443), EJB server port (4201), EJB server host name (localhost), allowed EJB client addresses (127.0.0.1), JMX remoting host name (localhost) [{{PlanJettyHTTPPort}}, {{PlanJettyHTTPSPort}}, {{PlanOpenEJBPort}}, {{PlanServerHostname}}, {{PlanClientAddresses}}, {{PlanServerHostname}}]
- j2ee-server-tomcat-plan.xml – host (localhost), ports for HTTP (8090), HTTPS (8443), and AJP (8009) [{{PlanServerHostname}}, {{PlanTomcatHTTPPort}}, {{PlanTomcatHTTPSPort}}, {{PlanTomcatAJPPort}}]
- system-activemq-plan.xml – port for ActiveMQ (61616), host name for ActiveMQ (localhost) [{{PlanActiveMQPort}},{{PlanServerHostname}}]
- system-database-plan.xml – hostname (localhost) and port for Derby network access (1527) [{{PlanServerHostname}}, {{PlanDerbyPort}}]
- system-jms-plan.xml – hostname, port for ActiveMQ (localhost:61616) [{{PlanServerHostname}},{{PlanActiveMQPort}}]
- system-plan.xml – port for RMIRegistry (1099), server host name (localhost) [{{PlanServerHostname}} and {{PlanNamingPort}}]
- Customize the installer configuration if desired
- You may want to update maven.xml to have the correct version number for the most recent release notes file (Jelly variable ReleaseNotesVersion). There's probably a better place to store this.
- The installer configuration is not really optimal
- The same default configurations are always marked to be started (fortunately I think all of them are in required packages)
- It's not clear what would happen in the event of a port collision since the installer attempts to run the server in order to install to it
- It individually deploys each of the up to 17 possible configurations (using the slow one-off deployer), which takes a pretty long time – compare to the assembly module which starts the server after 3 or 4 steps, does everything else against the running server, then shuts it down.
Building
- Use the !IzPack
compile tool to build the installer: compile geronimo-izpack.xml -o geronimo-installer.jar from the assembly/target/installer directory.
- This step can be run by a script, so long as the !IzPack
bin directory is added to the PATH – the Geronimo build assembles all the source material that is needed to build the installer