Project Overview

Sahana Vesuvius is a disaster preparedness and response system. Two main tasks of Vesuvius are,

  • contributing to family reunification by reporting and search
  • assisting with hospital triage, including photo capture and data interchange.

One of the main lack of Vesuvius is the lack of a proper installation process (installation wizard). Main target of this project is to build a installation wizard for Vesuvius. In current Vesuvius installation method there is a install file to read and follow those instructions. The user has to do the complete installation process manually without having any GUI involved. Simply the user who is willing to use Vesuvius has to follow some technical aspects to install Vesuvius in his/her system. This is a main drawback for the usage of the system. That is because many users are not familiar with technical details and so that they reject the systems that have many technical aspects to access.

The experimental version of Vesuvius is called the Mayon and it has a proper installation process. For this project same technology that the Mayon is using is used, to build a installation process for Vesuvius.

Requirements of the Project

  • Mayon Installation Requirements

There are some requirements that should be satisfied to install Mayon in a system. For this project as the operating system Ubuntu is used. So the requirements in here are for users who are using Ubuntu as their operating system. To install Agasti-Mayon in a Ubuntu operating system some requirements should be satisfied. They can be classified as Software requirements and Hardware requirements. According to the README file that is in the Agasti software, above requirements can be identified as below.

Software Requirements

  1. Ubuntu 9.10 LTS or later
  2. Apache HTTP Server 2.2.14 or later
  3. MySQL 5.1.41 or later
  4. PHP 5.2.12 or later (with APC)

Hardware Requirements

  1. Intel Pentium or AMD Athlon CPU
  2. minimum of 50 MB available disk space
  3. minimum 512 MB RAM
  • Vesuvius Installation Requirements

Software Requirements

  1. Linux/Solaris OS
  2. Apache HTTP Server
  3. MySQL 5.1+
  4. PHP 5.3+
  5. SOLR/Tomcat (optional)

Vesuvius Installation Process requirements are listed in the below documents in a more detailed manner.

https://docs.google.com/document/pub?id=1ZkibifiHXQ45SAplsDj4_JdkyamDWX1TEAMP6wdpVys

Mayon and Vesuvius Installation Steps

Under this section it describes what are the steps in the installation process of current Mayon and the what will be the steps in the installation process of Vesuvius that is developed with the completion of this project. Below table is described what are the installation steps in the current Mayon installation process and what will be the installation steps in the developing Vesuvius installation process. As at now it is assumed that the Vesuvius installation process will have steps as same as the Mayon installation process. These steps can be changed with the requirements. Currently available and active Mayon installation steps can be get from the install.inc.php file that lies in the web directory of the Agasti root directory.

Mayon Installation Steps Vesuvius Installation Steps
1. Introduction 1. Introduction to Vesuvius
2. License Agreement 2. License Agreement
3. Prerequisite Check (Checks whether requirements are satisfied for Mayon istallation) 3. Prerequisite Check
4. Configure Database 4. Configure Database
5. Configuration Summary 5. Configuration Summary
6. Installation Summary 6. Installation Summary

In this project the installation wizard is created with a GUI to complete the above mentioned steps.

Current Mayon Installation Process

There are some main files that essential for the Mayon installation process. For developing Mayon, Symfony framework has been used. According to symfony framework standards the files that interact with the browser directly should lies in the web directory. So in Mayon most of the files that directly relates to installation are in the 'web' directory that lies in the Mayon root directory. Below is a description taking the most important files in the installation process one by one.

  • install.php

This is the main file that starts the installation process. To start the installation process this file should be called through the browser. Cookies are set through this file. The GUI that can be seen in the installation process is handled by this file. The GUI handling part is in the bottom of the install.php file and it is using XML and html. For this the main.css file is used. It is using an array called $AG_CONFIG to keep all the important variables that required for the installation process. There are two other main files that needs to run the installation process with this. Those are install.inc.php and func.inc.php.

  • install.inc.php

There are three classes in this file. They are agInstall, agDoctrineConfigureDatabaseTask and agDoctrineBuildSqlTask. From those three classes agInstall class plays the main roll in the installation process. install.php file creates a instance of the agInstall class called $AG_INSTALL and passes the parameter array $AG_CONFIG. This class has the constructor which calls for the 'EventHandler' method. This is the most important method in the installation process control. This method controls the installation steps. The agInstall class also consists of step controlling methods. That means for each step in the installation process there is a separate method to control the step.

  • requirements.inc.php

This file consists of the methods that checks for the requirements for installing the system. For example, checking the PHP version. checking the database connection, checking the memory status for installation etc.

  • func.inc.php

This file includes the methods that controls the Cookies of the system, redirecting, keep the installation configurations etc. This is also requires for the installation process.

Other than above four main files ProjectConfiguration.class.php, SfYaml.php and some of the symfony framework files are important for the installation process. Above mentioned four files are the most important files in the installation process controlling.

Self Running Installer

This is one of the primary tasks of the project. The idea here is to taking out the existing installer of Mayon from the Symfony framework. This could be achieved successfully. For this to achieve first install.php file and install.inc.php file were taken out and then tried to run it. Then the required files to run those two files could identify. Each file that is necessary to run those both files were taken out of the Symfony frame work and make them work with the above two files. This makes a system that runs the installer independently. That means irrespective of whether there is an application to install or not the installer is running itself successfully. So this self running installer can be successfully used as a template to build a installation wizard to an application. Most of the steps that are in the self running installer is common to all the installation wizards. Those common steps are,

  • Introduction to the application.
  • License Agreement page.
  • Database Configuration.
  • Configuration summary.

Mainly there are two steps that are dependent on the application. Those two steps are,

  • Prerequisite check- Check whether there are minimal system requirements to install the application.
  • Install- What should do in the installation (Uploading database models, creating users etc.)

There are four main files that needs for the self running installation process. Those files are listed in the above “Current Mayon Installation Process” section. In Mayon the configurations are saved in yaml files (app.yml,database.yml, config.yml). There is a separate library to read and write the yaml files. The self running installer is consisting of this yaml read and write library also. To include this library in the self running installer the following four files also used other than the above four main files (install.php, install.inc.php, func.inc.php and requirements.inc.php)

  • sfYaml.php
  • sfYamlDumper.php
  • sfYamlInline.php
  • sfYamlParser.php

It is very much important to have a such an template installer, because if anyone need to build a installation wizard for an application then the developer can build it using this as a template without starting from the beginning.

Self Running Installer File Structure

The file and folder structure of the self running installer has been modified such that it can be easily editable to create a new installer. Below is the file and folder structure of the self running installer.

installer/

 install.php
 install/
    css/
    images/
    install.inc.php
    LISENCE file
    lib/
       func.inc.php
       requirements.inc.php
       agasti_lib/
          agasti.inc.php(Mayon installation file)
          agasti.inc.php(Vesuvius installation file)
          Yaml/
          Conf/
             Config.php
             Htaccess.php

If the developer needs to create the Mayon installation process then he/she has to use the Mayon version of agasti.inc.php file and then create the installer. If the developer needs to create the vesuvius installation process then he/she has to use the Vesuvius version of agasti.inc.php file and create the installer.

In the above file and folder structure we only need to include the customized agasti.inc.php file and to edit the “eventHandler” method in the install.inc.php file to create the custom installer for the application. So as you can see it is easy to develop a customized installer using the self running installer. You only have to create two files to make your installer.

Vesuvius Installer

In this section it is giving a detailed description about the vesuvius installer. The installation wizard should cover the things that are in vesuvius installation requirements section above.

In the vesuvius installer there are main seven steps. Those are as below.

  • Introduction to Vesuvius
  • License Agreement
  • Prerequisite Check
  • Configure Database
  • System Configuration
  • Configuration Summary
  • Installation Summary

From the above seven steps Introduction to Vesuvius, License Agreement, Prerequisite check, Configuration summary and Installation summary steps are as same as the appropriate Mayon installation steps. The major changes are in the Configure database and System configuration steps.

In the configure database step it is taking the database name, database server, hostname, database user and database password as inputs and check it when the user clicks the “test connection” button. If it is successful it is showing a message that the connection is successful. If it is unsuccessful then an error message will be shown to the user. One of the most important things in the Database Configuration step is that until the connection is successful you cannot go forward in the installer. If you are successful in the connection then you can go the next step called the system configurations.

The next important step is the System configuration step. In this step the user is giving the opportunity to enter the appropriate system configuration and also to create a password policy. In the password policy the user can select the minimum length and the maximum length of the password and whether the password can have the lower and uppercase letters etc. After setting these values user has to click on the “Save System Configuration” button. If it is successfully saved then user can go to the next step. Otherwise the user will be shown the error message. In this step also the user cannot go forward until the user successful in saving the system configuration.

References


QR Code
QR Code community:gsoc:gsoc_weerakkody (generated for current page)