Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Views

Upgrading to iHRIS 4.2

From IHRIS Wiki

Jump to: navigation, search

Upgrading from 4.1 to 4.2

If you have been running iHRIS version 4.1 and you now want to upgrade to 4.2 you need to follow these steps:

  1. Before you proceed, make sure you have backed up your database.
  2. Install ihris-manage, ihris-common, i2ce and textlayout (and ihris-qualify or ihris-train if you are using them).
    • Follow these instructions here how to install ihris-manage, i2ce, ihris-common, textlayout, ihris-train depending on the package that you are running
  3. Create a new branch for your customized code where you will be hosting the code that's upgraded to 4.2
    • Change directory to your branch with code then push it to a new location
      • bzr push lp:~TEAMNAME/PROJECTNAME/NEWBRANCHNAME
      • Example: For team ihris+ghana and project name ihris-manage-ghana then the command will be
        $ bzr push lp:~ihris+ghana/ihris-manage-ghana/manage-4.2.
      • You need to bind the directory to the new branch with
        $ bzr bind lp:~ihris+ghana/ihris-manage-ghana/manage-4.2.
        so that when you run bzr commit the updates get pushed automatically to launchpad.
  4. Update the module versions and module version requirements on the new branch to 4.2 as outlined below
  5. Remember to bzr commit after updating the versions and version requirements.

Upgrading customized source code to 4.2

It is advised to upgrade your customized code from 4.1 to 4.2.

You will have to run the following scripts on the top directory of your customized code where you have the iHRIS-Manage-BLANK.xml or iHRIS-Qualify-BLANK.xml file.

This assumes you have I2CE installed under /var/lib/iHRIS/lib/4.1/I2CE so, remember to use the correct path depending on your local setup.

$ php /var/lib/iHRIS/lib/4.1/I2CE/tools/version_bump.php

Then answer the questions by typing the highlighted letter or typing the whole word (case insensitive) and press Enter:

Is this a minor version bump (e.g. 4.0.5.X -> 4.0.6.0)?
Answer N
Is this a major version bump (4.0.X -> 4.1.0)?
(Yes/No):

Answer Yes

What is the target major version (e.g. 4.1)?: 

Answer 4.2

Then, the script will try updating all the versions and occasionally you maybe asked a question like

Would you like to update Burundi-deployment-history from 4.0.21.0.1 to 4.2.0?
(Yes/No/Always/neVer):

Answer Yes

This question comes up because the module is in version 4.0 and you want to upgrade to 4.2 without going through 4.1.

Up to this point all the module versions will be upgraded to 4.2.0. Next you will need to update the version requirements.

Upgrading version requirements

When enabling the modules using <requirement> tag, we usually set the minimum and the maximum version numbers.

When the code was version 4.1 the requirement version was set to be less than 4.2 and at least 4.1 like here

<requirement module="ihris-manage">
  <atLeast version="4.1" />
  <lessThan version="4.2" />
</requirement>

This needs to be upgraded to less than 4.3 and at least 4.2 like so,

<requirement module="ihris-manage">
  <atLeast version="4.2" />
  <lessThan version="4.3" />
</requirement>

To achieve the change you have to run this script

$ php /var/lib/iHRIS/lib/4.1/I2CE/tools/version_requirements_bump.php

You will be asked:

What is the target major version (e.g. 4.2)?:

Answer 4.2

The script will then upgrade all the version requirements.

After it finishes remember to bzr commit the changes to launchpad.

Updating a customized site to use I2CE version 4.2

Finally you will need to update your customized to use the new I2CE version 4.2.

Assuming your site is installed at /var/lib/iHRIS/sites/manage'

Open config.values.php to set the new path to I2CE

$ pico /var/lib/iHRIS/sites/manage/pages/local/config.value.php

Change the line

$i2ce_site_i2ce_path = "/var/lib/iHRIS/lib/4.1.11/I2CE"; 

To read

$i2ce_site_i2ce_path = "/var/lib/iHRIS/releases/4.2/i2ce"; 

Then access your site from the browser and you will be prompted for an update, or you can update from command line by running these command

$ cd /var/lib/iHRIS/sites/manage/pages
$ php index.php --update=1 --force-restart=1

If you want to run apache tail with 4.2 installed, from the terminal run

$ ihris-apache-tail