wiki:GROUP_DEPLOYMENT_R1
Last modified 16 years ago Last modified on 08/18/09 13:50:38

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=GROUP_DEPLOYMENT_R1, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

This group of tasks have a goal to implement the design of all deployment tasks from GROUP_DEPLOYMENT_R0.

Task requirements

Packages:

  • Sophie 2 should be available and possible to run on various kind of packages - zip, tar.gz, rpm, (optional) deb, dmg.
  • There should be sophie installer which manage to install the .dll and .so native libraries that are needed for some of the features. (Optional) The look and feel of the installer should somehow look like sophie 2 look-and-feel.
  • There should be automatic way to upload the generated distributions on the Trac - through Hudson build server.
  • The build scripts should be improved to install the needed native libraries on the user machine.

Applet and JWS:

  • Running sophie applet should be uploaded on http://sophie2.org/applet and sophie should be shown inside the applet frame, not in a separate one. It should show the reader edition.
  • (Optional) There should be a local storage in the user machine for Java Web Start so the configuration files can be stored there. It is optional because it is not with high priority in this state of the application..

It will be good if we have some script for building with maven in the project with MAVEN_OPTS and goals set and some utility in core.modularity for getting the edition property.

If there is time left FileEntryManager should be refactored.

Task result

  • Running applet and java web start, uploaded on the corresponding urls.
  • Different packaged distributions uploaded on Trac, including the installer version.

Implementation idea

  • Follow the GROUP_DEPLOYMENT_R0 design and implementation ideas.
  • Use sophie2.development property to refactor the file entry manager and remove the static paths from there.

GROUP_DEPLOYMENT_R0

How to demo

  • Show sophie2.org/applet and sophie2.org/jws
  • Show the generated packages, extract them and run sophie from there.

Design

  • Packages: Hudson must be configured to run the package phase with assembly goal and to run batch task, which execute the following script:
#!/bin/bash
TODAY=`date +%Y%m%d%H%M`
cd ./jobs/Sophie\ 2.0\ Distribution/workspace/sophie2/sophie2-platform/target/
for zip in $(ls *.zip)
do
        zip_file="/var/www/daily_builds/sophie2-`echo $zip | cut -d'-' -f5 | cut -d'.' -f1`-$TODAY.zip"
        cp $zip $zip_file
        ln -s $zip_file "/var/www/daily_builds/sophie2-`echo $zip | cut -d'-' -f5 | cut -d'.' -f1`-last-build.zip"
done

for targz in $(ls *.tar.gz)
do
        targz_file="/var/www/daily_builds/sophie2-`echo $targz | cut -d'-' -f5 | cut -d'.' -f1`-$TODAY.tar.gz"
        cp $targz  $targz_file
        ln -s $targz_file "/var/www/daily_builds/sophie2-`echo $targz | cut -d'-' -f5 | cut -d'.' -f1`-last-build.tar.gz"
done

This script will copy the created zips and targz(using hudson) into daily_builds folder in the server folder. It is fully created in the design while testing if it can work:).

  • Hudson must be updated and batch tasks plugin must be installed.
mvn rpm:rpm
  • It seems that there will be no problems using the plugin with modular project, so it has to work without other configurations.
  • Hudson job about this should be created too.
  • The installer - izpack maven plugin seems to be broken about the modular hierarhy, so ant task must be created, except using the plugin. Here is the configuration that should be added in the main pom.xml:
<plugin>
	          <artifactId>maven-antrun-plugin</artifactId>
	          <inherited>false</inherited> 
	          <version>1.1</version>
	          <dependencies>
	          	<dependency>
	              <groupId>org.codehaus.izpack</groupId>
	              <artifactId>izpack-standalone-compiler</artifactId>
	              <version>4.3.1</version>
	            </dependency>
	          </dependencies>
	          <executions>
	            <execution>
	              <id>create-staging-area</id>
	              <phase>deploy</phase>
	              <goals>
	                <goal>run</goal>
	              </goals>
	              <configuration>
	                <tasks>
	                  <taskdef name="izpack"
	                               classname="com.izforge.izpack.ant.IzPackTask"/>
	   					 <!-- create izpack installer jar file -->
	       				 <izpack input="target/izpack/install.xml"
	                			output="target/izpack/sophie2-installer.jar"
	                			installerType="standard"
	                			basedir="target/sophie2-platform-${version}-author/sophie2-platform/"/>	
	                </tasks>
	              </configuration>
	            </execution>
	          </executions>
        	</plugin>

Also an install.xml and Licence.txt files should be created. There is example install.xml here: http://svn.codehaus.org/izpack/izpack-maven/trunk/izpack-maven-plugin/src/it/sample/src/izpack/install.xml. Also the sip-communicator project can use as example about the izPack configuration: http://sip-communicator.org/. It is an open-source project using also Felix.

  • In my opinion dmg and deb packages should be created in the next revision of deployment task. The optional things about the JWS persistence and file entry manager refactoring goes to the next revision of the task too.

Implementation

  • Steps to generate installer distribution:
    • change the packaging in author/reader/server_bin.xml to dir
    • execute 'mvn package assembly:assembly -Dmaven.test.skip=true' to create folders with the modules for the corresponding editions
    • edit the base pom.xml and change the maven-antrun-plugin phase from deploy to package(this should be fixed in next revisions).
    • execute 'mvn package antrun:run -Dmaven.test.skip=true'
      • this will generate the installer for author edition. If you want to create installers for the other editions change izpack input and output(in maven-ant-plugin section) to reader/server_install.xml and sophie2-reader/server-installer.jar

Merged to the trunk in [5360].

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)