Adding custom code and LAFIXes to Maximo Application Suite – Manage Application
At the moment of when this article was written Maximo Application Suite is at version 8.6.1. and Manage is at version 8.2.1 and RedHat OpenShift at 4.6.54
The process will have the following steps:
1.1. Having a maximo custom code that you need to deliver in Manage. We will be using the sample provided in this Maximo Playbook: https://ibm-mas-manage.github.io/playbook/upgrade/customization/
1.2. Existing LAFIX fix that you have received from IBM support
2. For this step I have developed a static file server in nodejs using express and file-server. The reason I did that is because I want to have the file server deployed on the same RedHat OpenShift cluster as Manage. Static file server is hosted on github in the following repository: https://github.com/istrate/expressfs
3. Deploying the custom code and LAFIX in Manage
Preparing the files
Regarding the customizations that are needed to be delivered, you should follow the guidelines from https://ibm-mas-manage.github.io/playbook/upgrade/customizationprocess
In short, all customer specific changes should be included in a customization archive. For example, Java Classes, XMLs, database scripts. The customization archive will be created by a customer and will be placed in a location accessible to Maximo Application Suite during deployment, hence the need of the static file from step 2). The structure of customization archive must be the same as the Maximo folder structure.
IMPORTANT: The customization archive should be tested in a development/test environment before applying to production environment
I have downloaded the sample customization archive and I already have a lafix on my local machine:
Deploying the expressfs static file server on RedHat OpenShift
1. First, lets create a project where we can deploy the expressfs file server
Under Administrator view go to Home > Projects and click on the top right blue button Create Project. I will name this expressfs press Create
Next, switch to the Developer view and select to deploy application From Git tile:
Pass the following information:
I will create this as deployment and will let RedHat OpenShift to create a Route to the Application
After that, just click on Create and we should be ready after the build finishes successfully. If everything goes well then you should see a page similar with the one below:
Accessing the url under Routes section, will take you to the file server:
This completes the file server deployment on RedHat Openshift. Now, I will upload the files on the server using the Upload button. After the upload View the files on server, mines are looking as per below:
Copy the URL path to the files using right click, Copy link option. The ones that I will use in step 3) will be:
Recommended by LinkedIn
Deploying the custom code and LAFIX in Manage
With the links in the clipboard, log in into Maximo Application Suited admin page, then go to Catalog and select Manage application tile. Under Customization, deactivate System managed option and pass the url of the custom code zip archive:
Apply changes and Activate
After you click Activate, Manage will kick a build-admin job in background that will pull the customization archive from the file server and will work out to deployment. All we have to do now is to wait for the everything to be ready for us.
Action log from build-admin job pod:
STEP 7: RUN wget $configfile http://expressfs-expressfs.apps.xxxxxx/store/custasset_bin.zip -O customization.zip && unzip -o customization.zip && rm customization.zip time="2022-02-08T09:44:16Z" level=warning msg="Path \"/run/secrets/etc-pki-entitlement\" from \"/etc/containers/mounts.conf\" doesn't exist, skipping" time="2022-02-08T09:44:16Z" level=warning msg="Path \"/run/secrets/redhat.repo\" from \"/etc/containers/mounts.conf\" doesn't exist, skipping" --2022-02-08 09:44:16-- http://expressfs-expressfs.apps.rares.cp.fyre.ibm.com/store/custasset_bin.zip Resolving expressfs-expressfs.apps.xxxxxxxx (expressfs-expressfs.apps.xxxxxxx)... 9.46.107.111 Connecting to expressfs-expressfs.apps.xxxxxx (expressfs-expressfs.apps.xxxxxx)|9.46.107.111|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 58987 (58K) [application/zip] Saving to: 'customization.zip' 0K .......... .......... .......... .......... .......... 86% 83.5M 0s 50K ....... 100% 234M=0.001s 2022-02-08 09:44:16 (91.3 MB/s) - 'customization.zip' saved [58987/58987]
Archive: customization.zip creating: applications/maximo/businessobjects/classes/cust/app/asset/ inflating: applications/maximo/businessobjects/classes/cust/app/asset/Asset.class inflating: applications/maximo/businessobjects/classes/cust/app/asset/AssetSet.class
inflating: applications/maximo/businessobjects/classes/cust/app/asset/AssetSet_Stub.class inflating: applications/maximo/businessobjects/classes/cust/app/asset/Asset_Stub.class inflating: applications/maximo/businessobjects/classes/cust/app/asset/FldAssetNewField.class inflating: applications/maximo/commonweb/classes/com/ibm/tivoli/maximo/oslc/provider/MyPingServlet.class inflating: applications/maximo/properties/product/a_customer.xml inflating: deployment/was-liberty-default/config-deployment-descriptors/maximo-mea/meaweb/webmodule/WEB-INF/web.xml
inflating: deployment/was-liberty-default/config-deployment-descriptors/maximo-ui/webmodule/WEB-INF/web.xml creating: tools/maximo/en/cust/ inflating: tools/maximo/en/cust/V7612_01.dbc --> fd72800ff26
Depending on your environment such actions usually take around 2-3 hours for a complete cycle and after it finishes you should see something like:
Check for customizations
In maxinst pod terminal run: ./custommetadataclassesreport.sh script. This will write a xls report that will show the custom classes added in the environment. In my case was report: customizationreport20220208190949.xls
Here you can see the custom classes names in customizationreport20220208190949.xls under Objects sheet.
Checked in Assets application and the custom code works as expected, after I have added the ASSET.NEWFIELD field in Assets UI.
Also, the GET REST call works just fine. Getting 200 OK when run it.
I must admit that run on a few challenges at first as I had different server bundle type deployed (all) and I had to switch to UI and MEA for the custom sample code to work. After changing to the latter, everything worked as expected.
Deploying the LAFIX
Starting with copying the link to the lafix.zip from the expressfs.
Next, add it in Maximo Application Suite > Catalog > Manage > Customization as in:
Apply changes, Activate and after 2 hours my LAFIX was deployed.
Here is how you check that the LAFIX was actually applied (well, beside trying to see if the actual issue that I had was fixed 😊 ). First access the maxinst pod’s terminal and run: ./LATestFixReportWriter.sh
The script will create a .csv file located in /opt/IBM/SMP/maximo/tools/maximo/log/LATestFixXXXXXXX.csv with all the LAFixes deployed on the environment:
That was all! I hope you give it try and have fun doing it.
Disclaimer: Daniel Istrate works on MAS for IBM - but views are my own and not organization/employers.