Release Management/Upgrading Process from Last Release MP to latest to be released OBX
Contents |
Introduction
This page refers to how can we implement test which can check upgrade process from the last official released MP to latest ready to be released MP OBX. As an example we can take a real use case; at the moment we have MP7 released and ready to be used by customers. The proposal is to test upgrade the next release MP8 OBX with MP7 using automated scripts. More about this milestone here
We can implement the upgrade either using the command line or module management console. For testing using the command line we propose we can write the scripts using bash scripts and there are already few scripts available to test which we will discuss in detail below. For testing using Module Management Console we propose we can write few selenium scripts.
Using the command line
After a detailed discussion with platform team we came up with the steps to be followed for a upgrade test (upgrade from last release MP to latest MP OBX) Steps followed for a upgrade test from MP source to latest MP OBX:
- openbravo folders to be deleted: legal, lib, WebContent, src-core, src-db, src-gen, src-trl, src-wad, src, web, src-test, src-diagnostics.
- except the dirs: build, modules, logs,
- uncompress the obx in the openbravo dir
- ant update.database-Dapply.on.create=true, ant core.lib, ant wad.lib, ant trl.lib, ant compile.complete.deploy.
We already have a working script command line script written by few folk(s) in our team. Might have to modify a bit to suit the hudson environment.
Using Module Management Console
Since most of our customer use Module Management Console, it make sense to test the upgrade process from the module management console. Basically the operation what is does is same as what we do from command line but with a difference that input is fed from the web browser.
The best way to test the upgrade process from MMC a.k.a Module Management Console is to write selenium test. Our QA team could help us writing the test for the same. Read more about Automated Test using selenium here
How tied to continuous integration engine
The process of upgrading the deployed ERP instance to the latest available obx is done for every obx in here, which gets generated by job erp_devel_main_obx
The job that does the upgrade is erp_upgrade_to_latest_obx.
Process
- Clone the source from main and update it to the latest MP released
hg clone <local main repo> $WORKSPACE
hg up -C $LATEST_MP
- Set the properties (set the deploy to class)
/srv/config/obprop.sh /srv/config/erp_upgrade_to_latest_obx.config
- Deploy the instance
ant install.source
- Remove the following directories to upgrade and the older obx
rm -rf legal lib WebContent src-core src-db src-gen src-trl src-wad src web src-test src-diagnostics *.obx
- Generate the obx file from the repo int-11 (last successfull revision)
- unzip -o Openbravo2.50CI.<revision>.obx
- Trigger on following ant tasks to upgrade
ant update.database
ant core.lib
ant wad.lib
ant trl.lib
ant compile.complete.deploy
- Restart the tomcat