IBM Maximo: Provide you customization binaries.zip on OpenShift (Apache HTTP)

From Wiki

Uploading customization_binaries.zip directly to OpenShift simplifies deployment by avoiding external image builds and registries. It enables faster updates and avoid problem with security teams.

Provide customization_binaries.zip in a custom container

Start by creating a new project:

oc new-project httpd-customization-binaries

Create a file httpd-customization-binaries.yaml, with this content:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: httpd-index
  namespace: httpd-customization-binaries
  labels:
    app: httpd-custom-bin
data:
  index.html: |
    <!DOCTYPE html>
    <html>
    <head>
        <title>Maximo Customization Server</title>
    </head>
    <body>
        <h1>Hello World!</h1>
        <p>Maximo Customization Binaries Server</p>
    </body>
    </html>

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: httpd-custom-bin
  namespace: httpd-customization-binaries
  labels:
    app: httpd-custom-bin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: httpd-custom-bin
  template:
    metadata:
      labels:
        app: httpd-custom-bin
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      
      volumes:
        - name: index-html
          configMap:
            name: httpd-index
            defaultMode: 0644
        - name: html-data
          emptyDir: {}
      
      containers:
        - name: httpd
          image: image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest
          
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          
          volumeMounts:
            - name: html-data
              mountPath: /var/www/html
            - name: index-html
              mountPath: /var/www/html/index.html
              subPath: index.html
          
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
          
          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
            limits:
              memory: "256Mi"
              cpu: "200m"
          
          livenessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 10
          
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 5
            periodSeconds: 5

---
apiVersion: v1
kind: Service
metadata:
  name: httpd-custom-bin
  namespace: httpd-customization-binaries
  labels:
    app: httpd-custom-bin
spec:
  type: ClusterIP
  selector:
    app: httpd-custom-bin
  ports:
    - name: http
      port: 8080
      targetPort: 8080
      protocol: TCP
  sessionAffinity: None

---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: httpd-custom-bin
  namespace: httpd-customization-binaries
  labels:
    app: httpd-custom-bin
spec:
  to:
    kind: Service
    name: httpd-custom-bin
    weight: 100
  
  port:
    targetPort: http
  
  wildcardPolicy: None

Create a New App Using the NGINX Template

oc apply –f httpd-customization-binaries.yaml

Check the Pod Name


Look for the pod name that starts with nginx-custom-. You’ll need this for the next step.

Upload custominization_binaries.zip

oc cp customization_binaries.zip <pod-name>:/var/www/html/customization_binaries.zip

Check the Route to Access Your App

oc get routes

This will show the external URL where your custom HTTPD content is being served.

Try to download on your machine, appending customization_binaries.zip. Like:

http://xxxxxx/customization_binaries.zip

don't use https!!!

Configure Customization Archive on IBM Maximo Application Suite Dashboard

Access the Admin UI in IBM Maximo Application Suite:

1. Navigate to Catalog -> Manage:

2. Navigate to Actions -> Update Configuration:

3. Scroll down to Customization and click Edit:

4. Under Customization section, uncheck System Managed option then paste the URL to the customization archive:

http://httpd-custom-bin.httpd-customization-binaries.svc:8080/custominization_binaries.zip

where address is <service>.<namespace>.svc:<port>, internal access to service

5. Scroll up and click Apply Changes:

6. In the OCP Console, head to Workloads -> Pods, then filter by the mas-<MAS NAME>-manage project. You should see a new pod called admin-build-config-x-build being created:

7. Click the build pod, then select Logs tab

Wait for Complete

OR Configure a Customization Archive in Manage Deployment via Red Hat OpenShift Console

These steps explain how to configure a customization archive directly in a Manage Workspace instance, instead of using the MAS Admin UI console.

1. Log in to the OpenShift Console

2. Navigate to Administration > CustomResourceDefinitions, then search for and select ManageWorkspace.

3. Choose the ManageWorkspace instance associated with your MAS deployment.

4. Edit the YAML Configuration

Go to the YAML tab and append the customizationList property under spec.settings. This should include:

  • customizationArchiveName: a name for your archive
  • customizationArchiveUrl: the URL or path to your archive file

Example:

spec:
  settings:
    customizationList:
      - customizationArchiveName: my-custom-archive
        customizationArchiveUrl: http://httpd-custom-bin.httpd-customization-binaries.svc:8080/customization_binaries.zip


5. Save the YAML File

Once saved, the Manage deployment process will automatically reconcile and apply the new customization archive. This may take several minutes depending on the archive size. The Manage application servers will restart during this process, so plan for a potential downtime window.

Ver também