First steps

First of all, have a look at the prerequisites.

I will describe here the installation on a Debian system, and on Tomcat as the web container. If you are installing this application on another system / web container, reading this guide and your system and web container guide should be enought for you to make it. Of course, tips and tricks are very welcome: send them to me and I'll add them in this document.

JVM

First of all, you need to install a JAVA virtual machine. I personnaly choosed to install the SUN one. Depending on your Debian version, the SUN JVM is either available as a package, eithier you need to make your own .deb from the standard SUN installation.

Have a look in the available installations for SUN JVM, and install it if found:

# apt-cache search sun-java5-jdk
sun-java5-bin - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture dependent files)
sun-java5-jdk - Sun Java(TM) Development Kit (JDK) 5.0
sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture independent files)
# apt-get install sun-java5-jdk sun-java5-jre 
        

If there is no installation available, you need to download the Java 2 Platform Standard Edition 5.0. Then, you have to make it a Debian package in order to register it as the Java virtual machine of your Debian system.

# apt-get install java-package
# fakeroot make-jpkg jdk-1_5_0_05-linux-i586.bin
# dpkg -i sun-j2sdk1.5_1.5.0+update05_i386.deb
        

Web Container

The web archive is to be deployed in a web container, configured with a datasource pointing to a Bugzilla database, and other configuration parameters detailled below.

Installing Tomcat 5, mySQL java driver and referencing it in Tomcat 5.5

# apt-get install tomcat5.5
# apt-get install libmysql-java
# cd /usr/share/tomcat5.5/common/lib/
# ln -s /usr/share/java/mysql.jar
         

Database backend

The application needs a database backend to store users, rights, and meta information. As it uses hibernate, you do not have to care about creating the database objects: the application will do it itself. Nevertheless, it does require an existing database instance.

Please note that for the moment, only MySQL is supported. To install it:

# apt-get install mysql-server
         

Download and setup

Download and extract to installation directory

The application is packaged in a tar.gz format. Download, Gunzip and Untar it in your software installation directory:

# cd /usr/local/java
# wget http://www.jujunie.com/downloads/jujunie-integration-x.y.z.tar.gz
# tar -zxvf jujunie-integration-x.y.z.tar.gz
# rm jujunie-integration-x.y.z.tar.gz
        
This will create the installation directory, here /usr/local/java/jujunie-integration-x.y.z, now referenced in the rest of this document by INSTALL_DIR

TODO: More secure configuration have to be documented: In order to access a Planner file on your filesystem, edit the /etc/default/tomcat5.5 and set the TOMCAT5_SECURITY=no.

Create the database

Just connect to MySQL, create a database and a user who have full access on it:
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 40920
Server version: 5.0.32-Debian_7etch1-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database my_integration;
Query OK, 1 row affected (0.06 sec)

mysql> grant all privileges on my_integration.* to 'integration_usr'@'%' identified by 'integration_usr_password';
Query OK, 0 rows affected (0.05 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)

mysql> exit
Bye
        

Define Datasources in web container

A datasource must be available to connect to the integration database. This datatasource must be resolved using the JNDI name jdbc/integration. To configure the datasource, edit the /etc/tomcat5/server.xml file and add the datasource configuration into the host node where the application will be deployed. Hereafter a datasource configuration sample (created using Tomcat user guide):

<Context path="/jujunie-integration" 
            docBase="jujunie-integration"
            debug="5"
            reloadable="true"
            crossContext="true">
...
  <Resource name="jdbc/integration"
               auth="Container"
               type="javax.sql.DataSource"
               maxActive="100"
               maxIdle="30"
               maxWait="10000"
               username="integration_usr"
               password="integration_usr_pasword"
               driverClassName="com.mysql.jdbc.Driver"
               url="jdbc:mysql://www.example.com:3306/my_integration?autoReconnect=true"/>
...
</Context>    
         

The only required datasource is to access the jujunie integration database you've just created. But depending on the functionalities you will use, you'll have to configure others:

Description JNDI Name resolution Required for
Bugzilla database jdbc/bugzilla Bugzilla reports, Bugzilla Update
Each database to monitor Any name you want in jdbc/ Environment monitoring

Properties configuration

You then have to configure several properties to match your environment. The properties have a default value listed below. To override one, you have to define it in your JNDI tree. Hereafter the smtp server hostname property configuration sample (created using Tomcat user guide ):

<Environment name="jujunie-integration/common/mail/smtp-hostname"
                   value="mail.intranet.fimasys.fr"
                   type="java.lang.String"
                   override="false"/>
         
Available properties
Property Default value Description
jujunie-integration / common / mail / smtp-hostname localhost SMTP (Simple Mail Tranfert Protocol) server host name. This server will be used to send e-mails from the application, like reports after processing a Planner file in BugzillaUpdate.
jujunie-integration /common /mail / smtp-portnumber 25 SMTP server port number. 25 is the default port number for the SMTP protocol
jujunie-integration / common /mail / authentification false Flag to indicate if the configured SMTP server needs an authentification. If set to true then you'll have to set the user login and password to use.
jujunie-integration / common / mail / smtp-login User login, if the SMTP server requires an authentification.
jujunie-integration / common / mail / smtp-password User password, if the SMTP server requires an authentification.
jujunie-integration / common / mail / from-name Jujunie Integration Project The from name on sending e-mails.
jujunie-integration / common / mail / from-email do.not.reply@example.com The from email on sending e-mails.
jujunie-integration / common / authentication / ldap-server localhost LDAP server
jujunie-integration / common / authentication / ldap-basedn LDAP Base DN
jujunie-integration / common / authentication / ldap-uidattribute uid LDAP UID attribute
jujunie-integration / common / authentication / ldap-cnattribute cn LDAP CN attribute
jujunie-integration / common / authentication / ldap-emailattribute mail LDAP attribute that holds user email
jujunie-integration / bugzilla / base-url http://localhost/bugzilla Base URL to access Bugzilla using the HTTP protocol. This property is used to launch Bugzilla processes like the sanity check to send unsent e-mails
jujunie-integration / bugzilla / user-login bugadmin Bugzilla user login. When accessing Bugzilla threw HTTP, Bugzilla requires a login and password for authentification. This login is also used to populate the Bugzilla audit system when modifying a bug directly in the Bugzilla database.
jujunie-integration / bugzilla / user-password changeme Bugzilla user password.
jujunie-integration / bugzilla / email-suffix If users logins are not email, then an e-mail suffix is required. See the Bugzilla configuration.
jujunie-integration / bugzilla / reports / preset-queries
<?xml version="1.0" encoding="UTF-8"?>
<reports>
  <hours-worked>
    <report id="sample1" name="Preset Query Sample">
      <selector name="With 'delivery' keyword"
                   add-from=", keywords, keyworddefs"
                   add-where=" and keyworddefs.name='delivery'
                               and keyworddefs.id = keywords.keywordid
                               and keywords.bug_id = bugs.bug_id"/>
    </report>
  </hours-worked>
  <deadline>
    <report id="deadline-opened" name="Opened bugs that have a deadline">
      <selector name="Opened with deadline"
                   add-from=""
                   add-where=" and bugs.deadline is not null
                               and bug_status in ('UNCONFIRMED',
                                                  'NEW',
                                                  'ASSIGNED',
                                                  'REOPENED')"/>
    </report>
  </deadline>
</reports>
             
This is the preset queries configuration. Basically, it allows you to modify the way reports select records and map it to a category. For more information, please see reports section.
jujunie-integration / bugzilla-update / task-starting-notification-delay 1 When activating the task starting notification in BugzillaUpdate process, this parameter define the delay, in days, between the current date and the start date of the task before sending the notification
jujunie-integration / bugzilla-update / estimated-planified-tolerance 3 If the absolute difference, in hours, between the planified task length and the bug current estimate is strictly greather than this value, the a warning is raised.
jujunie-integration / autodeploy / version V0_5 Version of AutoDeploy. The accepted values are:
  • V0_4
  • V0_5
jujunie-integration / autodeploy / xml-url http://localhost/webautodeploy/ConfigurationWrapper URL to the configuration servlet of AutoDeploy
jujunie-integration / database / schemas-ignore-list dbsnmp,dip,outln,perfstat,rman,sys,sysman,system,tsmsys,wmsys,xdb List of schemas to ignore in environment monitoring. The application will act as if they don't exist
jujunie-integration / database / dump / retention-hours 12 Guaranties the generated dumps availability for this amount of time. If a dump is older and the application needs additional space, the dump will be deleted
jujunie-integration / database / dump / repository /tmp/jujunie-integration/dump The system path to the directory to store dumps and associated logs and md5sum files
jujunie-integration / database / dump / repository-url http://$SERVER_NAME:$SERVER_PORT/tmp/jujunie-integration/dump Base URL to access files generated in dump repository. In the given parameter, you can use the following tokens:
  • $SERVER_NAME: will be replaced by the hostname found in HTTP request "host" HTTP header
  • $SERVER_PORT: will be replaced by the port number found in HTTP request "host" HTTP header
jujunie-integration / database / dump / permanent-mail-notification Any dump request and dump result will be send to this e-mail address
jujunie-integration / database / dump / max-running 10 Total maximum number of running dumps
jujunie-integration / database / dump / max-server-running 1 Total maximum number of running dumps for one server
jujunie-integration / database / dump / oracle / env-names ORACLE_HOME,ORACLE_BASE,ORACLE_BIN Environments parameters names for ORACLE datbase. Each name defined here must have a corresponding lower case properties: jujunie-integration / database / dump / oracle / env-environment_name set to the environment name. By default, the following properties are defined:
  • jujunie-integration / database / dump / oracle / env-oracle_home: /opt/oracle
  • jujunie-integration / database / dump / oracle / env-oracle_base: /opt/oracle
  • jujunie-integration / database / dump / oracle / env-oracle_bin: /opt/oracle/bin

Deploy

To deploy the application, simply create a symbolic link in the deploy directory of your web container to the web archive in the INSTALL_DIR, and restart your tomcat server:
# cd /var/lib/tomcat5/webapps
# ln -s INSTALL_DIR/jujunie-integration-x.y.z.war
# /etc/init.d/tomcat5 restart
         

Third party alteration

In order to integrate correctly the tools, applications and protocols together, it is sometimes required to make some changes on them. All the patches listed there have been suggested to the oweners of the third party tool / application, and are linked as attachment in a bug in Bugzilla.
  • RescanMail delay in bugzilla ( Bug 11): the rescan mail functionality in the sanity checks searches for unsent mails. To do so, it looks for all bugs where date of last modification is < than last mail sent, but with a hard coded delay of 30 minutes. The purpose of the proposed patch is to make this delay configurable by adding forceDelayTo parameter to the request parameters. The patch has been proposed to Bugzilla team in the bugzilla dev. mailling list.