Jump to: navigation, search

Difference between revisions of "Aperi/Design Proposals"

(Sample Install Project)
(Design Proposals)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Proposal ==
+
== Design Proposals ==
Migrate the ConfigureAperi code to AntInstaller.
+
* [[Migrate the ConfigureAperi code to AntInstaller]]   ([[User:Laverone.us.ibm.com|Craig L]] 15:18, 9 May 2007 (EDT))
 
+
=== Ant Installer Project ===
+
* [http://antinstaller.sourceforge.net/index.html Main page]
+
* [http://sourceforge.net/project/stats/detail.php?group_id=123466&ugn=antinstaller&mode=week&type=prweb Project Activity]
+
       
+
=== Licensing ===
+
* AntInstall - Apache 2.0
+
* SysOut - Apache 2.0
+
* Ant - Apache 2.0
+
* DOM - [http://antinstaller.sourceforge.net/licenses/LICENSE-dom.txt license]
+
* SAX - [http://antinstaller.sourceforge.net/licenses/LICENSE-sax.txt license]
+
* Xerces - Apache 1.1
+
* JGoodies - [http://antinstaller.sourceforge.net/licenses/LICENSE-jgoodies.txt BSD]
+
 
+
=== Motivation ===
+
# Using AntInstaller reduces the need for custom Java code because the installer inherits configuration functions from ant
+
# The installer will be easier to maintain
+
## Less code to maintain
+
## Most maintenance changes will only require XML changes
+
# Graphical interface is user friendly
+
## Command line and silent installs also supported.
+
# Easy for Aperi users/adopters to change the branding, look and behavior of the installer.
+
## Menus and icons can be updated in XML
+
## The install behavior can be changed by updating the XML
+
## Adopters can ship just the build.xml, properties file and the ant binaries.
+
 
+
=== Other Options Considered ===
+
# [http://izpack.org/ IzPack]
+
# [http://www.macrovision.com/products/installshield/installanywhere/index.shtml Install Anywhere]
+
 
+
 
+
=== Sample Install Project ===
+
==== Screenshots ====
+
[[Image:Aperi_sampleInstallerScreenshot_1.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_2.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_3.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_4.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_5.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_6.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_8.JPG]]
+
[[Image:Aperi_sampleInstallerScreenshot_9.JPG]]
+
 
+
==== Input: Antinstall-config.xml ====
+
<code>
+
<pre>
+
<nowiki>
+
<?xml version="1.0"?>
+
<!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN" "http://antinstaller.sf.net/dtd/antinstall-config-0.8.dtd">
+
 
+
<installer
+
        ui="swing,text"
+
        verbose="true"
+
        debug="true"
+
        lookAndFeel="native"
+
        name="Aperi Storage Manager Installer"
+
        windowIcon="/resources/splash.png"
+
        defaultImageResource="/resources/uppersplash.png"
+
        minJavaVersion="1.5"
+
        antialiased="true"
+
        finishButtonText="Install"
+
        version="5.3"
+
        wide="600:275">
+
    <page
+
        type="splash"
+
        name="splash"
+
        displayText="Aperi Storage Manager Installer"
+
        splashResource="/resources/splash.png"
+
        altText="--(o--Aperi Storage Manager Installer--o)--" />
+
    <page
+
        type="input"
+
        name="intro"
+
        displayText="Welcome">
+
        <comment
+
            displayText=""
+
            explanatoryText="This is a demo of the Aperi installer using antinstaller."
+
            />
+
        <comment displayText=""/>
+
        <comment displayText="Installer made with"/>
+
        <comment displayText="http://antinstaller.sourceforge.net" bold="true"/>
+
<hidden
+
property="env.HOSTNAME"
+
value="${env.COMPUTERNAME}"
+
/>
+
    </page>
+
    <page
+
        type="license"
+
        name="license"
+
        displayText="License conditions"
+
        resource="/resources/EPL.txt"
+
        target="default"
+
        usePaging="true" />
+
    <page
+
        type="input"
+
        name="componentSelection"
+
        displayText="Component Selection">
+
        <comment
+
        displayText="The Aperi Storage Manager consists of three major components: The server, the host-based agent, and the GUI."
+
title="false" />
+
        <comment
+
        displayText="You can configure any or all of these to run on this computer."
+
title="false" />
+
<target-select defaultValue="configureDerby" property="db.target" displayText="Database">
+
<option value="configureDerby" text="Derby"/>
+
<option value="configureDB2" text="DB2"/>
+
</target-select>
+
        <target
+
        target="configureServer"
+
        displayText="Server"
+
        defaultValue="true"
+
        osSpecific="true"
+
        strict="false" />
+
        <target
+
        target="configureAgent"
+
        displayText="Agent"
+
        defaultValue="true"
+
        osSpecific="true"
+
        strict="false" />
+
        <target
+
        target="configureGUI"
+
        displayText="GUI"
+
        defaultValue="true"
+
        osSpecific="true"
+
        strict="false" />
+
    </page>
+
    <page
+
      type="input"
+
    name="installLocation"
+
    displayText="Installation location" >
+
    <directory
+
    displayText="Installation location"
+
    checkExists="true"
+
    create="true"
+
    defaultValue="/opt/Aperi"
+
    defaultValueWin="C:\Program files\Aperi"
+
    property="install.dir" />
+
    </page>
+
<page
+
type="input"
+
name="agentConfig"
+
displayText="Agent configuration"
+
ifProperty="${configureAgent}==true">
+
<comment
+
displayText="Enter values to configure the agent."
+
title="true" />
+
<ext-validated
+
property="agent.port"
+
displayText="Agent port"
+
defaultValue="9570"
+
validationClass="org.eclipse.aperi.install.ValidatePort" />
+
</page>
+
<page
+
name="serverConfig"
+
displayText="Server configuration"
+
type="input"
+
ifProperty="(${configureAgent}==true)OR(${configureServer}==true)">
+
<comment
+
displayText="Enter values to configure the server."
+
title="true" />
+
<validated
+
property="server.hostname"
+
displayText="Server hostname"
+
defaultValue="${env.HOSTNAME}"
+
regex="[a-zA-Z0-9.]*"
+
/>
+
<ext-validated
+
property="server.data.port"
+
displayText="Data server port"
+
defaultValue="9549"
+
validationClass="org.eclipse.aperi.install.ValidatePort"
+
/>
+
<ext-validated
+
property="server.device.port"
+
displayText="Device server port"
+
defaultValue="9000"
+
validationClass="org.eclipse.aperi.install.ValidatePort"
+
/>
+
<hidden
+
property="server.reporting.port"
+
value="8080"
+
/>
+
<directory
+
property="server.reporting.dir"
+
defaultValue="${user.dir}/reporting/reportRepo"
+
checkExists="true"
+
create="true"
+
displayText="Report server repository path"
+
defaultValueWin="${install.dir}/reporting/reportRepo"
+
/>
+
<hidden
+
property="server.data.heap"
+
value="1024m"
+
/>
+
<hidden
+
property="server.device.heap"
+
value="1024m"
+
/>
+
</page>
+
<page
+
name="derbyConfiguration"
+
displayText="Derby Configuration"
+
type="input"
+
ifProperty="db==Derby">
+
<ext-validated
+
property="db.port"
+
displayText="Database port"
+
defaultValue="1527"
+
validationClass="org.eclipse.aperi.install.ValidatePort"
+
/>
+
<validated
+
property="db.driver"
+
displayText="Driver"
+
defaultValue="org.apache.derby.jdbc.ClientDriver"
+
regex="[a-zA-Z0-9.]*"
+
/>
+
<hidden
+
property="db.type"
+
value="derby"
+
/>
+
<hidden
+
property="db.schema"
+
value="Aperi"
+
/>
+
<hidden
+
property="db.username"
+
value="Aperi"
+
/>
+
<hidden
+
property="db.password"
+
value="aperi"
+
/>
+
</page>
+
<page
+
name="db2Configuration"
+
displayText="DB2 Configuration"
+
type="input"
+
ifProperty="db==DB2">
+
<validated
+
property="db.username"
+
displayText="Username"
+
defaultValue="db2admin"
+
regex="[a-zA-Z0-9.]*"
+
/>
+
<password
+
property="db.password"
+
defaultValue=""
+
displayText="Password"
+
regex="*"
+
textMask="true"
+
/>
+
<ext-validated
+
property="db.port"
+
displayText="port"
+
defaultValue="50000"
+
validationClass="org.eclipse.aperi.install.ValidatePort"
+
/>
+
<validated
+
property="db.driver"
+
displayText="Driver"
+
defaultValue="com.ibm.db2.jcc.DB2Driver"
+
regex="[a-zA-Z0-9.]*"
+
/>
+
<directory
+
property="db.cmdPath"
+
defaultValue=""
+
checkExists="true"
+
create="false"
+
displayText="DB2 Command Line Processor Path"
+
defaultValueWin=""
+
/>
+
<hidden
+
property="db.type"
+
value="db2"
+
/>
+
<hidden
+
property="db.schema"
+
value="Aperi"
+
/>
+
</page>
+
    <page
+
type="progress"
+
name="progress"
+
showTargets="true"
+
displayText="Installation progress" >
+
</page>
+
</installer>
+
</nowiki>
+
</pre>
+
</code>
+
==== Input: build.xml ====
+
<code>
+
<pre>
+
<nowiki>
+
<?xml version="1.0"?>
+
<project name="Aperi installer build"  default=""  basedir="${basedir}">
+
 
+
<!-- this is required to pick up the properties generated during the install pages -->
+
<property file="${basedir}/ant.install.properties"/>
+
 
+
<target name="default" depends="">
+
<echo>"Default"</echo>
+
</target>
+
<target name="configureDerby" depends="">
+
<echo>"Derby"</echo>
+
</target>
+
<target name="configureDB2" depends="">
+
<echo>"DB2"</echo>
+
</target>
+
<target name="configureServer-win" depends="">
+
<echo>"Configuring the Data server"</echo>
+
+
<echo>"Updating the properties file: ${install.dir}/datasvr/configuration/server.config</echo>
+
<replaceregexp byline="false">
+
  <regexp pattern="(name=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;${env.HOSTNAME}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<replaceregexp byline="false">
+
  <regexp pattern="(port=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;${server.data.port}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<replaceregexp byline="false">
+
  <regexp pattern="(driver=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;${db.driver}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<replaceregexp byline="false">
+
  <regexp pattern="(url=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;jdbc:${db.type}://${env.HOSTNAME}:${db.port}/${db.schema}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<replaceregexp byline="false">
+
  <regexp pattern="(user=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;${db.user}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<replaceregexp byline="false">
+
  <regexp pattern="(schema=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;${db.schema}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<replaceregexp byline="false">
+
  <regexp pattern="(reportServerPort=)(&quot;?)(.*)(&quot;?)"/>
+
  <substitution expression="\1&quot;${server.reporting.port}&quot;"/>
+
  <fileset
+
  dir="${install.dir}/datasvr/configuration"
+
  includes="server.config" />
+
</replaceregexp>
+
<echo>"Updating the file: ${install.dir}/datasvr/server.bat</echo>
+
<echo>"    Updating path"</echo>
+
<replaceregexp byline="false">
+
  <regexp pattern="(set PATH=)(.*)"/>
+
  <substitution expression="\1${install.dir}/lib/w32-ix86;%PATH%"/>
+
  <fileset
+
  dir="${install.dir}/datasvr"
+
  includes="datasvr.bat" />
+
</replaceregexp>
+
<echo>"    Updating cd"</echo>
+
<replaceregexp byline="false">
+
  <regexp pattern="(cd )(.*)"/>
+
  <substitution expression="cd ${install.dir}/db"/>
+
  <fileset
+
  dir="${install.dir}/datasvr"
+
  includes="datasvr.bat" />
+
</replaceregexp>
+
<echo>"    Updating Java path"</echo>
+
<replaceregexp byline="false">
+
  <regexp pattern="(&quot;?)(.*)(java)(&quot;?)"/>
+
  <substitution expression="${java.home}/bin/java"/>
+
  <fileset
+
  dir="${install.dir}/datasvr"
+
  includes="datasvr.bat" />
+
</replaceregexp>
+
<echo>"    Updating heap size"</echo>
+
<replaceregexp byline="false">
+
  <regexp pattern="(-Xmx)([0-9m]*)"/>
+
  <substitution expression="-Xmx${server.data.heap}"/>
+
  <fileset
+
  dir="${install.dir}/datasvr"
+
  includes="datasvr.bat" />
+
</replaceregexp>
+
<echo>"    Updating permissions"</echo>
+
<chmod perm="ugo+x" file="${install.dir}/datasvr/datasvr.bat" />
+
</target>
+
<target name="configureServer-linux" depends="">
+
<echo>server-linux</echo>
+
</target>
+
<target name="configureAgent-win" depends="">
+
<echo>agent-win</echo>
+
</target>
+
<target name="configureAgent-linux" depends="">
+
<echo>agent-linux</echo>
+
</target>
+
<target name="configureGUI-win" depends="">
+
<echo>gui-win</echo>
+
</target>
+
<target name="configureGUI-linux" depends="">
+
<echo>gui-linux</echo>
+
</target>
+
</project>
+
</nowiki>
+
</pre>
+
</code>
+

Latest revision as of 15:18, 9 May 2007

Design Proposals