Maximo Integration

  • 1.  Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Wed June 24, 2020 11:39 AM

    Hi Team,

    I am fairly new to Maximo and not that familiar with it. We use it in our enterprise and what the team does right now is to login to the maximo console and then manually create packages and then manually promote them from one environment to another. I am trying to figure out how to automate these manual steps using something like CICD in jenkins. I came across few posts on the internet that talk about the powerful JSON APIs/REST APIs in maximo which could be used to invoke the script that you create in maximo.

    My question is since i have no familiarity with the tool, on how to generate a script that does as mentioned above. If i can have a script that does that, i should be able to create a script in jenkins that can potentially trigger execution of the automation script from outside of the system (since i will be executing that in CICD tool jenkins) with an HTTP request. That way the script will make a API call to the maximo migration manager and do its job of creating packages and then promoting them from an environment to another.

    Any suggestions here will be greatly appreciated!



    ------------------------------
    Lance Zulu
    ------------------------------


  • 2.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Thu June 25, 2020 08:33 AM

    Exposing Migration Manager through the REST API is something IBM has looked at doing but hasn't implemented yet. Developing a custom solution around this would be pretty involved to do and could be short lived if IBM built it into the REST API natively. There's so much functionality in migration manager, such as utilizing collections to retrieve related records to build a package, performing a comparison job to generate a package, utilizing change tracking in the source system to generate a package, etc. Even if you ignored the creation and focused purely on deployment you would have to typically put the system into admin mode (which may or may not have issues itself that you have to monitor for) and handle any errors that occur which sometimes requires you to actually edit the package itself and telling it to continue.

    If you wanted to do something in the near term I would identify your common scenarios and look at building/implementing a migration manager alternative for those. As an example, if you primarily want it to migrate schema changes or screen changes there is the concept of DBC & MXS files that works really well to handle those. These are easy to have just the delta as well which is more difficult in migration manager. For example, just the attribute you added to WORKORDER or just the one screen change you made to WOTRACK instead of the entire WOTRACK XML. Especially if your source environment could be outdated from your target, this helps avoid your change deleting someone else's change.

    You'd have to take the system down (instead of just putting it in admin mode) but this is how IBM migrates their changes on releases. And if you defined your customizations as a product and then evolve it over time, the updatedb process will intelligently track where it left off and run only the new scripts. And running it is easy as you either call runscriptfile if running it manually or just call the standard updatedb process if you defined it as a product. Some information on DBC files can be found here: https://developer.ibm.com/static/site-id/155/maximodev/dbcguide/ & documentation around mxdiff (which allows you to generate screen differences easily) can be found here: https://developer.ibm.com/static/site-id/155/maximodev/toolsguide/TOOLS.html

    If you didn't want to utilize DBC files or need to migrate other things such as automation scripts you could come up with object structures that you could call via the REST API. The one thing that I wouldn't recommend doing outside of migration manager is migrating a workflow. Migration manager works really well for that and there are so many components that can make up a workflow that you want to ensure it gets migrated properly. 



    ------------------------------
    Steven Shull
    Director of Development
    Projetech Inc
    Cincinnati OH
    ------------------------------



  • 3.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Thu June 25, 2020 09:30 AM
    Thanks a lot Steven for the prompt response. Much appreciated!
    Based on the information i have from our MAXIMO team here, 


    The Maximo deployments use the Migration Manager application internally from within the Maximo environment. This is a structured way of packaging the changes that need to be deployed to other environments.

    Maximo Deployments follow a series of tasks to create and deploy the change packages.

    Creating a package in the Migration Manager involves a set of logical steps. There are various Maximo object structures that are defined and used to create the packages, based on the type of changes being deployed.
    Under source environment :- Collect->Define->Create->Distribute
    Under Target environment :- Preview->Deploy
    Once the package is created in the source environment, it can be downloaded to save in the local file structure. Then the package can be uploaded to a target environment (UAT / PROD) and can be deployed there.

    So based on your suggestions, even if we were to just focus on deployment part for now, the idea would be to have the packages created manually in migration manager and moved to source control like GitHub (that's what we use here), and then figure out a way to just upload those packages to the environment as needed via a CICD pipeline. But then how do you do it from outside the tool if migration manager doesn't have REST API? Or what could be the alternatives here to meet this automation.

    Also, i will check with the team and see what are the common scenarios where the manual steps are tedious for them for which the are looking for some sort of automation to perform the same set of steps without any manual interaction.



    ------------------------------
    Lance Zulu
    ------------------------------



  • 4.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Thu June 25, 2020 08:46 AM
    Hi Lance,

    In on of my previous project, devops team did automate the migration package deployment process using CICD tools.
    I do not have the exact code but the logic was they created a custom java class which used IBM migration manager's class methods to upload the packages automatically from git repository and then deploy it automatically into maximo.
    It is like replicating the manual process of upload and deploy migration packages.
    So, developer created the packages and pushed the packages to git repository. DevOps pipelines picked up the packages and deployed them into Maximo.
    So, not rest API but if you the time ,money and expertise then you can create a custom solution to automate the migration manager steps from CICD.


    Thanks,
    Biplab

    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------



  • 5.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Thu June 25, 2020 09:46 AM

    Thanks Biplab for the response. Really appreciate it!
    As i said i have hardly any familiarity with the MAXIMO tool and just trying to help the MAXIMO team with any sort of automation that can be done out of the box to help with package creation and deployments of those packages to the target environments in migration manager.
    From a custom java solution that you mentioned, is there any docs or links you could provide that might be helpful.
     I see the below that talks about the psdi.dm Java package
    https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/dm/DMPackageDef.html

    What would be those specific methods that can be called for upload and deployment within migration manager? Also how would it be possible for an external tool like jenkins to interact with MAXIMO to upload the packages and deploy them to target environments without migration manager REST API? Or is it like just directly making a call to MAXIMO for authentication which is possible via the native REST API in MAXIMO and then call these java methods for upload and deployments within migration manager



    ------------------------------
    Lance Zulu
    ------------------------------



  • 6.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Fri June 26, 2020 02:15 AM
    Hi Lance,

    A tool like jenkins would have a framework to run jar files or i dont know may be run a java code.
    Your maximo team will have to create this custom solution which will run standalone. It would require good Maximo java customization expertise.
    Steps would be:
    1. Import all the relevant Maximo jar files in your project. Most important one is businessobject.jar but I think you won't need all the part of businessobjects.jar so Development team will have to optimize
    2. Use the maximo jars to create Valid maximo Connection session. Here below is an example to that:
    https://bportaluri.com/2012/06/java-jdbc-sql-connection-maximo.html
    3. Use the DMPackage Def and other migration manager class method to upload the migration package and deploy it. 
    I do not have the exact method names but I would start with running a debug log on Migration manager application to see what methods are used to import package and deploy package. It would require some amount of investigation but it is not difficult if you have the right level of expertise in your Maximo team to customize maximo.

    As this is an interesting project, I am happy to help you when possible. 
    If you really want to do it then I believe you will have to think about how much effort and cost benefit you will have after doing this. 
    The project which did this solution had around 30 Maximo developers working simultaneously so Company spent time and effort to achieve this kind of solution which helped in the DevOps process.

    Moreover, if you are looking for Maximo expertise in this space then please connect me over linkedin and I shall be able to help.

    Thanks!


    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------



  • 7.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Fri June 26, 2020 12:30 PM

    Thanks Biplab. Appreciate all the assistance so far on this.

    I just had a few questions before i discuss your suggested approach with the MAXIMO team.
    Are you saying to copy the necessary jars for MAXIMO (most importantly businessobjects.jar) from its application server to some source control repository, then create an application that uses those jars  to create Valid maximo Connection session and in doing so end up creating some standalone jar that can be run through jenkins with a simple 

    java -jar my-jar-file
    along with some arguments may be to provide the package name for upload, target environment to deploy, etc.

    If you could provide some more explanation to your suggested approach may be the sequence of steps, that would be very helpful.



    ------------------------------
    Lance Zulu
    ------------------------------



  • 8.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Sat June 27, 2020 09:34 AM
    Hi Lance,

    Yes, I would try to create a jar which would run standalone and use Maximo's libraries to create Valid session in Maximo and then use the same to call Migration manager class objects and methods to upload and deploy the package.
    Sequence of step which I would follow is as follows:
    1. Run debug using Maximo logging or eclipse debug to find out which migration manager class and method are used to upload and deploy the migration manager packages.
    2. Start new Java project to create a stand alone solution.
    3. Create class package which would consist of logic to connect to Maximo and then upload and deploy the packages.
    4. Next steps are purely based on how jenkins or CICD tool implement this kind of java package. Experts of those tools can be give more inputs on that. May be running a jar is easier for them. You can present it to them as an eclipse/any any Java IDE's standalone project.
    Also, DevOps team might have a better view of running the java package. They might opt for a jar file or might just have the feature running the Java classes in their tool. 
    5. As per my experience , DevOps team  created a java class which ran from CICD pipelines and did an upload and deploy of Migration manager packages.

    Hope this helps!

    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------



  • 9.  RE: Automate the creation of packages and promoting them from one environment to another in maximo migration manager

    Posted Mon June 29, 2020 11:14 AM
    Thanks a lot Biplab for all the guidance so far.
    Let me share your suggestions with the team and see what they have to say on this.

    ------------------------------
    Lance Zulu
    ------------------------------