CTIP - Initial Linux packaging

From ControlTier

Jump to: navigation, search

Contents

Abstract

Introduce initial support for installation of ControlTier using common Linux package formats.

Authors: Anthony Shortland

Description

The observation has been made that the current ControlTier installation methods (Zip and Jar file based distributions) are "user-centric" since they suppose installation to a relocatable self-contained directory hierarchy which defaults to a "CTIER_ROOT" of "${user.home}/ctier" (on Linux/Unix anyway). This approach of strictly platform-independent installation stems from ControlTier's Java/Ant foundations.

It should be noted that while most "canonical" distributions of Java-based software remain in platform-agnostic Zip or Jar formats, they have all also long been repackaged in platform-specific formats. For example, the binary distribution of version 5.5 of the Tomcat application server is distributed from apache.org in Zip (and Tgz) format, but is also available as part of the CentOS 5.2 distribution in RPM format (as a collection of 40 dependent packages ultimately supporting "tomcat5-5.5.23-0jpp.7.el5_3.2.i386.rpm").

While there has long been interest in the Linux packaging of ControlTier, a couple of key developments have made it attractive to pursue that goal now. Firstly, Sun's OpenJDK project produced an open-source JDK 6 that is now included in all major Linux distributions. Secondly, as of 3.4.8 (released at the end of September 2009), ControlTier is Java 1.6 compatible.

With this context set, the purpose of this CTIP should be seen as defining the requirements and design approach for an initial "system-centric" Linux packaging of ControlTier that will be delivered in the near-term future (i.e. as part of the 3.4.9 release). Given this 4-6 week timeframe, the scope of the work will be a relatively modest mapping of the ControlTier installation to the Linux system directories, and not the full-level of integration necessary to allow ControlTier to become part of the standard Linux distributions (though this is the eventual goal).

There is clear precedence for this approach. Many projects maintain their own Linux packages as well as ultimately being included in the mainstream Linux distributions. A good example of this is CollabNet's binary package distributions of Subversion; the client RPM version of which (CollabNetSubversion-client-1.6.5-2.i386.rpm) installs entirely into "/opt/CollabNet_Subversion". This is in contrast to the Linux distribution RPM (subversion-1.4.2-4.el5_3.1.i386.rpm) which installs into "/usr" and "/etc".

Proposed Changes

Package formats

We should aim to support both Redhat Package Manager (rpm) and Advanced Packaging Tool (apt) format packages that will be built as part of the standard ControlTier release process and posted to Sourceforge for distribution.

Packages

The initial packaging should be "coarse grained" simply producing separate server and client packages in line with how the current install process works. A server system would install both the "ctier-server" and "ctier-client" packages, while a client system would only install the "ctier-client" package.

Server (ctier-server)

The server package (ctier-server) will include all the Jetty-based web applications (Workbench, Jobcenter, Reportcenter, JackRabbit, Ctl (or a dependency of the client-package))

Client (ctier-client)

The client package (ctier-client) will include the full ControlTier client installation, which includes the contents of the current "CTL_HOME":

  • The CTL environment, plus
  • The "commander-extension" components: additional java libraries and scripts
  • The "ctier-seed" modules

Layout & configuration

Location

Both the server and client packages will install as optional packages (CTIER_ROOT=/opt/ctier) honoring the self-contained directory hierarchy.

Install into "/usr/local" or elsewhere instead? Split home and base?

System integration

The server package should setup an init script ("ctier") that facilitates automatic startup and shutdown with the system. Wrap the standard Jetty script in some way?

Ports

The server should come up on a well-known port. Is 8080 acceptable?

Users and groups

Establish a ControlTier system user and group ("ctier") to own the installed software and run the server process.

Environment

Establish "/opt/ctier/etc/profile", "/etc/ctier" or "/etc/profile.d/ctier" to support system-wide environment setup. Maintain ~/.ctierrc to facilitate individual user's custom ControlTier environment (e.g. personal depot).

Projects and logins

Is it necessary to create a default project? Might be useful, or might be deferred as a post-installation step.

Install with the standard default/default authentication or is their a JNDI tie-in to system-level authentication so that users will automatically be able to use their system accounts to login to the server?

Usage

The packaging approach and post-installation configuration options should promote both the use of a system-wide server and client installation as well as the establishment of client depots by individual user accounts on the system.

Common installation

All users on the system will share a single server installation relying on Workbench projects and the frameworks authentication and authorization methods to manage their work.

In addition, the client package should establish a common depot for system-wide use.

Individual user depots

We should also promote the ability for individual users to interact with the common (server) installation via their own accounts. User's will exploit the common client (Ctl) installation but use their on depot (or more accurately: set of Ctl base directories).

The Ctl setup script (ctl-setup) will provide the means by which users will setup their own CTL_BASE. Default to "~/ctier/ctl"?

Build process

The standard ControlTier build process should be extended to produce rpm and apt packages as well as the current zip and jar formats.

Status

Requests filed on the sourceforge.net tracker for the two components:

client rpm

Tracker items:

  • Request #2873625 - Create a RPM file release of the controltier client
    • added initial ctier-client rpm build goals to the maven.xml - Gschueler 20:58, 6 October 2009 (UTC)
  • Bug #2873718 - ctl-setup produces incomplete CTL_BASE configuration
    • committed changes to Setup/configuration - Gschueler 21:30, 13 October 2009 (UTC)
    • Request #2875022 - add ctl-check tool to check that a CTL_BASE is valid
      • added ctl-check tool and initial check code - Gschueler 21:30, 13 October 2009 (UTC)

server rpm

Tracker item:

  • Request #2873627 - Create a RPM file release of the controltier server
    • committed ctier-server spec file and related changes - Gschueler 00:19, 29 October 2009 (UTC)

Related items:

  • Request #2886663 - add server-setup script to configure server
    • committed server-setup script and related rpm builder changes - Gschueler 00:19, 29 October 2009 (UTC)
  • Request #2892048 - Add init script setup to server RPM
    • committed: "updated spec to add init script and default configuration, as well as remove service at uninstall time. The init script is a copy of the jetty.sh patched to support chkconfig" - Gschueler 22:40, 5 November 2009 (UTC)
Personal tools
Development