6 Replies Latest reply on May 31, 2006 4:14 PM by alex.pinkin

    installer design discussion

      The goal of this thread is to resume discussion of the installer design. Please comment.

      Installer design goals:

      1. Make it easy for components to integrate into installer and minimize maintenance down the road.
      2. Make installer THE ONLY mechanism to produce product distributions (deprecate ant scripts which produce ZIP distributions by copying files over). I.e. installer will be executed in silent mode, and then output from the installer is just zipped up to produce a ZIP distribution.
      3. Promote each component?s ownership of the installation related code. This will need to be done since it's hardly possible for one person to keep up to speed with all product changes so that install doesn't constantly get out of sync.
      4. Test suite: update AS and other AS?s dependent products test suites to use installer to generate server configs instead of copying directories.

      Monolithic installer (in its own separate project) will not scale well once we add more products to it. There are a number of issues that can be foreseen:

      1. Installer project will keep getting bigger and maintenance will start getting out of hand.
      2. Monolithic installer design doesn?t promote ownership of the installer code by component teams.
      3. Large number of installer project branches will need to be created to incorporate multiple permutations of JEMS product versions (i.e. AS4.0.4 + Portal 2.4 + Seam 1.0, AS4.0.5 + Portal 2.4 + Seam 1.0, etc).
      4. Installer?s project descriptor (install.xml) duplicates some information which is available from the build system. For instance, file pack definitions and dependencies between packs can be inferred from Maven?s POM?s and/or component-info.xml files.

      Proposed installer design:

      1. Installer project will only contain core installer code which is not product specific. I.e., no AS or Portal file packs will be declared in the installer. It should be possible to build JEMS installer by simply specifying which components are to be included.
      2. Every component will be eventually responsible for writing and maintaining any install related code and resouces (fragment of the install.xml which defined file packs, fragment of the userInputSpec.xml which defines custom configuration panels, listeners which configure configuration files, and all required resources such as configuration file templates).
      3. Master installer build would inspect each component's install descriptor in order to assemble combined izpack project and then compile it to build JEMS installer.
      4. Once Maven migration is done, it would be nice to build installer when "mvn package" target is executed. This way building installer would be a step of a project lifecycle. Alternatively, we could have a separate Maven plug-in which generates installer (i.e., "mvn installer:installer"). Maven2 includes a plug-in called Assembly (http://maven.apache.org/plugins/maven-assembly-plugin/howto.html) which can be used to generate distributions but it's way too simple to be used to generate an installer. Assembly only takes care of copying files defined by filesets and zipping 'em up. I've started prototyping Maven plug-in which would generate izpack installer.

      Scott mentioned that installer design should not depend on Maven. So ideally it should work even if some components are still using jbossbuild.

        • 1. Re: installer design discussion
          starksm64

          As I mentioned in a build forum thread, I do believe each component that integrates into the installer should have an installer artifact that defines the component integration into the installer.

          At the most basic, an installer artifact is just a patternset that maps component artifacts onto the standard binary structure (bin, docs, lib, server, etc). Templates for customization of installation scripts based on variable settings is another level.

          There will still have to be installer specific features like customization panels to define variables used in the component installation scripts. These variables do need to be configurable via the command line version of the installer as well.

          • 2. Re: installer design discussion

            I agree on having a separate installer artifact instead of embedding installer related stuff into each component's artifact. Already started prototyping installer artifact structure.

            Installer artifact will contain:

            - configuration file templates
            - listeners (java code)
            - ant actions (antActionsSpec.xml )
            - panel descriptor (userInputSpec.xml)

            Installer artifact descriptor is going to look similar to izpack's install.xml but it's going to include only elements specific to the component this installer artifact maps to:

            - panels for this component
            - packs for this component
            - listeners

            If nobody objects, I'm going to start re-factoring installer according to this. Mode details to follow this week.

            • 3. Re: installer design discussion
              starksm64

              The artifact also need to describes its dependencies on other components. In order to avoid a leakage of installer pack names into other builds, the pack names should be based on the repository component names. That way the same dependency is used for project binary imports and installer dependencies.

              • 4. Re: installer design discussion
                clebert.suconic

                I was talking to Alex informally today, then we realized something that would be a nice idea.

                JBoss testsuite creates a bunch of custom configurations like clustering, and recently we have added UnifiedInvokers (with jboss and java serialization).

                It would be nice, sometime in a near future, if instead of using an ugly ant script to create such servers if we called setup sillently to perform such custom configuration, and execute Unit tests against it.

                This way we would be testing the setup itself, the way it is going to be executed at customers.


                Clebert

                • 5. Re: installer design discussion
                  clebert.suconic

                   

                  "clebert.suconic@jboss.com" wrote:

                  This way we would be testing the setup itself, the way it is going to be executed at customers.


                  I guess this could be done as part of http://jira.jboss.com/jira/browse/JBINSTALL-41, right?


                  • 6. Re: installer design discussion

                    Yep. This is also related to http://jira.jboss.com/jira/browse/JBAS-3234. Installer itself doesn't probably require unit tests as long as installer is the only mechanism used to create product distributions. Test suite is pretty much going to validate installer under the covers.