Kamis, 17 April 2014

Cloning Maximo environment

There are many reasons why it is useful sometimes to overwrite a development, test or training system with all the data and customizations from the production system. These are just few examples:
  • Development systems has become dirty after some customization that have not been moved to production.
  • Fresh data is needed on the test system to reproduce a problem and perform troubleshooting.
  • Fresh data is needed on the development system to develop new features.
The procedure described hereafter is not intended to replace the functionality of the Migration Manager especially when promoting customizations from test to production. Furthermore, the procedure assumes that dev, test and prod systems have the same version of Maximo installed and runs the same OS.

Here is the procedure. This is not an official IBM TechNote. Use at your own risk.
UPDATE: IBM has now released a more accurate procedure.


Clone the database
  • Backup the source Maximo database.
  • Backup the target Maximo database (this step is optional but suggested as a precautionary measure).
  • Restore the source backup into the target database.
To perform this steps you can use the built in features of your RDBMS or try to use the unlcvt command described in this post.


Reset passwords

Reset users password to be able to login with every account as needed.

update MAXUSER set PASSWORD = (select PASSWORD from MAXUSER where USERID='maxadmin');


Security

Disable AppServerSecurity. This may be needed sometimes when production system uses LDAP authentication.
update MAXPROPVALUE set PROPVALUE='0' where PROPNAME='mxe.useAppServerSecurity';


Hostname

Update the hostname in the database.
update MAXPROPVALUE set PROPVALUE='[NEWHOSTNAME]' where propname='mxe.hostname';
update MAXPROPVALUE set PROPVALUE='http://[NEWHOSTNAME]/meaweb' where PROPNAME='mxe.int.webappurl';

There are other variables that should be changed as well like WAS.WebServerHostName and WAS.DeploymentManagerHostName.


Database connection

Typically database connection properties are stored into maximo.properties file. However, these are also stored in the Maximo database and used for installation of fixpacks and patches.
update MAXPROPVALUE set PROPVALUE='[DBURL]' where propname='mxe.db.url';
update MAXPROPVALUE set PROPVALUE='[DBHOST]' where PROPNAME='Database.SQL.ServerHostName';

There are other variables that should be changed as well like WAS.WebServerHostName and WAS.DeploymentManagerHostName.


Emails

Replace all user's email addresses with your email. This may be useful to test workflow or escalations emailing.

update MAXPROPVALUE set PROPVALUE='mymail@dummy.com' where PROPNAME='mxe.adminEmail';
update MAXPROPVALUE set PROPVALUE='mymail@dummy.comm' where PROPNAME='mxe.workflow.admin';
drop index email_ndx2 on EMAIL;
update EMAIL set EMAILADDRESS='mymail@dummy.com';

If you have automated emailing to vendors or users may prefer to disable emailing completely to avoid spamming from test systems.

update MAXPROPVALUE set PROPVALUE='dummysmtp' where PROPNAME='mail.smtp.host';


MIF home dir (optional)

Update MIF home directory if needed

update MAXPROPVALUE set PROPVALUE= 'C:\MIFDIR' where PROPNAME='mxe.int.globaldir';


Disable crontasks (optional)

You may want to disable all the crontasks to avoid escalations, integrations, emailing or whatever automated system you have in place.

update CRONTASKINSTANCE set ACTIVE = 0;
update INBOUNDCOMMCFG set ACTIVE = 0;

Commit changes

Don't forget to commit your updates :-)


Overwrite Java code
  • Backup the SMP\maximo\applications\maximo on the target system.
  • Copy maximo.ear file from the source system to a temp directory on the target system.
  • Extract the maximo.ear file.
  • Extract businessobjects.jar file.
  • Replace the content of [SMPDIR]\maximo\applications\maximo\businessobjects directory with the extracted businessobjects.jar file.
  • Replace the content of [SMPDIR]\maximo\applications\maximo\maximouiweb\webmodule\WEB-INF\classes directory with the code from the extracted maximo.ear file.
  • Replace any other sources that you may have modified on the target system.


Update maximo.properties

Open the maximo.properties text file located under [SMPDIR]\maximo\applications\maximo\properties folder and update mxe.db.url and other properties according to the new environment.
If the file is encrypted refer to this IBM TechNote to modify it.


Redeploy Maximo EAR
  • Build Maximo EAR launching [SMPDIR]\maximo\deployment\buildmaximoear.bat script (or buildmaximoear.sh)
  • Deploy the Maximo EAR file using the WAS Console.
  • Start the application server.
  • Check SystemOut.log to ensure there aren’t any problem.
 
    References


    Source:http://maximodev.blogspot.com/2012/03/cloning-maximo-environment.html

    Tidak ada komentar:

    Posting Komentar