Simplify customization process in Maximo Manage
Maximo Manage is based on a brand new container-based platform named Maximo Application Suite (MAS). Its all applications should run on OpenShift Container Platform that is one of Kubernetes distributions. So, it needs to change the process to deploy your Maximo customization into the new platform. The detailed procedures have published in MAS playbook.
Fortunately, you can use your current customization code in many cases because the Maximo programming models were not changed drastically (some exceptional cases exist e.g. authentication and old skins). Many simple customizations can be deployed by just recompiling with the new Maximo Manage Java code. But, there are many questions about the process e.g. how to get Maximo code, I know the all of the customized code into zip but where to deploy, and etc. In addition, the deployment process has over 10 steps but MAS does not provide any automation logic at this time.
So, I'd like to introduce masmanagedev-cli to help the customization process in MAS. This utility is forked from maximodev-cli and added some convenient commands for MAS environments. Note that this program is tested on Linux only, so please submit issues when you find problems on Windows and Mac.
Install masmanagedev-cli
It requires the Node.JS environment and "oc" command. You can get "oc" command binary from OKD releases. Then, "masmanagedev-cli" can be installed and enabled globally with the following commands.
$ git clone https://github.com/nishi2go/masmanagedev-cli.git
$ cd masmanagedev-cli
$ npm ci
$ npm install file:./ -g
Download Maximo code from manageadmin image
The "init home" command downloads Maximo code from admin docker image in your "MAXIMO_HOME" directory. This command is a helper tool to automate to pull and extract the Maximo code from Maximo admin docker image.
$ oc login
$ export MAXIMO_HOME=`<your maximo home directory>`
$ cd ${MAXIMO_HOME}
# crc and dev are example MAS instance and workspace
$ masmanagedev-cli init home --instance crc --workspace dev --tag latest
Create your custom code
Place your own custom code or create the new one by "masmanagecli-dev create addon" command derived from "maximodev-cli". Please check the quick start for usage.
Add third-party JAR files
The "update classpath" command updates deployment XML files to add your third-party jar files to "businessobjectclasspath". This process will get the XML files from "MAXIMO_HOME" and add the files under "applications/maximko/lib" in your workspace. This command is intended to automate the process of the guide.
Recommended by LinkedIn
$ mkdir -p applications/maximo/lib
$ cp <your jars> applications/maximo/lib
$ masmanagedev-cli update classpath
Create customization archive zip
The "create zip" command generates a ZIP file that contains the result of the "masmanagedev-cli build" command and also archives the content of the "dist" folder into a file that is put into this folder.
$ masmanagedev-cli build
$ masmanagedev-cli create zip
Deploy service for uploading customization archive
The "oc deploy" command deploys your customization archive to reflect your customization into your MAS workspace. This process will create an HTTP server to host your zip in the OpenShift cluster to share it with the Manage reconciliation process to recompile the Manage application and its container images. This command updates the customization section in Manage configuration to start reconciliation process automatically. It requires at least one zip file in the dist directory so you need to run the "create zip" command before starting it.
This command is actually a wrapper program to execute the following steps:
$ oc login
$ masmanagedev-cli oc deploy --instance crc --workspace dev --build-name customization-archive
View Manage configurations
The "oc get-config" command shows the current Maximo Manage configurations. This command is used to get the configurations that you input settings like server bundle, base and secondary languages, persistent storage and etc in the activation process. This is a utility command to enable checking the configurations without login to Web GUI or a complex command-line options with "oc".
$ oc login
$ masmanagedev-cli oc get-config --instance crc --workspace dev
Update Manage Configurations
The "oc set" command updates the Maximo Manage configurations without login to Web GUI. The command supports set base-lang, set secondary-langs, set build-tag, set server-mode, set time-zone. When you update the value of the configurations, the Manage reconciliation process automatically starts rebuilding and redeploying the container images in a certain period of time.
$ oc login
$ masmanagedev-cli oc set base-lang --lang de --instance crc --workspace dev
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
Thanks , this would definitely improve our workflow process of automatic build and deploy , especially when integrated with a git repository and using a tool like Jenkins