IBM Maximo: Maximo Manage development environment without OpenShift

From Wiki
Revision as of 20:12, 14 August 2024 by Ebasso (talk | contribs) (→‎Copy files to container)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Pull image from IBM Repository

Go to this webpage to get your entitlement key: https://myibm.ibm.com/products-services/containerlibrary

Set the IBM Entitlement Registry Key

export ENTITLED_REGISTRY_KEY=eyJ...

Do a login to Podman

podman login cp.icr.io -u cp -p $ENTITLED_REGISTRY_KEY


List Available Tags for a Manage Admin with skopeo tool.

skopeo list-tags docker://cp.icr.io/cp/manage/manageadmin


Inspect a Manage Admin Image

skopeo inspect docker://cp.icr.io/cp/manage/manageadmin:9.0.0


Pull a Manage Admin Image

podman pull cp.icr.io/cp/manage/manageadmin:9.0.0

Run Manage Admin

Run container in background

podman run -d cp.icr.io/cp/manage/manageadmin:9.0.0
40e118bf93183b386c787553e3a1689519eb6ef6e1712d9f019ec12e8e2c59a4

Check status

podman ps

The output is

CONTAINER ID  IMAGE                                  COMMAND     CREATED        STATUS        PORTS       NAMES
40e118bf9318  cp.icr.io/cp/manage/manageadmin:9.0.0              3 seconds ago  Up 3 seconds              pedantic_cerf

Connect to container and you can check current directory

podman exec -it 40e118bf9318 sh

sh-4.5$ pwd

Update the properties in the

/opt/IBM/SMP/maximo/applications/maximo/properties/maximo.properties

file with the URL, user name, and password for your Maximo Manage database.

Customization

Copy files to container

Your source code must have the same directory structure used by Maximo

Get your source code, create a zip file and copy to container

podman cp mycode.zip  40e118bf9318:/home/maximoinstall/mycode.zip

Access your Maximo Manager container

podman exec -it 40e118bf9318 sh

Prepare environment

cd /home/maximoinstall

mkdir src target

cd src

unzip mycode.zip

Compile Java customization and create customization_binaries.zip

Inside the container, let's export environment variables

export JAVA_HOME=/opt/ibm/java
export LIB_DIR=/opt/IBM/SMP/maximo/applications/maximo/lib/*
export CLASS_DIR=/opt/IBM/SMP/maximo/applications/maximo/businessobjects/classes/*

add the list of java files to sources.txt file

cd /home/maximoinstall/src

find . -name "*.java" > sources.txt

Compile files

$JAVA_HOME/bin/javac -d target -cp "$LIB_DIR:$CLASS_DIR" @sources.txt

Confirm that you dont have errors

Copy Non-Java Files using rsync

rsync -av --exclude="*.java" src/ target/

If you dont have rsync try this:

find src/ -type f ! -name "*.java" -exec cp --parents \{\} target/ \;


Create customization archive

cd /home/maximoinstall/target 

zip --verbose -r ../customization_binaries.zip *

How to test

  • Extract the content in the same directory structure as customization archive
  • Deploy customization archive on a test environment , or
  • Test customization archive use local container deployment for Manage without OpenShift and MAS for limited but fast testing


Articles

Ver também